# Host Scanning

### Nmap

```bash
# -Pn: Skip host discovery
# --open: Show only open ports
# -vvv: Verbose
nmap -p- -Pn --open -vvv 10.10.10.100

# -sC: Runs Nmap default scripts
# -sV: Service Discovery and gets Service Versions
sudo nmap -p 22,80 -sC -sV 10.10.10.100

# -sU: Scans UDP Ports
# --reason: Mentions reason why it thinks this port is open
# --version-intensity: Controls how aggressively Nmap tries version detection (0 is low)
# --min-rate: Forces Nmap to send at least 1300 packets per second (speeds scanning)
# --max-retries: Limits retransmissions to 1 retry (default is 10)
# -top-ports: Scans the top 1000 most common ports (based on frequency data)
nmap -sU -sV -Pn -vv --reason --version-intensity 0 --min-rate 1300 --max-retries 1 -top-ports 1000 10.10.10.100

# Provide a list of potential vulnerabilities (https://nmap.org/nsedoc/categories/vuln.html)
nmap -p22,25,80,445 -script=vuln 10.10.10.100

# Typical Scan to run once you pivoted and have access to internal AD machines
nmap -p- -T4 -v 10.10.10.100 -oN nmap/internal_host_1.log
nmap -Pn -v -p- -sC -sV --open 10.10.10.100 -oN nmap/internal_host_2.log
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gokulkarthik.gitbook.io/pentesting-checklist/reconnaissance/host-scanning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
