Monday 24 August 2020

CloudFrunt - A Tool For Identifying Misconfigured CloudFront Domains


CloudFrunt is a tool for identifying misconfigured CloudFront domains.

Background
CloudFront is a Content Delivery Network (CDN) provided by Amazon Web Services (AWS). CloudFront users create "distributions" that serve content from specific sources (an S3 bucket, for example).
Each CloudFront distribution has a unique endpoint for users to point their DNS records to (ex. d111111abcdef8.cloudfront.net). All of the domains using a specific distribution need to be listed in the "Alternate Domain Names (CNAMEs)" field in the options for that distribution.
When a CloudFront endpoint receives a request, it does NOT automatically serve content from the corresponding distribution. Instead, CloudFront uses the HOST header of the request to determine which distribution to use. This means two things:

  1. If the HOST header does not match an entry in the "Alternate Domain Names (CNAMEs)" field of the intended distribution, the request will fail.
  2. Any other distribution that contains the specific domain in the HOST header will receive the request and respond to it normally.
This is what allows the domains to be hijacked. There are many cases where a CloudFront user fails to list all the necessary domains that might be received in the HOST header. For example:
  • The domain "test.disloops.com" is a CNAME record that points to "disloops.com".
  • The "disloops.com" domain is set up to use a CloudFront distribution.
  • Because "test.disloops.com" was not added to the "Alternate Domain Names (CNAMEs)" field for the distribution, requests to "test.disloops.com" will fail.
  • Another user can create a CloudFront distribution and add "test.disloops.com" to the "Alternate Domain Names (CNAMEs)" field to hijack the domain.
This means that the unique endpoint that CloudFront binds to a single distribution is effectively meaningless. A request to one specific CloudFront subdomain is not limited to the distribution it is associated with.

Installation
$ pip install boto3
$ pip install netaddr
$ pip install dnspython
$ git clone https://github.com/disloops/cloudfrunt.git
$ cd cloudfrunt
$ git clone https://github.com/darkoperator/dnsrecon.git
CloudFrunt expects the dnsrecon script to be cloned into a subdirectory called dnsrecon.

Usage
cloudfrunt.py [-h] [-l TARGET_FILE] [-d DOMAINS] [-o ORIGIN] [-i ORIGIN_ID] [-s] [-N]

-h, --help Show this message and exit
-s, --save Save the results to results.txt
-N, --no-dns Do not use dnsrecon to expand scope
-l, --target-file TARGET_FILE File containing a list of domains (one per line)
-d, --domains DOMAINS Comma-separated list of domains to scan
-o, --origin ORIGIN Add vulnerable domains to new distributions with this origin
-i, --origin-id ORIGIN_ID The origin ID to use with new distributions

Example
$ python cloudfrunt.py -o cloudfrunt.com.s3-website-us-east-1.amazonaws.com -i S3-cloudfrunt -l list.txt

CloudFrunt v1.0.3

[+] Enumerating DNS entries for google.com
[-] No issues found for google.com

[+] Enumerating DNS entries for disloops.com
[+] Found CloudFront domain --> cdn.disloops.com
[+] Found CloudFront domain --> test.disloops.com
[-] Potentially misconfigured CloudFront domains:
[#] --> test.disloops.com
[+] Created new CloudFront distribution EXBC12DE3F45G
[+] Added test.disloops.com to CloudFront distribution EXBC12DE3F45G


Related news
  1. Pentest Tools For Ubuntu
  2. Hacking Tools Hardware
  3. Pentest Tools For Android
  4. Hacking Tools Kit
  5. Hackrf Tools
  6. Pentest Tools Alternative
  7. Pentest Tools Github
  8. Hacking Tools Github
  9. Hack Tools
  10. Hacking Tools Download
  11. Hacking Tools
  12. Hack Tools Mac
  13. Black Hat Hacker Tools
  14. Hack Website Online Tool
  15. Hacking Tools Github
  16. Install Pentest Tools Ubuntu
  17. Kik Hack Tools
  18. Tools For Hacker
  19. Hackers Toolbox
  20. Hack Tools For Mac
  21. Game Hacking
  22. Pentest Tools Download
  23. Hacking Tools Download
  24. Hacking Tools Windows
  25. Hak5 Tools
  26. Hack Tools
  27. Pentest Tools Download
  28. Hacker Tools Apk
  29. Hacking Tools Github
  30. Nsa Hack Tools Download
  31. Hacking Tools For Beginners
  32. Hacker Tools Windows
  33. Nsa Hack Tools Download
  34. How To Make Hacking Tools
  35. Pentest Tools Website
  36. Hacker Search Tools
  37. Hacker Tools Apk Download
  38. Github Hacking Tools
  39. Pentest Tools For Windows
  40. Pentest Tools Port Scanner
  41. Hacker Tool Kit
  42. Hacking Tools Software
  43. Pentest Tools Subdomain
  44. Termux Hacking Tools 2019
  45. Hacker Tools Apk
  46. Hacker Hardware Tools
  47. Pentest Tools Bluekeep
  48. Hack And Tools
  49. Hacking Tools For Kali Linux
  50. Best Pentesting Tools 2018
  51. Hacker Tools Apk Download
  52. Best Hacking Tools 2020
  53. Hacker
  54. Game Hacking
  55. Best Hacking Tools 2020
  56. Hacking Tools 2020
  57. Hacker Tools
  58. Pentest Reporting Tools
  59. Best Hacking Tools 2020
  60. Hacking Tools For Windows Free Download
  61. Hacker Tools 2020
  62. Hacker Tools Apk
  63. Hacker Tools Github
  64. Pentest Tools Website
  65. Hacking Tools Download
  66. Pentest Tools
  67. Hacker Hardware Tools
  68. Hack Tools For Pc
  69. Hacker Tools Free Download
  70. Pentest Tools Android
  71. Hack Tools For Pc
  72. Hack Tools For Mac
  73. Hacker Tools Github
  74. Pentest Recon Tools
  75. Nsa Hacker Tools
  76. Pentest Tools Free
  77. Hack Tool Apk
  78. Hacking Tools For Games
  79. Hack Website Online Tool
  80. Android Hack Tools Github
  81. Best Hacking Tools 2019
  82. Pentest Automation Tools
  83. Hackrf Tools
  84. Hacker Tools For Mac
  85. Hacker Tools For Mac
  86. Hack Tools For Ubuntu
  87. Hacking Tools Github
  88. What Are Hacking Tools
  89. Hack Tools

No comments:

Post a Comment