secplus

Cheat sheets / Ports & protocols (colored)

Ports & protocols (colored)

Every port the exam expects, colored by verdict — secure (use), insecure (close or replace), normally open, and restrict-to-internal.

Legend

✔ Secure — useEncrypted/authenticated; the answer when a question says "most secure" or "replace X with"
✖ Insecure — close or replaceCleartext credentials/data; disable it, or the exam wants its secure replacement
● Normally openExpected on most networks/hosts; not a finding by itself, but watch what's behind it
⚠ Restrict — internal / management onlyFine inside the LAN or a management VLAN; must never be exposed to the internet
○ Legacy / rareKnow the number; you should not see it in a modern network

The port table

PortProtocolTransportVerdictWhy / what to do
20 / 21FTP (data / control)TCP✖ InsecureCleartext creds and files → use SFTP (22) or FTPS (989/990)
22SSH · SCP · SFTPTCP✔ SecureReplaces Telnet/FTP/rlogin; key-based auth; still restrict source IPs — brute-force target
23TelnetTCP✖ InsecureCleartext everything → SSH 22. Should be closed everywhere
25SMTP (server-to-server relay)TCP⚠ Mail servers onlyNeeded on MX hosts; use STARTTLS; block outbound 25 from workstations (spam/botnets)
49TACACS+TCP⚠ InternalDevice admin AAA (Cisco); encrypts the whole body — management network only
53DNSUDP + TCP● Normally openEveryone needs it; add DNSSEC for integrity, DoH 443 / DoT 853 for privacy; watch for tunneling/exfil
67 / 68DHCP (server / client)UDP● Normally open (LAN)Local only; DHCP snooping stops rogue servers; relay agent crosses subnets
69TFTPUDP✖ InsecureNo auth, no encryption; only for isolated device-boot networks → close
80HTTPTCP✖ InsecureCleartext → HTTPS 443; keep 80 only to redirect to 443
88KerberosTCP/UDP⚠ InternalAD authentication; needs NTP sync; never internet-facing
110POP3TCP✖ InsecureCleartext mail download → POP3S 995
123NTPUDP● Normally openClock sync for Kerberos/logs/certs; restrict to trusted time sources; amplification-DDoS reflector if open to the world
135 · 137–139RPC · NetBIOSTCP/UDP⚠ Internal onlyWindows LAN plumbing; block at the perimeter; nbtstat enumeration
143IMAPTCP✖ InsecureCleartext → IMAPS 993
161 / 162SNMP (agent / trap)UDP⚠ Internal — v3 onlyv1/v2c community strings are cleartext (SNMP enumeration) → SNMPv3; management VLAN
389LDAPTCP/UDP✖ InsecureCleartext directory binds → LDAPS 636 (or StartTLS); internal only either way
443HTTPS (TLS)TCP✔ Secure · normally openThe one port that's almost always open; TLS 1.2/1.3 only; also TLS VPNs, DoH
445SMBTCP⚠ Internal onlyFile shares; SMB1 must be disabled (WannaCry); block at the perimeter; SMB3 signing/encryption
465 / 587SMTPS / SMTP submission (STARTTLS)TCP✔ SecureClient mail sending with TLS; 587 is the modern submission port
500 / 4500IKE / NAT-T (IPsec)UDP✔ SecureIPsec VPN key exchange; ESP = IP protocol 50, AH = 51
514SyslogUDP⚠ InternalCleartext, no delivery guarantee → syslog over TLS 6514; internal collector only
636LDAPSTCP✔ SecureLDAP over TLS
853DNS over TLSTCP✔ SecureEncrypted DNS queries (DoH uses 443)
989 / 990FTPSTCP✔ SecureFTP over TLS (SFTP over SSH is more common)
993IMAPSTCP✔ SecureIMAP over TLS
995POP3STCP✔ SecurePOP3 over TLS
1194OpenVPNUDP/TCP✔ SecureTLS-based VPN
1433 · 3306 · 1521 · 5432MS SQL · MySQL · Oracle · PostgreSQLTCP⚠ Internal onlyDatabase listeners must never face the internet; app tier only, TLS + auth
1701L2TPUDP⚠ Only with IPsecNo encryption by itself — always L2TP/IPsec
1723PPTPTCP○ Legacy — closeBroken MS-CHAP; replace with IPsec/TLS VPN
1812 / 1813RADIUS (auth / accounting)UDP⚠ InternalAAA for 802.1X/Wi-Fi; only the password is encrypted — keep on the management network (legacy 1645/1646)
2049NFSTCP⚠ Internal onlyUnix file shares; NFSv4 with Kerberos; never exposed
3389RDPTCP⚠ Never internet-facing#1 ransomware entry point; VPN/jump host + MFA + NLA; TLS on 3389
5060 / 5061SIP / SIP-TLSTCP/UDP⚠ RestrictVoIP signaling; 5061 = TLS; media via SRTP
6514Syslog over TLSTCP✔ SecureEncrypted, reliable log forwarding
8080 / 8443HTTP-alt / HTTPS-altTCP⚠ CheckProxies, admin consoles, dev servers — often forgotten and unpatched
4444(Metasploit / netcat default)TCP✖ Should never existA listener here in netstat is a backdoor indicator

Secure replacements at a glance

Replace thisWith this
Telnet 23→SSH 22
FTP 20/21→SFTP 22 · FTPS 989/990
HTTP 80→HTTPS 443
SMTP 25 (client)→SMTPS 465 · submission 587 + STARTTLS
POP3 110→POP3S 995
IMAP 143→IMAPS 993
LDAP 389→LDAPS 636
SNMP v1/v2c→SNMPv3 (same 161/162)
DNS 53 (plain)→DNSSEC · DoT 853 · DoH 443
Syslog 514→Syslog-TLS 6514
RTP→SRTP
PPTP 1723 · L2TP alone→IPsec (500/4500) · OpenVPN 1194 · TLS VPN 443
WEP · WPA/TKIP→WPA2-CCMP · WPA3-SAE/GCMP
SSL · TLS 1.0/1.1→TLS 1.2 / 1.3

Protocol cheat facts

ProtocolLayer / transportRemember
TLS 1.2 / 1.3Transport-layer security over TCP1.3 removed weak ciphers and RSA key exchange — ECDHE only (forward secrecy); SSL and TLS 1.0/1.1 are ✖
IPsecNetwork layerAH = integrity/auth only (no encryption); ESP = encryption + integrity. Transport mode protects payload; tunnel mode wraps the whole packet (site-to-site VPN)
SSH22 / TCPReplaces Telnet, rlogin; key-based auth
S/MIMEEmailSigns/encrypts individual emails with certificates
SPF / DKIM / DMARCDNS TXT recordsSPF = who may send; DKIM = signature; DMARC = policy + reporting
SRTPRTP over UDPSecure voice/video media
WPA2Wi-FiAES-CCMP; PSK (Personal) or 802.1X/EAP (Enterprise); PSK handshake crackable offline
WPA3Wi-FiSAE handshake (Personal), 192-bit GCMP mode (Enterprise), forward secrecy
WEP · WPA/TKIP · WPSWi-FiBroken RC4 / deprecated / PIN brute-forced — disable
802.1XPort-based NACSupplicant → authenticator (switch/AP) → authentication server (RADIUS); EAP inside
EAP-TLS802.1X methodCertificates on both sides — strongest
PEAP / EAP-TTLS802.1X methodServer cert, tunnel protects inner user credential
PAP · CHAP · LEAP · PPTPLegacy auth / VPNCleartext / weak challenge / broken — don't use (class: "PAP don't use; CHAP don't use")
LDAP → LDAPS389 / 636Directory queries (AD); LDAPS for TLS
Kerberos88KDC issues TGT then service tickets; time-sensitive (clock skew ≤ 5 min)
RADIUS vs. TACACS+UDP 1812 / TCP 49RADIUS encrypts only the password; TACACS+ encrypts the whole body
SAMLXML over HTTPSFederated SSO for web apps; IdP ↔ SP
OAuth 2.0 / OIDCHTTPSOAuth = delegated authorization; OIDC adds authentication on top
SNMP v1/v2c → v3161/162 UDPCommunity strings are cleartext; v3 adds authentication + encryption

Memory hooks

  • "Two-two SSH, two-three tell-net" — 22 SSH, 23 Telnet.
  • Mail: 25 sends, 110 pops, 143 imaps → secure: 465/587, 995, 993 (add ~850 to POP/IMAP).
  • 389 → 636 LDAP → LDAPS.
  • 3389 = RDP ("three-three-eight-nine, remote desktop every time") — and it's the one to hide behind a VPN.
  • AH = Authentication only; ESP = Encrypted Secure Payload.
  • Red row in a scenario = the finding; green row = the fix.