Перейти к основному содержимому
Network Security Fundamentals & Protocol Weaknesses
Урок 1 из 12

Network Security Fundamentals & Protocol Weaknesses

Learn how network protocols layer data, why legacy cleartext protocols leak credentials and payloads, and how to detect and replace weak transport designs.

Средний 22 мин Сети
Этого урока пока нет на выбранном языке — показана версия на другом языке. Перевод готовится.
Только в разрешённой среде — Описанные здесь приёмы применяются только в учебных лабораториях и в системах, которые принадлежат вам или на которые есть письменное разрешение.

Цели обучения

  • Explain how protocol encapsulation separates transport headers from application payloads
  • Identify cleartext and weakly authenticated protocols such as FTP, Telnet, and HTTP in traffic captures
  • Extract exposed credentials or files from a cleartext packet capture in an authorised lab
  • Recommend current encrypted replacements and defensive controls for legacy network services

#Why this matters

Every login, file transfer, and administrative command crosses switches, routers, or wireless links shared with other systems. Many classic network protocols were designed when networks were small and trusted, so they transmit commands, usernames, passwords, and file contents without encryption or integrity verification.

When a protocol lacks confidentiality and authentication, anyone positioned on the network path can passively read sensitive traffic or alter messages in flight. Understanding why protocols expose data and how to spot those weaknesses in packet captures helps both defenders harden services and analysts investigate incidents.

#Layered traffic and encapsulation

Network communication relies on a stack of protocols where each layer solves one problem and wraps the layer above it. An HTTP request sits inside a TCP segment, which sits inside an IP packet, which rides inside an Ethernet frame.

  1. 7ApplicationHTTP, FTP, Telnet, DNS, TLS
  2. 4TransportTCP (ports, streams), UDP (datagrams)
  3. 3NetworkIPv4, IPv6 (host routing)
  4. 2Data LinkEthernet, Wi-Fi (MAC frames)

Because encapsulation keeps headers distinct, lower layers remain visible even when upper layers are protected. When TLS 1.3 encrypts HTTP, an observer still sees source and destination IP addresses, TCP ports, and handshake metadata, while the application payload remains unreadable. When a protocol uses no encryption, every layer from Ethernet up to the application message is exposed in plaintext.

#Why legacy protocols leak data and trust

Legacy protocols fail in three recurring ways: missing confidentiality, missing integrity, and weak origin authentication.

Legacy protocol Default port Weakness observed on the wire Modern replacement
Telnet TCP/23 Keystrokes, usernames, and passwords sent in cleartext SSHv2 (TCP/22)
FTP TCP/21, 20 Cleartext USER/PASS commands and unencrypted file transfers SFTP (over SSH) or FTPS
HTTP TCP/80 Unencrypted URLs, cookies, tokens, and form bodies HTTPS with TLS 1.3 (TCP/443)
DNS UDP/TCP 53 Domain lookups visible to any path observer DoH or DoT
SMBv1 TCP/445 Unencrypted file shares and deprecated dialect flaws SMBv3 with encryption

Consider a standard FTP login against a lab server at 192.0.2.10. Because FTP separates commands from data but encrypts neither by default, every credential character travels directly in the TCP payload:

Cleartext FTP authentication on TCP port 21Cleartext FTP authentication on TCP port 21ClientServerUSER trainee331 Please specify the password.PASS LabPass2026!230 Login successful.Any passive capture on the path reads both username and password

A common misconception is that encoding equals encryption. HTTP Basic Authentication sends Authorization: Basic dHJhaW5lZTpMYWJQYXNz, which looks scrambled at first glance. It is only Base64 encoding, and any decoder reverses it in one step without a secret key.

Protocols without cryptographic authentication also suffer from spoofing and tampering. Unencrypted DNS replies, ARP messages, and cleartext HTTP responses carry no digital signature or message authentication code, so a host cannot verify whether a packet came from the real server or was modified on the wire.

#Spotting weak protocols in a capture

Analysts use Wireshark or its command-line companion tshark to locate cleartext services inside a packet capture (.pcap or .pcapng). It helps to distinguish two filter types:

  • Capture filters use Berkeley Packet Filter (BPF) syntax such as tcp port 21 or tcp port 80 to decide which packets are recorded to disk.
  • Display filters use Wireshark field syntax such as ftp || telnet || http.request to search inside an already captured file.
Filtering cleartext login and web requests in a lab capture
$ tshark -r lab_cleartext.pcapng -Y "ftp.request.command == \"USER\" || ftp.request.command == \"PASS\" || http.authorization"
   14   0.412018 10.10.10.25 -> 192.0.2.10  FTP 72 Request: USER trainee
   16   0.415890 10.10.10.25 -> 192.0.2.10  FTP 78 Request: PASS LabPass2026!
   42   1.904312 10.10.10.25 -> 192.0.2.20  HTTP 214 GET /portal/ HTTP/1.1 , Basic dHJhaW5lZTpMYWJQYXNz
$ printf 'dHJhaW5lZTpMYWJQYXNz' | base64 -d
trainee:LabPass

Looking at specific protocol fields avoids guessing. The http.authorization filter immediately isolates requests carrying Authorization headers, while ftp.request.command surfaces login commands without printing thousands of unrelated data frames.

#Defending against protocol weaknesses

Securing network communications requires removing trust in unencrypted links rather than hiding services on internal subnets:

  • Enforce modern encrypted protocols: Use TLS 1.3 for web and API services, SSHv2 for remote administration, SFTP/FTPS for file transfers, and SMBv3 encryption for file shares.
  • Disable legacy versions and weak ciphers: Turn off SSLv3, TLS 1.0, TLS 1.1, and SMBv1 so clients cannot be downgraded to weak handshakes.
  • Verify server identity: Require valid TLS certificates and SSH host-key verification so spoofing fails even on untrusted networks.
  • Monitor for cleartext fallback: Alert on unexpected traffic over ports 21, 23, and 80 in internal telemetry.

Common mistakes include treating Base64 or proprietary obfuscation as encryption, migrating a login page to HTTPS while leaving session cookies without the Secure attribute, and forgetting that cleartext traffic on non-standard ports (such as HTTP on TCP/8080) still exposes credentials.

#Summary

Network protocols wrap upper-layer messages in lower-layer headers, leaving unencrypted application payloads readable to passive observers. Legacy services such as Telnet, FTP, and HTTP leak credentials, session tokens, and files, and lack cryptographic integrity against tampering. Analysts spot these flaws quickly using Wireshark and tshark display filters before hardening transport with TLS 1.3, SSHv2, SFTP, and strict downgrade prevention.

Проверка знаний

Войдите, чтобы проходить тест, завершать уроки и сохранять прогресс. Войти в систему

Практика: проверьте свои знания