hacktricks/network-services-pentesting/pentesting-web/uncovering-cloudflare.md
2022-08-19 16:51:43 +00:00

4.2 KiB

Uncovering CloudFlare

Support HackTricks and get benefits!

Do you work in a cybersecurity company? Do you want to see your company advertised in HackTricks? or do you want to have access the latest version of the PEASS or download HackTricks in PDF? Check the SUBSCRIPTION PLANS!

Discover The PEASS Family, our collection of exclusive NFTs

Get the official PEASS & HackTricks swag

Join the 💬 Discord group or the telegram group or follow me on Twitter 🐦@carlospolopm.

Share your hacking tricks submitting PRs to the hacktricks github repo.

Techniques to try to uncover web servers behind cloudflare:

  • Search for the domain inside http://www.crimeflare.org:82/cfs.html or https://crimeflare.herokuapp.com. Or use the tool CloudPeler (which uses that API)
  • Search for the domain in https://leaked.site/index.php?resolver/cloudflare.0/
  • CloudFlair is a tool that will search using Censys certificates that contains the domain name, then it will search for IPv4s inside those certificates and finally it will try to access the web page in those IPs.
  • You can also use some service that gives you the historical DNS records of the domain. Maybe the web page is running on an IP address used before.
  • If you find a SSRF inside the web application you can abuse it to obtain the IP address of the server.
  • Search a unique string of the web page in browsers such as shodan (and maybe google and similar?). Maybe you can find an IP address with that content.
    • This won't be very frequent because the server must send the same response when it's accessed by the IP address, but you never know.
  • If you have a set of potential IPs where the web page is located you could use https://github.com/hakluke/hakoriginfinder
# You can check if the tool is working with
prips 1.0.0.0/30 | hakoriginfinder -h one.one.one.one

# If you know the company is using AWS you could use the previous tool to search the
## web page inside the EC2 IPs
DOMAIN=something.com
WIDE_REGION=us
for ir in `curl https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes[] | select(.service=="EC2") | select(.region|test("^us")) | .ip_prefix'`; do 
    echo "Checking $ir"
    prips $ir | hakoriginfinder -h "$DOMAIN"
done
Support HackTricks and get benefits!

Do you work in a cybersecurity company? Do you want to see your company advertised in HackTricks? or do you want to have access the latest version of the PEASS or download HackTricks in PDF? Check the SUBSCRIPTION PLANS!

Discover The PEASS Family, our collection of exclusive NFTs

Get the official PEASS & HackTricks swag

Join the 💬 Discord group or the telegram group or follow me on Twitter 🐦@carlospolopm.

Share your hacking tricks submitting PRs to the hacktricks github repo.