Enumeration
Last updated
Last updated
Check if the resolved domain contains the word "website".
You can access the static website at: flaws.cloud.s3-website-us-west-2.amazonaws.com
or the bucket at: flaws.cloud.s3-us-west-2.amazonaws.com
.
If you try to access a bucket but specify a different region in the domain name (for example, the bucket is in bucket.s3.amazonaws.com
but you are trying to access bucket.s3-website-us-west-2.amazonaws.com
), you will be redirected to the correct location.
Test to see if a website is hosted in an s3 bucket
Put IP in browser - it will redirect to AWS console s3 page.
Run nslookup
on the IP to get the AWS s3 website
The site flaws.cloud
is hosted as an S3 bucket. This is a great way to host a static site, similar to hosting one via github pages. Some interesting facts about S3 hosting: When hosting a site as an S3 bucket, the bucket name (flaws.cloud
) must match the domain name (flaws.cloud
). Also, S3 buckets are a global name space, meaning two people cannot have buckets with the same name. The result of this is you could create a bucket named apple.com and Apple would never be able host their main site via S3 hosting.
Using the AWS cli
Will list the files in the bucket
You can also list the files by going to http://flaws.cloud.s3.amazonaws.com/
AKIAJ366LIPB4IJKT7SA
= long term access key - note the AKIA
ASIAJ366LIJGULDN21D
= session access key - note the ASIA
AWS allows you to take snapshots of EC2 and databases (RDS). The main purpose for this is to create backup copies, but sometimes users use snapshots to regain access to their own EC2s if they forget passwords.
AWS allows you to take snapshots of EC2 and databases (RDS). The main purpose for this is to create backups, but sometimes people use snapshots to regain access to their own EC2s if they forget passwords. This also allows attackers to get access to things. Snapshots are usually limited to your own account. So a possible attack would be for an attacker to get access to an AWS key that allows them to start/stop EC2s and do other things to EC2s, and then use that to take a snapshot of an EC2 and start an EC2 with that volume in your environment to gain access to it. As with all backups, you need to be careful to protect them.
Look for snapshots that this user has access to (note the SnapshotId
):
remember to include the --owner-id else you will get a lot of output that is not relevant
run lsblk
to see if disk is attached
Then run sudo mount /dev/xvdf1 /mnt
to mount the drive, browse to /mnt
to view snapshot disk