Protocols and Servers

Overview

This room explains how several common application protocols work at a practical level: Telnet, HTTP, FTP, SMTP, POP3, and IMAP. The focus is understanding what these services do, how a client talks to them, and why cleartext protocols are risky from a security perspective.

Core idea: if you understand how a protocol normally behaves, you can recognize weak defaults, insecure usage, and useful enumeration opportunities much faster.

1) Telnet

Telnet is an application-layer protocol for remote terminal access over TCP port 23.

telnet MACHINE_IP

Security problem: anyone who can capture the traffic can recover usernames, passwords, and session content. SSH replaced Telnet for secure remote administration.

2) HTTP

HTTP is the protocol behind the web. Browsers use it to request pages, images, scripts, and submit forms. By default it listens on TCP port 80.

telnet MACHINE_IP 80
GET / HTTP/1.1
host: telnet

This can reveal useful server information such as:

Server: nginx/1.18.0 (Ubuntu)

PT1 relevance: this is basic banner grabbing and protocol interaction. HTTP is cleartext unless TLS is added, in which case it becomes HTTPS on port 443.

3) FTP

FTP is used for file transfer and listens on TCP port 21 for its control connection.

telnet MACHINE_IP 21
USER frank
PASS password

Security problem: credentials and traffic are cleartext. This makes FTP easy to sniff and a common source of weak authentication exposure.

4) SMTP

SMTP is used to send email between clients and mail servers or between mail servers themselves. It usually listens on TCP port 25.

telnet MACHINE_IP 25
helo telnet
mail from:
rcpt to:
data

SMTP is used by:

Practical value: SMTP banners and supported commands can reveal hostnames, mail software, TLS support, and occasionally user-enumeration opportunities depending on configuration.

5) POP3

POP3 is used by mail clients to download messages from a Mail Delivery Agent and usually listens on TCP port 110.

telnet MACHINE_IP 110
USER frank
PASS password
STAT
LIST
RETR 1

Security problem: POP3 in this form is cleartext, so login credentials and message content can be exposed in transit.

6) IMAP

IMAP is a more advanced mail retrieval protocol than POP3 and usually listens on TCP port 143.

telnet MACHINE_IP 143
c1 LOGIN frank password
c2 LIST "" "*"
c3 EXAMINE INBOX

Security problem: like the others in this room, baseline IMAP traffic here is shown in cleartext. That means credentials and mailbox commands are visible to packet capture.

7) Why These Protocols Matter

These services matter in security work because they are common, easy to fingerprint, and often reveal useful operational details.

Default Ports Cheat Sheet

Telnet  23/tcp
FTP     21/tcp
SMTP    25/tcp
HTTP    80/tcp
POP3    110/tcp
IMAP    143/tcp

Exam Notes (PT1)