Red Team / OSINT reconnaissance tool that searches IP addresses behind Content Delivery Networks (CDNs) and Web Application Firewalls (WAFs).
Leverages DNS resolution history, SSL certificate analysis and HTTP response headers from VirusTotal, Censys and Shodan to determine potential CDN/WAFs protecting a domain.
Catppuccin Mocha theme, Menlo font.
Important
The script requires API keys for the VirusTotal, Censys, and Shodan APIs.
See: VirusTotal API, Censys API, Shodan API.
Before using behindTheCDN
, you'll need:
- The API keys.
- Any shell listed in Supported shells.
- The following dependencies:
curl
,jq
,dig
,xmllint
,whois
.
Copy and paste the code below and press enter:
curl -fsSL https://raw.githubusercontent.com/Neved4/behindTheCDN/main/src/behindTheCDN.sh | sh -s -- --from-curl
If you have brew
installed, run:
brew install Neved4/homebrew-tap/behindTheCDN
/bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/Neved4/BehindTheCDN/HEAD/tools/install.sh)"
Set the APIs for VirustTotal and Censys on the API.conf
file.
First clone the .git
repository:
git clone https://github.com/Loop-Man/BehindTheCDN
Then add permissions to execute:
chmod u+x behindTheCDN.sh
Finally, set the APIs for VirustTotal and Censys on the
API.conf
file.
To run the script inside a Docker image, run:
docker build .
The following options are available:
Usage (Offline)
usage: behindTheCDN.sh [-ci] [-d <domain> | -f <file>] [-o <output>] ...
Options:
-c search by Censys API
-d <domain> search by DNS history on a specific domain
-f <file> search by DNS history on every domain in the file
-i search by DNS history, SSL certificate, subdomains
-o <output> save the output to a file
The following option allows you to search for a particular domain:
$ ./behindTheCDN.sh -d example.com
Launch more queries and search by DNS history and SSL certificates:
$ ./behindTheCDN.sh -d example.com -i
Search using the Censys API:
$ ./behindTheCDN.sh -d example.com -c
Indicate a file with domains to look for a possible bypass:
$ ./behindTheCDN.sh -f domains.txt
Options can be combined and be used at the same time:
$ ./behindTheCDN.sh -d example.com -i -c
$ ./behindTheCDN.sh -ci -f domains.txt
By default behindTheCDN.sh
writes its output to a timestamp file in the
results/
folder.
See: Benchmarks.
Most versions and distributions of Linux, FreeBSD, and macOS should work. Here are the ones we've tested:
System | Supported |
---|---|
macOS 14 |
โ Yes |
FreeBSD 14 |
โ Yes |
Fedora 40 |
โ Yes |
Debian 12 |
โ Yes |
WSL 2 |
โ Yes |
Shell | Version | Supported |
---|---|---|
bash |
5.2.26 |
โ Yes |
dash |
0.5.12 |
โ Yes |
ksh93 |
93u+m/1.0.8 |
โ Yes |
mksh |
59c |
โ Yes |
oksh |
7.5 |
โ Yes |
yash |
2.56.1 |
โ Yes |
zsh |
5.9 |
โ Yes |
osh |
0.20.0 |
โ Yes |
posh |
0.14.1 |
This script is compatible with ISO 9945:2009, also known as POSIX.1-2017.2
This repository is licensed under the terms of the MIT License.
See the LICENSE file for details.
Footnotes
-
posh
won't work with curl due to missing-s
specified by POSIX. โฉ -
IEEE Std 1003.1-2017: Standard for Information Technology โ Portable Operating System Interface (POSIXยฎ), ISO/IEC/IEEE 9945:2009/COR 2:2017. URL: https://pubs.opengroup.org/onlinepubs/9699919799/ โฉ