Some of the how-to on recon by Null-Byte

Recon-ng

Recong-ng gives information about IP space, locations, users, emails, and more. You can connect different API keys with recon-ng (such as IP info DB). It will also search information about the company in google, bing, and baidu. It can brute-force subdomains, resolve domain names to IP (and vice versa), and even make a nice looking HTML report of all gathered data.

Example (by default, no modulees are installed, so we gotta install them first):

marketplace install hackertarget
modules load hackertarget
show options
options set SOURCE domain.com
info
input
run

To see all modules:

show modules

To get the info (e.g., hosts) after you ran the modules:

show hosts

Discover Scripts

Discover Scripts is a set of tools for passive OSINT. The tools include dnsrecon, goofile, goog-mail, goohost, theharvester, metasploit, urlcrazy, whois, dnssy, ewhois, myipneighbor, and urlvoid.

Subdomain Enumeration

Searching GitHub history

DNS Recon

CNAME - alias, used to tie many names to a single IP. An IP address can have multiple CNAME records associated with it. A - used to translate a domain or subdomain name to a 32-bit IP address. It can also store additional useful information. MX - ties a domain name to associated mail servers.

A website to perform all kinds of lookups online: ViewDNS

nslookup

$ nslookup domain.com
$ nslookup domain.com 8.8.8.8
$ nslookup -type=ns domain.com 8.8.8.8

Save the output to the file:

$ nslookup -type=ns domain.com 8.8.8.8 > nslookup.txt
$ nslookup domain.com >> nslookup.txt

Domain Information Groper (DIG)

Online public version of DIG

$ dig domain.com
$ dig domain.com any

The fun part: zone transfers and Bind version

$ dig axfr @ns1.domain.com domain.com
$ dig +nocmd +noall +answer VERSION.BIND @ns1.domain.com domain.com

Reverse DNS lookup

$ dig +nocmd +noall +answer -x 192.168.0.1

DNS Brute-Forcing

$ fierce --domain example.com
$ fierce --domain example.com --subdomain-file ourOwnWordList.txt
$ fierce --domain example.com --wide
$ perl blindcrawl.pl -d domain.com
$ python gxfr.py --bxfr --dns-lookup -o domain.com

Crawling through IP space to get DNS names:

$ ipcrawl 148.87.1.1 148.87.1.254 #oracle

whois

Top registrars

$ whois domain.com
Using a specific registrar
$ whois -h whois.apnic.net domain.com

Shodan

Shodan Filters:

Example:

Census, ARIN, and pastebin dumps

HTTP banner

$ nc domain.com 80

Google Hacking

Load-Balancing and IPS Detection

Try to do DIG on google.com and notice how many IP addresses are returned. More than one, right? This is because there is a load balancer that balances input traffic.

Proxies

As an example, a tool that helps find free proxies: https://github.com/constverum/ProxyBroker

Email/Subdomain/Names/Banners Harvesting

TheHarvester: $ theharvester -d domain.com -l 50 -b google {linkedin | pgp | all}

Tor and Privacy

Running Tor browser on Kali the proper way

How to find active onion sites to access using Tor

To use Kali commands through Tor, you have to run them through proxychains tool: $ proxychains nmap -sT -p80 IP_ADDR

Privacy Tools