Recon resources
Posted in Cheatsheets on April 15, 2019
Posted in Cheatsheets on November 14, 2018
Hi, this is a cheat sheet for subdomains enumeration.
I will update it every time I find a new interesting tool or technique. So keep an eye on this page!
git clone https://github.com/infosec-au/altdns.git
cd altdns
pip install -r requirements.txt
Generate a list of altered subdomains: ./altdns.py -i known-subdomains.txt -o new_subdomains.txt
Generate a list of altered subdomains & resolve them: ./altdns.py -i known-subdomains.txt -o new_subdomains.txt -r -s resolved_subdomains.txt
Other options
-w wordlist.txt
: Use custom wordlist (default altdns/words.txt)-t 10
Number of threads-d $IP
: Use custom resolvergo get -u github.com/OWASP/Amass/...
amass -d target.com -o $outfile
amass.netnames -asn $asn
git clone https://github.com/yamakira/assets-from-spf.git
pip install click ipwhois
cd the-art-of-subdomain-enumeration; python assets_from_spf.py target.com
--asn
: Enable ASN enumerationaptitude install httrack
git clone https://github.com/sensepost/BiLE-suite.git
cd BiLE-suite; perl BiLE.pl target.com target
cat target.mine | grep -v "Link from" | cut -d':' -f2 | grep target.com | sort | uniq
site:target.com
site:target.com -site:www.target.com
pip install censys
git clone https://github.com/appsecco/the-art-of-subdomain-enumeration.git
cd the-art-of-subdomain-enumeration; python censys_enumeration.py target.com
pip install censys
git clone https://github.com/appsecco/the-art-of-subdomain-enumeration.git
the-art-of-subdomain-enumeration; python cloudflare_subdomain_enum.py [email protected] target.com
pip install psycopg2
git clone https://github.com/appsecco/the-art-of-subdomain-enumeration.git
cd python the-art-of-subdomain-enumeration; python crtsh_enum_psql.py target.com
pip install psycopg2
git clone https://github.com/appsecco/the-art-of-subdomain-enumeration.git
cd python the-art-of-subdomain-enumeration; python3 crtsh_enum_web.py target.com
git clone https://github.com/UnaPibaGeek/ctfr.git
cd ctfr
pip3 install -r requirements.txt
cd ctfr; python3 ctfr.py -d target.com -o $outfile
aptitude instal dnsutils
dig +multi AXFR target.com
dig +multi AXFR $ns_server target.com
git clone https://github.com/yamakira/domains-from-csp.git
pip install click
cd domains-from-csp; python csp_parser.py $URL
cd domains-from-csp; python csp_parser.py $URL -r
git clone https://github.com/rbsec/dnscan.git
cd dnscan
pip install -r requirements.txt
dnscan.py -d target.com -o outfile -w $wordlist
dnscan.py -l $domains_file -o outfile -w $wordlist
-i $file
: Output discovered IP addresses to a text file-r
: Recursively scan subdomains-T
: TLD expansionaptitude install dnsrecon
on Kali, or:git clone https://github.com/darkoperator/dnsrecon.git
cd dnsrecon
pip install -r requirements.txt
dnsrecon -d target.com -D wordlist.txt -t brt
dnsrecon -t snoop -D wordlist.txt -n 2.2.2.2
where 2.2.2.2 is the IP of the target’s NS server--threads 8
: Number of threads-n nsserver.com
: Use a custom name server--db
: SQLite 3 file--xml
: XML file--json
: JSON file--csv
: CSV filego get github.com/evilsocket/dnssearch
~/.profile
: export PATH=$PATH:/home/mima/go/bin/
dnssearch -domain target.com -wordlist $wordlist
-a bool
: Lookup A records (default true)-txt bool
: Lookup TXT records (default false)-cname bool
: Show CNAME records (default false)-consumers 10
: Number of threads (default 8)git clone https://github.com/cakinney/domained.git
cd domained
pip install -r ./ext/requirements.txt
python domained.py --install
python domained.py -d target.com
python domained.py -d target.com --quick
python domained.py -d target.com --b
python domained.py -d target.com -b --bruteall
--notify
: Send Pushover or Gmail notifications--noeyewitness
: No Eyewitness--fresh
: Delete old data from output folderfierce -dns target.com
git clone https://github.com/OJ/gobuster.git
cd gobuster/
go get && go build
go install
gobuster -m dns -u target.com -w $wordlist
-i
: Show IP addresses-t 50
: Number of threads (default 10)site:*.target.com
site:*.target.com -site:www.target.com -site:help.target.com
apt-get install python-dnspython
git clone https://github.com/guelfoweb/knock.git
cd knock
nano knockpy/config.json # <- set your virustotal API_KEY
python setup.py install
knockpy target.com
knockpy target.com -w $wordlist
knockpy -r target.com
or knockpy -r $ip
knockpy -c target.com
knockpy -j target.com
aptitude install ldnsutils
ldns-walk target.com
ldns-walk @nsserver.com target.com
git clone https://github.com/blechschmidt/massdns.git
cd massdns/
make
cd massdns; ./bin/massdns -r lists/resolvers.txt -t AAAA -w results.txt domains.txt -o S -w output.txt
./scripts/subbrute.py wordlist.txt target.com | ./bin/massdns -r lists/resolvers.txt -t A -o S -w output.txt
./scripts/ct.py target.com | ./bin/massdns -r lists/resolvers.txt -t A -o S -w output.txt
-s 5000
: Number of concurrent lookups (default 10000)-t A
(default), -t AAAA
, -t PTR
…: Type of DNS records to retrieve-o S -w output.txt
: Save output as simple text-o F
: Save output as full text-o J
: Save output as ndjsonwget https://dnscurve.org/nsec3walker-20101223.tar.gz
tar -xzf nsec3walker-20101223.tar.gz
cd nsec3walker-20101223
make
./collect target.com > target.com.collect
./unhash target.com.collect > target.com.unhash
cat target.com.unhash | grep "target" | wc -l
cat target.com.unhash | grep "target" | awk '{print $2;}'
aptitude install jq pigz
wget https://scans.io/data/rapid7/sonar.fdns_v2/20170417-fdns.json.gz
cat 20170417-fdns.json.gz | pigz -dc | grep ".target.org" | jq`
git clone https://github.com/appsecco/the-art-of-subdomain-enumeration.git
cd python the-art-of-subdomain-enumeration; ./san_subdomain_enum.py target.com
go get github.com/mhmdiaa/second-order
cp ~/go/src/github.com/mhmdiaa/second-order/config.json ~/go/src/github.com/mhmdiaa/second-order/config-subs-enum.json
~/go/src/github.com/mhmdiaa/second-order/config-subs-enum.json
to replace "LogCrawledURLs": false
with "LogCrawledURLs": true
second-order -base https://target.com -config config.json -output target.com
aptitude install python-dnspython
git clone https://github.com/TheRook/subbrute.git
./subbrute.py target.com
./subbrute.py target1.com target2.com
./subbrute.py -t domains.txt
./subbrute.py target.com > target.out
./subbrute.py -t target.out
-s wordlist.txt
: Use a custom subdomains wordlist-p
: Print data from DNS records-o outfile.txt
: Save output in Greppable format-j JSON
: Save output to JSON file-c 10
: Number of threads (default 8)-r resolvers.txt
: Use a custom list of DNS resolversgo get github.com/subfinder/subfinder
./subfinder --set-config VirustotalAPIKey=0x41414141
./subfinder -d target.com -o $outfile
subfinder -b -d target.com -w $wordlist -o $outfile
./subfinder --no-passive -d target.com -b -w $wordlist -o $outfie
-t 100
: Number of threads (default 10)-r 8.8.8.8,1.1.1.1
or -rL resolvers.txt
: Use custom resolvers-nW
: Exclude wildcard subdomains-recursive
: Use recursion-o $outfile -oJ
: JSON outputgit clone https://github.com/aboul3la/Sublist3r.git
cd Sublist3r
pip install -r requirements.txt
./sublist3r.py -d target.com -o $outfile
./sublist3r.py -b -d target.com -o $outfile
-p 80,443
: Show only subdomains which have open ports 80 and 443aptitude install theharvester
theharvester -d target.com -b all
-h output.html
: Save output to HTML file-f output.html
: Save output to HTML & XML files-t
: Also do TLD expansion discovery-c
: Also do subdomain bruteforce-n
: Also do a DNS reverse query on all ranges discoveredaptitude install php-curl
git clone https://github.com/gwen001/vhost-brute.git
php vhost-brute.php --ip=$ip --domain=target.com --wordlist=$outfile
--threads=5
: Maximum threads (default 1)--port
: Set port--ssl
: Force SSLgit clone https://github.com/jobertabma/virtual-host-discovery.git
cd virtual-host-discover; ruby scan.rb --ip=1.1.1.1 --host=target.com --output output.txt
--ssl=on
: Enable SSL--port 8080
: Use a custom port--wordlist wordlist.txt
: Use a custom wordlistgit clone https://github.com/appsecco/the-art-of-subdomain-enumeration.git
python virustotal_subdomain_enum.py target.com 40
Let me know if you have any comments, requests, questions… Feedback is always welcome.
See you next time!