# 23 - Pentesting Telnet

## **Basic Information**

Telnet is a network protocol that gives users a UNsecure way to access a computer over a network.

**Default port:** 23

```
23/tcp open  telnet
```

## **Enumeration**

### **Banner Grabbing**

```bash
nc -vn <IP> 23
```

All the interesting enumeration can be performed by **nmap**:

```bash
nmap -n -sV -Pn --script "*telnet* and safe" -p 23 <IP>
```

The script `telnet-ntlm-info.nse` will obtain NTLM info (Windows versions).

In the TELNET Protocol are various "**options**" that will be sanctioned and may be used with the "**DO, DON'T, WILL, WON'T**" structure to allow a user and server to agree to use a more elaborate (or perhaps just different) set of conventions for their TELNET connection. Such options could include changing the character set, the echo mode, etc. (From the [telnet RFC](https://tools.ietf.org/html/rfc854))\
**I know it is possible to enumerate this options but I don't know how, so let me know if know how.**

### \*\*\*\*[Brute force](/githubimport/brute-force.md#telnet)

## Config file

```bash
/etc/inetd.conf
/etc/xinetd.d/telnet
/etc/xinetd.d/stelnet
```


---

# 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://chinnidiwakar.gitbook.io/githubimport/pentesting/pentesting-telnet.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.
