Skip to content
Pwnversity
NET-PROTOCOLOSintermediate · 13 min · upd. 2026-11

Weaknesses in service protocols

T1190T1078T1110T1557

Every network service fails in three different ways, and it pays to keep them apart because they are tested and fixed differently. Design flaws: the protocol never encrypted or authenticated (Telnet, FTP, SNMPv1/v2c, Modbus) and no patch is possible, only replacement. Configuration flaws: the software is sound, but it is installed with default credentials, anonymous access or listening on every interface (Redis, MongoDB, NFS, SMB with null sessions). Implementation flaws: a specific CVE in a specific version (EternalBlue, BlueKeep, regreSSHion, RediShell). Enumeration tells you what is there; this page tells you what is usually wrong with each thing.

flowchart LR
    S["Exposed service"] --> D["Design<br/>cleartext / no auth"]
    S --> C["Configuration<br/>defaults / anonymous"]
    S --> I["Implementation<br/>CVE by version"]
    D --> R["Replace"]
    C --> R2["Configure"]
    I --> R3["Patch"]

On an authorized engagement the order follows the least risk for the client: first what can be checked without credentials and without exploiting (anonymous access, versions, encryption), then credentials (with the lockout policy in hand, see spraying), and only at the end the exploitation of a CVE, with explicit authorization for that host, because many service exploits are memory corruption and can knock it over. A cleartext service on an internal network is a finding even if nothing is ever captured: the evidence is a capture of your own login, not someone else’s.

Class Example How it is demonstrated How it is fixed
Design Telnet, FTP, POP3/IMAP without TLS, SNMP v1/v2c, a panel over HTTP, LLMNR capture of your own session with tcpdump/Wireshark (see sniffing) replace with the encrypted version (SSH, SFTP/FTPS, SNMPv3, TLS) or switch off
Configuration Redis without requirepass, MongoDB without auth, NFS to *, SMB with null session, sa without password connection without credentials and one harmless read (INFO, listDatabases, showmount) enable authentication, bind to the internal interface, ACLs
Implementation MS17-010, CVE-2019-0708, CVE-2024-6387, CVE-2025-49844 banner version + non-destructive check (NSE vuln, vendor script) patch; mitigate meanwhile (disable the feature, filter)

The protocol with the longest history of critical implementation flaws and the most valuable one on Windows networks, because it carries NTLM authentication and gives access to files and RPC.

  • Design and version: SMBv1 (no mandatory signing, no encryption, vulnerable to MS17-010) has been disabled by default since Windows 10 and its service was removed in later releases; any SMB1: True in nxc output is a finding.
  • Signing: without mandatory SMB signing, traffic can be relayed (see NTLM relay). Since Windows 11 24H2 and Server 2025, signing is required by default on the client, and NTLMv1 has been removed from both.
  • Configuration: null sessions, shares with Everyone, SYSVOL with passwords in GPP (see GPP).
  • Live CVEs: MS17-010 (EternalBlue, CVE-2017-0144) still shows up on industrial and healthcare networks; CVE-2020-0796 (SMBGhost) on unpatched Windows 10 1903/1909.
Ventana de terminal
nxc smb 10.0.0.0/24 # OS, signing, SMBv1 per host
nmap --script smb-protocols,smb2-security-mode -p 445 10.0.0.5
nmap --script smb-vuln-ms17-010 -p 445 10.0.0.5 # safe check, does not exploit

A well-designed protocol; the flaws are configuration (passwords, old algorithms, reused keys) and, now and then, implementation.

  • Algorithms: ssh-audit lists weak ciphers, MACs and kex. Terrapin (CVE-2023-48795, Dec 2023) lets a man-in-the-middle truncate messages at the start of the session and downgrade the negotiated security when chacha20-poly1305@openssh.com or CBC ciphers with -etm are in use; the strict kex countermeasure must be on both ends.
  • regreSSHion (CVE-2024-6387, Jul 2024): race condition in sshd that allows unauthenticated remote code execution as root; affects portable OpenSSH 8.5p1–9.7p1 on glibc Linux, fixed in 9.8 (Jul 1, 2024). Winning the race takes hours and is unreliable, but the version in the banner is enough for the finding.
  • Configuration: PermitRootLogin yes, PasswordAuthentication yes with weak passwords, authorized_keys with keys of former employees, AllowAgentForwarding on jump hosts (agent hijacking).
  • User enumeration: CVE-2018-15473 (OpenSSH < 7.7) by timing difference.
Ventana de terminal
ssh-audit 10.0.0.5 # algorithms and known CVEs by version
nmap --script ssh2-enum-algos,ssh-auth-methods -p 22 10.0.0.5

FTP (21), Telnet (23), POP3/IMAP (110/143)

Section titled “FTP (21), Telnet (23), POP3/IMAP (110/143)”

Design flaws: credentials and data in the clear. Anonymous FTP access is a configuration flaw and is still common on file-exchange servers shared with customers.

  • FTP: anonymous with listing and, worse, with write access; if the directory is the webroot of a web server, uploading an executable file is RCE (see file upload). FTP bounce (nmap -b) on very old servers.
  • Telnet: on network gear and embedded systems with factory credentials; its mere presence on a corporate network is a finding.
  • POP3/IMAP without TLS: the mail client sends USER/PASS or LOGIN in the clear; an optional STARTTLS is useless if the client does not require it.
Ventana de terminal
nmap --script ftp-anon,ftp-syst -p 21 10.0.0.5
openssl s_client -starttls imap -connect 10.0.0.5:143 </dev/null | head # is there STARTTLS?

v1 and v2c do not encrypt and the community travels in the clear; v3 encrypts and authenticates. The flaw is design in v1/v2c and configuration when the community is public/private or exposed to the user network. With private (write) configuration can be changed; on Cisco, the CISCO-CONFIG-COPY MIB allows dumping the whole configuration to a TFTP server of your own.

Ventana de terminal
onesixtyone -c wordlist.txt 10.0.0.0/24 # communities by brute force (UDP, fast)
snmpwalk -v2c -c public 10.0.0.5 1.3.6.1.2.1.1 # system; if it answers, so does the rest of the MIB
  • Open relay (configuration): the server accepts RCPT TO for foreign domains from outside; useful for phishing with the company’s sender. nmap --script smtp-open-relay.
  • User enumeration (design/configuration): VRFY, EXPN, RCPT TO with different replies for valid and invalid users.
  • No TLS (STARTTLS missing): AUTH LOGIN credentials in the clear.
  • No SPF/DKIM/DMARC on the domain: not a server flaw, but checked on the same engagement (see phishing).
  • NLA disabled (configuration): the server shows the login screen before authenticating, exposes version and user, and is the precondition for BlueKeep.
  • BlueKeep (CVE-2019-0708): unauthenticated RCE on unpatched Windows 7/2008/2008 R2; the public exploit is unstable (BSOD), so on an engagement it is demonstrated with the Nmap or Metasploit check, not with the exploit.
  • Self-signed certificate: allows a man-in-the-middle with seth/pyrdp on networks where users click through the warning (see MITM).
  • Passwords: Internet-exposed RDP with local users is the most common ransomware entry vector through brute force.
Ventana de terminal
nmap --script rdp-ntlm-info,rdp-enum-encryption -p 3389 10.0.0.5 # NLA, version, hostname
nmap --script rdp-vuln-ms12-020 -p 3389 10.0.0.5

Almost everything is configuration: listening on 0.0.0.0 without authentication, or with the default administration account.

Service Typical flaw Harmless check Consequence
Redis (6379) no requirepass/ACL, bind 0.0.0.0, protected mode disabled redis-cli -h H INFO server read and write keys; CONFIG SET dir writes arbitrary files; RediShell (CVE-2025-49844, Oct 2025, CVSS 9.9) escapes the Lua sandbox with authenticated access (or none, if there is no auth)
MongoDB (27017) no authentication (old versions listened on all interfaces) mongosh --host H --eval 'db.adminCommand("listDatabases")' full dump; MongoBleed (CVE-2025-14847, Dec 2025) reads server memory without authentication on 3.6–8.2.2, actively exploited and in CISA’s KEV catalog
MySQL/MariaDB (3306) root without password, root@'%' mysql -h H -u root -e 'SELECT VERSION()' read files (LOAD DATA LOCAL), write (INTO OUTFILE) if secure_file_priv allows it
PostgreSQL (5432) trust for postgres in pg_hba.conf psql -h H -U postgres -c 'SELECT version()' COPY ... TO PROGRAM runs commands as the service user
MSSQL (1433) sa with a weak password; mixed authentication nxc mssql H -u sa -p '' --local-auth xp_cmdshell, linked servers, hash theft via UNC (see MSSQL)
Elasticsearch (9200) no authentication by default on versions < 8 curl H:9200/_cat/indices read every index

Redis only enters protected mode (answers loopback only) when it starts with the default configuration, with no bind and no password; as soon as the administrator sets bind 0.0.0.0 without requirepass, it is open. Censys counted around 39,000 unauthenticated Redis instances exposed to the Internet in 2022.

  1. For each service, classify the flaw: design, configuration or implementation. That decides the test and the report’s recommendation.
  2. Design: capture your own session (tcpdump -i eth0 port 23 -A) as evidence; do not capture other people’s traffic without explicit authorization.
  3. Configuration: one connection without credentials and one harmless read as evidence; no writing, no deleting.
  4. Implementation: banner version + non-destructive check (NSE vuln, vendor script). The exploit only with authorization for that host and with the client warned it may go down.
  5. Default and weak credentials with the lockout policy known.
  6. Every finding with host, port, version, evidence and the reference (CVE, vendor advisory).
  • nxc for SMB/LDAP/MSSQL/SSH/FTP/RDP/WinRM/NFS; ssh-audit; onesixtyone and snmpwalk; redis-cli, mongosh, mysql, psql.
  • NSE: smb-vuln-*, rdp-*, ssh2-enum-algos, ftp-anon, smtp-open-relay.
  • searchsploit, NVD and vendor advisories for the exact version; CISA KEV to know what is actively exploited.

A cleartext service yields credentials (see sniffing and MITM); an open database yields data and, often, command execution on the host; an SMB or RDP CVE yields SYSTEM directly. On Windows everything ends in lateral movement; on Linux, in local enumeration to escalate.

  • Connections to database services from hosts that are not the application servers (Zeek conn.log by destination port and source).
  • Telnet/FTP/SNMP v1-v2c sessions on the network: Zeek and Suricata identify them by protocol; their existence is already an alert.
  • Bursts of authentication failures on SSH, RDP, SMB and databases (EID 4625, sshd in auth.log, MySQL/PostgreSQL logs).
  • sshd with many consecutive Timeout before authentication from one source: the pattern of a regreSSHion attempt.
  • Redis with CONFIG SET, SLAVEOF/REPLICAOF or EVAL commands from unknown clients; MongoDB with malformed compressed messages after MongoBleed.

Authentication logs of each service, Zeek (conn, ssh, rdp, smb_*, ftp, snmp), Suricata with the ET ruleset, and the version inventory (which gives away the CVE before the attacker does).

  • Design: replace Telnet with SSH, FTP with SFTP, POP3/IMAP/SMTP with mandatory TLS (STARTTLS required by the client), SNMPv3 with authPriv.
  • Configuration: mandatory authentication on every database, bind to the internal interface, default accounts renamed or disabled, SMB null sessions disabled, SMB signing required, NLA on RDP, PermitRootLogin no and keys on SSH.
  • Implementation: patching prioritized by KEV and by exposure; SMBv1 gone; OpenSSH, Redis and MongoDB above the fixed versions (9.8, the October 2025 release, and 8.2.3/8.0.17/7.0.28 respectively).
  • Network: databases and management never reachable from the Internet or from the user network; RDP only through VPN or a gateway.

A cleartext service with captured credentials forces rotating all of them; an open database is treated as a data breach until proven otherwise (Shadowserver assumes compromise for any exposed unauthenticated Redis); an exploited SMB or RDP CVE is full host compromise and the host is rebuilt.

  • MS17-010 / EternalBlue (CVE-2017-0144, 2017): SMBv1; WannaCry and NotPetya. Still found on OT networks and hospitals.
  • BlueKeep (CVE-2019-0708, 2019): RDP without NLA on Windows 7/2008; unauthenticated RCE.
  • Terrapin (CVE-2023-48795, Dec 2023): prefix truncation in SSH; mitigated with strict kex in OpenSSH 9.6 and other implementations.
  • regreSSHion (CVE-2024-6387, Jul 2024): race in sshd, OpenSSH 8.5p1–9.7p1; Qualys estimated more than 14 million exposed instances.
  • RediShell (CVE-2025-49844, Oct 2025): 13-year-old use-after-free in Redis’s Lua interpreter; RCE from a Lua script.
  • MongoBleed (CVE-2025-14847, Dec 2025): unauthenticated memory read on MongoDB 3.6–8.2.2; exploited within days of publication, ~79,000 exposed instances according to Shadowserver.
  • Each service classified: design / configuration / implementation.
  • Cleartext services demonstrated with a capture of your own session.
  • Databases tried without credentials with a harmless read.
  • SMB: SMBv1, signing and null sessions checked on every host.
  • SSH: ssh-audit and version against 8.5p1–9.7p1 and Terrapin.
  • RDP: NLA and version; BlueKeep only with the check, not the exploit.
  • Versions cross-checked with NVD and KEV; exploits only with per-host authorization.
  • Report recommendation matched to the class of flaw (replace / configure / patch).