> For the complete documentation index, see [llms.txt](https://eclipse-16.gitbook.io/eclipse-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eclipse-16.gitbook.io/eclipse-docs/hacking/network/reconnaissance.md). Agents can also search and read this documentation through its [MCP server](https://eclipse-16.gitbook.io/eclipse-docs/~gitbook/mcp).

# Reconnaissance

### Passive & Active Reconnaissance

**Passive and Active Reconnaissance**: **Passive** is the concept of collecting information or observing a target indirectly or not in person for a future plan. Example of that is going on the company's Linkedin and collecting the names of employees the company has listed on its page. **Active** is in person or directly such as going to a party to meet or see the CEO of the company of your target.

### WHOIS

**WHOIS** is a tool that shows domain registration details like owner, registrar, dates, and name servers. It’s mainly used to check who owns a domain, when it expires, or for investigation in security and business research. You can use it from the command line with `whois example.com` or through online lookup sites like ICANN. Some info may be hidden due to privacy protection, so results aren’t always complete.

### NSLOOKUP

**Nslookup** is a network tool used to query DNS servers. It helps find the IP address of a domain or the domain name of an IP. Commonly used for troubleshooting, it checks if a domain is resolving correctly, tests DNS records like A, MX, or CNAME, and verifies server configurations. To use it, type `nslookup domain.com` in the command line, or enter an IP to get the reverse lookup. It’s simple and effective for diagnosing DNS issues.

When querying the DNS record, you can select which one to target based on the list below:

{% code title="DNS Records" %}

```
A	IPv4 Addresses
AAAA	IPv6 Addresses
CNAME	Canonical Name
MX	Mail Servers
SOA	Start of Authority
TXT	TXT Records
```

{% endcode %}

Some examples of the commands:

{% code title="Record A Query " %}

```
user@TryHackMe$ nslookup -type=A tryhackme.com 1.1.1.1
Server:		1.1.1.1
Address:	1.1.1.1#53

Non-authoritative answer:
Name:	tryhackme.com
Address: 172.67.69.208
Name:	tryhackme.com
Address: 104.26.11.229
Name:	tryhackme.com
Address: 104.26.10.229
```

{% endcode %}

{% code title="Record MX Query" %}

```
user@TryHackMe$ nslookup -type=MX tryhackme.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
tryhackme.com	mail exchanger = 5 alt1.aspmx.l.google.com.
tryhackme.com	mail exchanger = 1 aspmx.l.google.com.
tryhackme.com	mail exchanger = 10 alt4.aspmx.l.google.com.
tryhackme.com	mail exchanger = 10 alt3.aspmx.l.google.com.
tryhackme.com	mail exchanger = 5 alt2.aspmx.l.google.com.
```

{% endcode %}

### DNSDumpster

DNSDumpster is an online reconnaissance tool used to gather information about a domain’s DNS infrastructure. It maps out records like subdomains, MX (mail), TXT, and NS (name servers), and can reveal associated IP addresses and hosting providers. Security professionals often use it for footprinting during penetration testing to see the attack surface of a target. To use it, go to **dnsdumpster.com**, enter a domain, and it will generate a report with records and a visual map of the domain’s DNS setup.

The link to their web app is: [**DNSDumpster**](https://dnsdumpster.com/)

The site also offers a graphical interface of how the records work that belong to the target as shown below in the image.

<figure><img src="https://2493433145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcZx9ewMBNMwhB0lVPMhm%2Fuploads%2F7cGnFSqKwTankaR4aKYb%2Fimage.png?alt=media&amp;token=9cd81f49-f851-49cf-9ef1-ce846d2c63e3" alt=""><figcaption></figcaption></figure>

### SHODAN.IO

Shodan.io is a search engine for internet-connected devices. Unlike Google, which indexes websites, Shodan scans and indexes devices such as servers, webcams, routers, industrial systems, and IoT devices. It shows details like IP address, open ports, services, and even software versions. Cybersecurity experts use it for vulnerability assessment, threat hunting, and exposure analysis. To use it, create an account at **shodan.io**, type in a domain, IP, or keyword, and it will display connected devices and their data.

The link to the web app is: [**shodan.io**](https://www.shodan.io/)

### Traceroute

Traceroute is a network diagnostic tool that shows the path data takes from your computer to a destination host. It lists each hop (router or server) along the route and measures the time packets take to reach them. This helps identify slow points, network delays, or where a connection is failing. On Linux/Mac, you use `traceroute domain.com`, and on Windows, `tracert domain.com`. It’s commonly used to troubleshoot connectivity issues and understand how traffic flows across networks.

{% code title="Traceroute Command on YouTube's Domain" %}

```
root@ip-127.0.0.1:/# traceroute youtube.com
traceroute to youtube.com (74.125.193.91), 30 hops max, 60 byte packets
 1  240.4.244.14 (240.4.244.14)  1.356 ms 240.4.244.12 (240.4.244.12)  0.978 ms 240.4.244.13 (240.4.244.13)  0.992 ms
 2  242.13.250.1 (242.13.250.1)  1.616 ms 242.13.251.7 (242.13.251.7)  1.518 ms 242.13.251.135 (242.13.251.135)  1.454 ms
 3  * * *
 4  * * *
 5  * * *
 6  209.85.244.230 (209.85.244.230)  0.992 ms 209.85.243.216 (209.85.243.216)  0.618 ms 172.253.51.60 (172.253.51.60)  1.036 ms
 7  192.178.107.94 (192.178.107.94)  1.115 ms 192.178.109.4 (192.178.109.4)  1.501 ms 192.178.109.20 (192.178.109.20)  0.872 ms
 8  74.125.253.185 (74.125.253.185)  0.985 ms 172.253.70.119 (172.253.70.119)  1.590 ms 72.14.236.167 (72.14.236.167)  1.620 ms
 9  172.253.71.170 (172.253.71.170)  0.748 ms 209.85.143.234 (209.85.143.234)  1.313 ms 172.253.71.170 (172.253.71.170)  16.946 ms
10  209.85.240.77 (209.85.240.77)  0.714 ms 172.253.66.53 (172.253.66.53)  0.615 ms 209.85.255.187 (209.85.255.187)  1.870 ms

```

{% endcode %}

### Nmap Scan

Nmap supports different types of TCP port scans. To understand the difference between these port scans, we need to review the TCP header. The TCP header is the first 24 bytes of a TCP segment. The following figure shows the TCP header as defined in [RFC 793](https://datatracker.ietf.org/doc/html/rfc793.html). This figure looks sophisticated at first; however, it is pretty simple to understand. In the first row, we have the source TCP port number and the destination port number. We can see that the port number is allocated 16 bits (2 bytes). In the second and third rows, we have the sequence number and the acknowledgement number. Each row has 32 bits (4 bytes) allocated, with six rows total, making up 24 bytes.

<figure><img src="https://2493433145-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcZx9ewMBNMwhB0lVPMhm%2Fuploads%2Fsslkynupi2ca6XCm07Ub%2F79ca8e4acbd573a27cee413cde927769.png?alt=media&amp;token=e76ad61f-698b-4ad8-a17c-8f3457d6e0e6" alt=""><figcaption></figcaption></figure>

The requests will contain one of these TCP flags:

* **URG**: Marks data as urgent; process immediately.
* **ACK**: Acknowledges received data.
* **PSH**: Push data to the application right away.
* **RST**: Reset/close a connection (often by firewall or if no service responds).
* **SYN**: Start a 3-way handshake, sync sequence numbers.
* **FIN**: Sender finished sending data.
