Docsity

security+ ports cheat sheet, Cheat Sheet of Network security

Toggle sidebar
bg1
Ports and Services
ITCP/IP communication first needs a server to open a port
I“Speaking” to the service on the other side needs knowledge about
the higher-level protocol
ISome services announce what they are through a “banner”
IInternet Assigned Numbers Authority (IANA) defines list of known
ports and services
ISame port for UDP and TCP (but service is not necessarily listening
on both)
IList in file /etc/services
IIt is of course not mandatory to use these ports, but it’s what clients
assume
Network Security – Security aspects of TCP/IP 17
Security+ Ports Cheat Sheet
pf3
pf4
pf5

Partial preview of the text

Download security+ ports cheat sheet and more Cheat Sheet Network security in PDF only on Docsity!

Ports and Services

I (^) TCP/IP communication first needs a server to open a port I (^) “Speaking” to the service on the other side needs knowledge about the higher-level protocol I (^) Some services announce what they are through a “banner” I (^) Internet Assigned Numbers Authority (IANA) defines list of known ports and services I (^) Same port for UDP and TCP (but service is not necessarily listening on both) I (^) List in file /etc/services I (^) It is of course not mandatory to use these ports, but it’s what clients assume

Common services and their ports

TCP/UDP port Service 21 File Transfer Protocol (FTP) 22 Secure Shell (SSH) 25 Simple Mail Transfer Protocol (SMTP) 53 Domain Name Server 80 Hypertext Transfer Protocol (HTTP) 110 Post Office Protocol (POP3) 143 Interim Mail Access Protocol (IMAP) 443 HTTP over SSL/TLS (HTTPS) 465 SMTP over SSL/TLS (SMTPS) 993 IMAP over SSL/TLS (IMAPS) 995 POP3 over SSL/TLS (POP3S)

telnet, netcat, and openssl

I (^) Can use netcat to connect to any port: netcat www.google.com 80

I (^) Alternative: telnet, for example telnet www.google.com 80

I (^) Originally made to provide command-line interface to remote host I (^) Telnet server’s standard port is 23 (insecure and obsolete today) I (^) Can also be used to connect to any other port, behaves much like netcat (with small differences for line endings etc.) I (^) netcat and telnet don’t work with SSL connections I (^) Use OpenSSL’s s_client instead, e.g.:

openssl s_client -connect encrypted.google.com:

Port scanning – nmap

I (^) Typical thing to first figure out about a remote, unknown computer: list of open ports I (^) Port scanning means “trying all ports” I (^) Widely used tool for port scans: nmap I (^) A simple nmap arya will scan 1000 ports on arya I (^) Default scan method for non-privileged user: connect() scan: I (^) Use the OS’s connect() system call to connect to a remote port I (^) connect() succeeds: port is open I (^) connect() fails: port is closed I (^) Immediately close connection after successful connect() I (^) This scanning method does not need root privileges I (^) “Filtered” means that a firewall blocks access (more later in this lecture) I (^) Scan all ports (including high ports) through

nmap -p 1-65535 arya