ImAyrix / cut-cdn

✂️ Removing CDN IPs from the list of IP addresses
MIT License
288 stars 40 forks source link
bugbounty bugbounty-tool cdn golang penetration-testing pentest recon reconnaissance web-application web-application-security

Removing CDN IPs from the list of IP addresses

CDN ProvidersInstallUsage ParametersPreviewUsageContact me


The tool's basic functionality would involve taking the list of IP addresses as input and then checking to determine whether the IP is behind a CDN. This tool will gather all CIDR of the most-known CDN providers and check your provided list with them. This is a handy tool for bug hunters.

CDN Providers

Installation

go install github.com/ImAyrix/cut-cdn@latest

Usage Parameters

cut-cdn -h

This will display help for the tool. Here are all the switches it supports.

Removing CDN IPs from the list of IP addresses

Usage:
  cut-cdn [flags]

Flags:
INPUT:
  -i, -ip string  Input [Filename | IP]

RATE-LIMIT:
  -t, -thread int  Number Of Thread [Number] (default 1)

CONFIGURATIONS:
  -a, -active          Active mode for check akamai
  -ua, -update-all     Update CUT-CDN Data (providers & ranges)
  -ur, -update-ranges  Update CUT-CDN Data (just ranges)

OUTPUT:
  -o, -output string  File to write output to (optional) (default "CLI")

DEBUG:
  -q, -silent   Show only IPs in output
  -v, -version  Show version of cut-cdn

Preview

cut-cdn

Usage

Akamai

Most content delivery networks (CDNs) have their Classless Inter-Domain Routing (CIDR) blocks specified on a page on their website, which Cut CDN also receives and uses to determine whether the incoming IP is behind the CDN. However, Akamai has not publicly specified its IP range. I attempted to find the Akamai CIDRs myself and added them to the tool, which is fairly comprehensive but not entirely foolproof, and I may have overlooked some CIDRs. To ensure accuracy, you can use the "-active" key. When this switch is used, all providers are checked as before, but with the added step of actively checking for Akamai as well.

Note: If you want to check many IPs using this method, increase the number of threads so that it checks quickly and takes less time.

cut-cdn -i 127.0.0.1 -active

Basic

Check your IP list with the IP ranges of CDN providers:

Providers

During the initial run of the tool after installation, two files are generated in the directory ~/.config/cut-cdn. One of these files, providers.yaml, contains the link pages where providers have specified their CIDRs. The other file, ranges.txt, contains the CIDRs of these providers.