2017-03-01 11:17:15 +00:00
# Domain Hunter
Authors Joe Vest (@joevest) & Andrew Chiles (@andrewchiles)
Domain name selection is an important aspect of preparation for penetration tests and especially Red Team engagements. Commonly, domains that were used previously for benign purposes and were properly categorized can be purchased for only a few dollars. Such domains can allow a team to bypass reputation based web filters and network egress restrictions for phishing and C2 related tasks.
2018-04-11 12:46:15 +00:00
This Python based tool was written to quickly query the Expireddomains.net search engine for expired/available domains with a previous history of use. It then optionally queries for domain reputation against services like Symantec WebPulse (BlueCoat), IBM X-Force, and Cisco Talos. The primary tool output is a timestamped HTML table style report.
2017-03-01 11:17:15 +00:00
2017-06-06 20:38:10 +00:00
## Changes
2018-04-11 12:46:15 +00:00
- 11 April 2018
+ Added OCR support for CAPTCHA solving with tesseract. Thanks to t94j0 for the idea in [AIRMASTER ](https://github.com/t94j0/AIRMASTER )
+ Added support for input file list of potential domains (-f/--filename)
+ Changed -q/--query switch to -k/--keyword to better match its purpose
+ Added additional error checking for ExpiredDomains.net parsing
- 9 April 2018
+ Added -t switch for timing control. -t < 1-5 >
+ Added Google SafeBrowsing and PhishTank reputation checks
+ Fixed bug in IBMXForce response parsing
- 7 April 2018
+ Fixed support for Symantec WebPulse Site Review (formerly Blue Coat WebFilter)
+ Added Cisco Talos Domain Reputation check
+ Added feature to perform a reputation check against a single non-expired domain. This is useful when monitoring reputation for domains used in ongoing campaigns and engagements.
- 6 June 2017
+ Added python 3 support
+ Code cleanup and bug fixes
+ Added Status column (Available, Make Offer, Price, Backorder, etc)
2017-06-06 20:38:10 +00:00
2017-03-01 11:17:15 +00:00
## Features
2018-04-09 11:21:35 +00:00
- Retrieve specified number of recently expired and deleted domains (.com, .net, .org primarily) from ExpiredDomains.net
- Retrieve available domains based on keyword search from ExpiredDomains.net
2018-04-11 12:46:15 +00:00
- Perform reputation checks against the Symantec WebPulse Site Review (BlueCoat), IBM x-Force, Cisco Talos, Google SafeBrowsing, and PhishTank services
2018-04-09 11:21:35 +00:00
- Sort results by domain age (if known)
2017-03-01 11:17:15 +00:00
- Text-based table and HTML report output with links to reputation sources and Archive.org entry
2018-04-11 12:46:15 +00:00
## Installation
2017-03-01 11:17:15 +00:00
2018-04-11 12:46:15 +00:00
Install Python requirements
2017-03-01 11:17:15 +00:00
2018-04-07 15:53:58 +00:00
pip3 install -r requirements.txt
2018-04-11 12:46:15 +00:00
Optional - Install additional OCR support dependencies
- Debian/Ubuntu: `apt-get install tesseract-ocr python3-imaging`
- MAC OSX: `brew install tesseract`
## Usage
2017-03-01 11:17:15 +00:00
List DomainHunter options
2018-04-07 15:53:58 +00:00
python3 domainhunter.py -h
usage: domainhunter.py [-h] [-q QUERY] [-c] [-r MAXRESULTS] [-s SINGLE]
[-w MAXWIDTH] [-v]
2017-03-01 11:17:15 +00:00
2018-04-07 15:53:58 +00:00
Finds expired domains, domain categorization, and Archive.org history to
2017-03-01 11:17:15 +00:00
determine good candidates for C2 and phishing domains
optional arguments:
-h, --help show this help message and exit
2018-04-11 12:46:15 +00:00
-k KEYWORD, --keyword KEYWORD
2018-04-09 11:21:35 +00:00
Keyword used to refine search results
-c, --check Perform domain reputation checks
2018-04-11 12:46:15 +00:00
-f FILENAME, --filename FILENAME
Specify input file of line delimited domain names to
check
--ocr Perform OCR on CAPTCHAs when present
2017-03-01 11:17:15 +00:00
-r MAXRESULTS, --maxresults MAXRESULTS
Number of results to return when querying latest
2018-04-09 11:21:35 +00:00
expired/deleted domains
2018-04-07 15:53:58 +00:00
-s SINGLE, --single SINGLE
2018-04-09 11:21:35 +00:00
Performs detailed reputation checks against a single
domain name/IP.
-t {0,1,2,3,4,5}, --timing {0,1,2,3,4,5}
Modifies request timing to avoid CAPTCHAs. Slowest(0)
= 90-120 seconds, Default(3) = 10-20 seconds,
Fastest(5) = no delay
2018-04-07 15:53:58 +00:00
-w MAXWIDTH, --maxwidth MAXWIDTH
Width of text table
2018-04-11 12:46:15 +00:00
-V, --version show program's version number and exit
2017-03-01 11:17:15 +00:00
Use defaults to check for most recent 100 domains and check reputation
python ./domainhunter.py
2018-04-07 15:53:58 +00:00
Search for 1000 most recently expired/deleted domains, but don't check reputation
2017-03-01 11:17:15 +00:00
2018-04-07 15:53:58 +00:00
python ./domainhunter.py -r 1000
2017-03-01 11:17:15 +00:00
2018-04-09 11:21:35 +00:00
Perform all reputation checks for a single domain
python3 ./domainhunter.py -s mydomain.com
[*] Downloading malware domain list from http://mirror1.malwaredomains.com/files/justdomains
2017-03-01 15:50:42 +00:00
2018-04-09 11:21:35 +00:00
[*] Fetching domain reputation for: mydomain.com
[*] Google SafeBrowsing and PhishTank: mydomain.com
[+] mydomain.com: No issues found
[*] BlueCoat: mydomain.com
[+] mydomain.com: Technology/Internet
[*] IBM xForce: mydomain.com
[+] mydomain.com: Communication Services, Software as a Service, Cloud, (Score: 1)
[*] Cisco Talos: mydomain.com
[+] mydomain.com: Web Hosting (Score: Neutral)
2017-03-01 15:50:42 +00:00
2018-04-11 12:46:15 +00:00
Perform all reputation checks for a list of domains at max speed with OCR of CAPTCHAs
python3 ./domainhunter.py -f < domainslist.txt > -t 5 --ocr
Search for available domains with keyword term of "dog", max results of 100, and check reputation
2017-03-01 11:17:15 +00:00
2018-04-11 12:46:15 +00:00
python3 ./domainhunter.py -k dog -r 100 -c
2017-03-01 11:17:15 +00:00
____ ___ __ __ _ ___ _ _ _ _ _ _ _ _ _____ _____ ____
| _ \ / _ \| \/ | / \ |_ _| \ | | | | | | | | | \ | |_ _| ____ | _ \
| | | | | | | |\/| | / _ \ | || \| | | |_ | | | | | \| | | | | _| | |_ ) |
| |_| | |_| | | | |/ ___ \ | || |\ | | _ | |_| | |\ | | | | |___ | _ <
|____/ \___/|_| |_/_/ \_\___|_| \_| |_| |_|\___/|_| \_| |_| |_____|_| \_\
2017-03-01 13:20:52 +00:00
Expired Domains Reputation Checker
2017-03-01 11:17:15 +00:00
DISCLAIMER:
This is for educational purposes only!
It is designed to promote education and the improvement of computer/cyber security.
The authors or employers are not liable for any illegal act or misuse performed by any user of this tool.
If you plan to use this content for illegal purpose, don't. Have a nice day :)
Estimated Max Run Time: 33 minutes
[*] Downloading malware domain list from http://mirror1.malwaredomains.com/files/justdomains
[*] Fetching expired or deleted domains containing "dog"...
[*] https://www.expireddomains.net/domain-name-search/?q=dog
[*] BlueCoat Check: Dog.org.au
[+] Dog.org.au is categorized as: Uncategorized
[*] IBM xForce Check: Dog.org.au
[+] Dog.org.au is categorized as: Not found.
[*] BlueCoat Check: Dog.asia
[+] Dog.asia is categorized as: Uncategorized
[*] IBM xForce Check: Dog.asia
[+] Dog.asia is categorized as: Not found.
[*] BlueCoat Check: HomeDog.net
[+] HomeDog.net is categorized as: Uncategorized
[*] IBM xForce Check: HomeDog.net
[+] HomeDog.net is categorized as: Not found.
[*] BlueCoat Check: PolyDogs.com
[+] PolyDogs.com is categorized as: Uncategorized
[*] IBM xForce Check: PolyDogs.com
[+] PolyDogs.com is categorized as: Not found.
[*] BlueCoat Check: SaltyDog.it
[+] SaltyDog.it is categorized as: Uncategorized
[*] IBM xForce Check: SaltyDog.it
[+] SaltyDog.it is categorized as: Not found.
[*] https://www.expireddomains.net/domain-name-search/?start=25& q=dog
[*] BlueCoat Check: FetchDoggieStore.com
[+] FetchDoggieStore.com is categorized as: Society/Daily Living
[*] IBM xForce Check: FetchDoggieStore.com
2017-03-01 13:20:52 +00:00
[+] FetchDoggieStore.com is categorized as: {u'General Business': True}
## Report Header Reference
- Domain: Target Domain
- Birth: First seen on Archive.org
2017-03-03 09:54:53 +00:00
- Entries: Number of entries in Archive.org
2017-03-01 13:20:52 +00:00
- TLDs Available: Top level top available
- Bluecoat Categorization: Bluecoat category
- IBM-xForce Categorization: IBM-xForce category
- WatchGuard: Watchguard reputation
- Namecheap: Link to namecheap.com
- Archive.org: Link to archive.org