Passive Reconnaissance
🔍 Passive Reconnaissance with Whois, Nslookup, Dig, DNSDumpster, and Shodan.io
In the world of cybersecurity and ethical hacking, passive reconnaissance is one of the first steps in gathering information about a target—without ever interacting with the systems directly. In this blog post, we’ll walk through powerful command-line tools and online services used for passive information gathering:
🧰 Tools Covered in This Blog:
-
whois -
nslookup -
dig -
DNSDumpster
-
Shodan.io
🗂️ 1. WHOIS Lookup
The WHOIS protocol provides essential domain registration data, such as:
-
Domain owner's contact info
-
Registration and expiration dates
-
DNS name servers
Command:
This helps uncover registrar details, admin contact info, and DNS servers associated with the domain.
🌐 2. DNS Lookups with nslookup
nslookup (Name Server Lookup) is a tool for querying DNS to obtain domain name or IP address mapping.
📌 Usage Patterns:
🔍 Types of DNS Records:
| Type | Description |
|---|---|
| A | IPv4 address |
| AAAA | IPv6 address |
| MX | Mail servers |
| TXT | Text info (e.g., SPF) |
| SOA | Start of Authority |
| CNAME | Canonical name (alias) |
💻 3. Advanced Queries with dig (Domain Information Groper)
While nslookup is straightforward, dig provides more detailed and customizable DNS queries.
📌 Basic Examples:
📌 Using a Specific DNS Server:
dig also shows:
-
TTL (Time To Live)
-
Authoritative answer flags
-
Server details
🧠 4. Discover Hidden Subdomains with DNSDumpster
Most tools like dig and nslookup won't help you discover subdomains unless you already know them.
🔎 What is DNSDumpster?
DNSDumpster is a free online tool that reveals:
-
Subdomains (e.g.,
wiki.tryhackme.com,blog.tryhackme.com) -
DNS servers
-
MX records
-
TXT records
-
IP addresses and geolocation
-
Visual DNS maps (graph view)
Use Case: Find forgotten or unmaintained subdomains that may be vulnerable or misconfigured—a goldmine for penetration testers.
🌍 5. Exposed Devices Search with Shodan.io
Shodan.io is a search engine for internet-connected devices. Instead of websites, it indexes:
-
Servers
-
Routers
-
Cameras
-
IoT devices
-
Industrial systems
-
...and much more.
🔍 What Can You Learn?
-
IP address
-
Hosting provider
-
Device location
-
Open ports
-
Software versions
-
SSL certificates
-
CVEs (known vulnerabilities)
📌 Example Queries:
Pro Tip: Search by IP addresses you got from nslookup or dig.
📌 Summary Table of Commands
| Purpose | Command |
|---|---|
| WHOIS info | whois tryhackme.com |
A record (IPv4) via nslookup | nslookup -type=A tryhackme.com |
MX record via nslookup with server | nslookup -type=MX tryhackme.com 1.1.1.1 |
TXT record via nslookup | nslookup -type=TXT tryhackme.com |
A record via dig | dig tryhackme.com A |
MX record via dig with DNS server | dig @1.1.1.1 tryhackme.com MX |
TXT record via dig | dig tryhackme.com TXT |
🧠 Final Thoughts
Passive reconnaissance is crucial in penetration testing. Using tools like:
-
whoisfor registrar info, -
nslookup/digfor DNS records, -
DNSDumpster for subdomain mapping, and
-
Shodan.io for finding open services—
...you can gather critical information without even touching the target's infrastructure directly.
Mastering these tools will give you a powerful edge during reconnaissance, both as an attacker and as a defender.


Comments
Post a Comment