> For the complete documentation index, see [llms.txt](https://book.ice-wzl.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.ice-wzl.xyz/recon-enumeration/banner-grabbing.md).

# Banner Grabbing

## Telnet Banner Grab

```
telnet 10.10.182.147 80
GET / HTTP/1.0
host: telnet
```

```
GET / HTTP/1.1
host: telnet
```

![telnet banner grab](https://user-images.githubusercontent.com/75596877/138183428-3c6b4c51-f1c4-4c48-9038-f252f6110a70.png)

## NetCat Banner Grab

```
nc 10.10.182.147
GET / HTTP/1.1
host: netcat
```

**When Nmap -sV truncates or omits banner detail:** Connect manually with `nc` and capture with `tcpdump`. The full banner often arrives in a **PSH-ACK** segment (`Flags [P.]`) that Nmap may not display.

```bash
# Terminal 1: capture traffic between you and target
sudo tcpdump -i eth0 host 10.10.14.2 and 10.129.2.28

# Terminal 2: connect to the service
nc -nv 10.129.2.28 25
```

In the tcpdump output, look for the `Flags [P.]` (PSH-ACK) line — it contains the full banner, e.g. `220 inlane ESMTP Postfix (Ubuntu)`.

```
GET / HTTP/1.0
host: netcat
```

### NetCat FTP Banner Grab

![nc ftp](https://user-images.githubusercontent.com/75596877/138183900-60957ad6-0460-44d9-b64a-14cbd2f6e4a1.png)

### Openssl banner grab

* Used when https is open on the host

```
openssl s_client -connect domain.com:443 
GET / HTTP/1.0
```

## HTTP Header Grabbing (curl)

```bash
# HTTP headers only (no body)
curl -I http://TARGET
curl -I https://TARGET

# Follow redirects
curl -IL http://TARGET
```

Look for:

* `Server:` - Web server software/version
* `X-Powered-By:` - Backend technology (PHP, Express, etc.)
* `X-Redirect-By:` - CMS (e.g., WordPress)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://book.ice-wzl.xyz/recon-enumeration/banner-grabbing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
