Exploitation Via AWS CLI
|
|
|
|
Hints : |
We have AWS credentials from the previous challenge
Trufflehog Search aws_secret_access_key="e95qToloszIgO9dNBsQMQsc5/foiPdKunPJwc1rL" |
|
Configure aws cli with the above credentials |
|
|
|
Get the caller identity |
|
|
|
"haug" is the user. Get the policy attached to this user. |
|
|
Get the details of the policy TIER1_READONLY_POLICY attached to the user. |
|
|
|
Get the default version of the policy TIER1_READONLY_POLICY |
|
|
|
Get the inline policy attached to the user |
|
|
|
The policy attached to the user is S3Perms. Get details of this policy. |
|
|
|
The earlier command discolosed name of an s3 bucket named "smogmachines3". List its objects. |
|
|
|
Tha attached user policy provided us lambda privileges. List all the lamda functions. |
|
Lambda functions can have public URLs from which they are directly accessible. Use AWS CLI to get the configuration containing the public URL. |
|
First, we get the function details |
|
|
|
Get the configuration containing the public URL of the lambda function "smogmachine_lambda" |
|
|
|
Lambda function URL : https://rxgnav37qmvqxtaksslw5vwwjm0suhwc.lambda-url.us-east-1.on.aws/ |
|
We submit the answer and the objective is now completed. And we get 25 coins as well |
|
|
|
At this point we have retrieved the cloud ring |