AWS - S3 Unauthenticated Enum
Last updated
Last updated
Learn & practice AWS Hacking: Learn & practice GCP Hacking:
A bucket is considered “public” if mtumiaji yeyote anaweza kuorodhesha maudhui ya bucket, and “private” if the bucket's contents can only be listed or written by certain users.
Companies might have buckets permissions miss-configured giving access either to everything or to everyone authenticated in AWS in any account (so to anyone). Note, that even with such misconfigurations some actions might not be able to be performed as buckets might have their own access control lists (ACLs).
Learn about AWS-S3 misconfiguration here: and
Different methods to find when a webpage is using AWS to storage some resources:
Using wappalyzer browser plugin
Using burp (spidering the web) or by manually navigating through the page all resources loaded will be save in the History.
Check for resources in domains like:
Check for CNAMES as resources.domain.com
might have the CNAME bucket.s3.amazonaws.com
The bucket name and the bucket domain name needs to be the same.
You can find buckets by brute-forcing names related to the company you are pentesting:
You can get the region of a bucket with a dig
and nslookup
by doing a DNS request of the discovered IP:
Check that the resolved domain have the word "website".
You can access the static website going to: flaws.cloud.s3-website-us-west-2.amazonaws.com
or you can access the bucket visiting: flaws.cloud.s3-us-west-2.amazonaws.com
If you try to access a bucket, but in the domain name you specify another region (for example the bucket is in bucket.s3.amazonaws.com
but you try to access bucket.s3-website-us-west-2.amazonaws.com
, then you will be indicated to the correct location:
Ili kujaribu ufunguzi wa ndoo, mtumiaji anaweza tu kuingiza URL katika kivinjari chao cha wavuti. Ndoo ya kibinafsi itajibu na "Access Denied". Ndoo ya umma itataja vitu 1,000 vya kwanza vilivyohifadhiwa.
Open to everyone:
Private:
You can also check this with the cli:
Ikiwa bakuli haina jina la kikoa, unapojaribu kuhesabu, weka jina la bakuli tu na si kikoa zima cha AWSs3. Mfano: s3://<BUCKETNAME>
Inawezekana kubaini akaunti ya AWS kwa kutumia faida ya S3:ResourceAccount
Key ya Masharti ya Sera. Masharti haya yanapunguza ufikiaji kulingana na baki ya S3 ambayo akaunti iko ndani (sera zingine zinazotegemea akaunti zinapunguza kulingana na akaunti ambayo kiongozi anayehitaji yuko ndani).
Na kwa sababu sera inaweza kuwa na wildcards inawezekana kupata nambari ya akaunti nambari moja tu kwa wakati.
Chombo hiki kinachochea mchakato:
Ikiwa kosa ni "Access Denied" inamaanisha kuwa ID ya akaunti ilikuwa mbaya.
Check , a web with already discovered open buckets.
flaws.cloud is in IP 52.92.181.107 and if you go there it redirects you to . Also, dig -x 52.92.181.107
gives s3-website-us-west-2.amazonaws.com
.
To check it's a bucket you can also visit .
(Contains a list with potential bucket names)
Given S3 open buckets, can automatically search for interesting information.
You can find all the supported regions by AWS in
Hii mbinu pia inafanya kazi na API Gateway URLs, Lambda URLs, Data Exchange data sets na hata kupata thamani ya tags (ikiwa unajua ufunguo wa tag). Unaweza kupata maelezo zaidi katika na zana ili kuendesha uhalifu huu kiotomatiki.
Kama ilivyoelezwa katika , ikiwa una ruhusa ya kuorodhesha bucket inawezekana kuthibitisha accountID ambayo bucket inamilikiwa kwa kutuma ombi kama:
Kama ilivyoelezwa katika , inawezekana kuangalia ikiwa anwani ya barua pepe inahusiana na akaunti yoyote ya AWS kwa kujaribu kutoa ruhusa kwa barua pepe juu ya S3 bucket kupitia ACLs. Ikiwa hii haitasababisha kosa, inamaanisha kuwa barua pepe hiyo ni mtumiaji wa mzizi wa akaunti fulani ya AWS:
Jifunze & fanya mazoezi ya AWS Hacking: Jifunze & fanya mazoezi ya GCP Hacking:
Angalia !
Jiunge na 💬 au au tufuatilie kwenye Twitter 🐦 .
Shiriki mbinu za hacking kwa kuwasilisha PRs kwa na repos za github.