Check subdomains for subdomain takeovers and other DNS tomfoolery
Project description
BadDNS
Check subdomains for subdomain takeovers and other DNS tomfoolery
BadDNS is a standalone tool and BBOT module for detecting domain/subdomain takeovers of all kinds, including other DNS issues like NSEC walks and Subdomain Takeovers.
Check out the introductory blog on the BLS substack!
Installation
We have a pypi package, so you can just do pip install baddns
to make use of the library.
Or use pipx: pipx install git+https://github.com/blacklanternsecurity/baddns
Usage
After installing with pip, you can just run baddns
from the command line.
usage: baddns [-h] [-n CUSTOM_NAMESERVERS] [-c CUSTOM_SIGNATURES] [-l] [-s] [-m MODULES] [-d] [target]
Check subdomains for subdomain takeovers and other DNS tomfoolery
positional arguments:
target subdomain to analyze
options:
-h, --help show this help message and exit
-n CUSTOM_NAMESERVERS, --custom-nameservers CUSTOM_NAMESERVERS
Provide a list of custom nameservers separated by comma.
-c CUSTOM_SIGNATURES, --custom-signatures CUSTOM_SIGNATURES
Use an alternate directory for loading signatures
-l, --list-modules List available modules and their descriptions.
-s, --silent Show only vulnerable targets
-m MODULES, --modules MODULES
Comma separated list of module names to use. Ex: module1,module2,module3
-d, --debug Enable debug logging
Modules
Name | Description |
---|---|
cname | Check for dangling CNAME records and interrogate them for subdomain takeover opportunities |
ns | Check for dangling NS records, and interrogate them for takeover opportunities |
mx | Check for dangling MX records and assess their base domains for availability |
nsec | Enumerate subdomains by NSEC-walking |
references | Check HTML content for links or other references that contain a hijackable domain |
txt | Check TXT record contents for hijackable domains |
zonetransfer | Attempt a DNS zone transfer |
Examples
- Simple check
baddns subdomaintocheck.example.com
- Specify Module(s)
baddns -m CNAME subdomaintocheck.example.com
baddns -m CNAME,NS subdomaintocheck.example.com
- List available Modules
baddns -l
- Custom Nameservers
baddns -n 1.1.1.1 subdomaintocheck.example.com
Documentation
Please visit our full documentation for many more details, including information about specific BadDNS modules.
Acknowledgements
BadDNS Signatures are sourced primarily from Nuclei Templates and from dnsReaper by Punk Security, although many have been modified or updated in BadDNS. Much of the research contained in the signatures was originally discussed on the issues page of can-i-take-over-xyz.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file baddns-1.4.13.tar.gz
.
File metadata
- Download URL: baddns-1.4.13.tar.gz
- Upload date:
- Size: 53.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 872313f34e15be6070a620dbfde16d8709c421e5e9162d4058fbb5e45a69e4c7 |
|
MD5 | ced25f55477a58a5fb619cf371c61e42 |
|
BLAKE2b-256 | dc7dfbd4c65ead2f41fd8986e7af87d7a8e0c52791764b4e824bb58f31bb8daa |
File details
Details for the file baddns-1.4.13-py3-none-any.whl
.
File metadata
- Download URL: baddns-1.4.13-py3-none-any.whl
- Upload date:
- Size: 96.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6b88239120cd160a51155ffbc0acb88cb9aed88918dfef43a36c8ebae3b82d2 |
|
MD5 | a066202dfb6451650037f15038f29d63 |
|
BLAKE2b-256 | f1a0948e44ed6d969a58acc7d81a99fe40e2a4d33bf1453dda51ccbc58b88591 |