Network Service Enumeration: practice machines and key commands

By Daniel Dayan ยท Updated

Good enumeration of network services decides most boxes before any exploit is run. After a full TCP scan and a quick UDP check, visit each port by hand: anonymous FTP may expose files, NFS exports can be mounted, SNMP community strings reveal users and processes, and unauthenticated Redis can write SSH keys or web shells. Grab banners, note versions and search for matching advisories, then look at default credentials for the product. Keep scan output per host and re-scan after you gain internal access, because new ports appear on localhost. Do not skip uncommon ports. The machines below are solved through careful service enumeration rather than a single exploit. Re-run the scans once credentials are known, since authenticated views expose far more detail. Compare the results of different tools instead of trusting one.

Key commands

Placeholders in braces, such as {TARGET_IP}, are values you fill in for your target.

Fast SYN Scan (Top 1000 Ports)

Speedy initial discovery of open TCP ports with version detection and default safe scripts.

nmap -sC -sV -Pn --min-rate 2000 -oN nmap_quick.txt {TARGET_IP}

All-Port TCP Exhaustive Scan

Scan all 65,535 TCP ports at a high packet rate, saving output to all formats.

nmap -p- -sC -sV -Pn --min-rate 3000 -oA nmap_full {TARGET_IP}

Top UDP Service Discovery Scan

Quick scan of the most common 20 UDP ports (SNMP, TFTP, DNS, NTP, DHCP).

sudo nmap -sU --top-ports 20 -Pn --open -oN nmap_udp.txt {TARGET_IP}

SNMPwalk v2c Community Enumeration

Query SNMP management information base using default public community string.

snmpwalk -v 2c -c public {TARGET_IP}

DNS Zone Transfer (AXFR) Audit

Attempt full DNS zone transfer from target nameserver to expose all subdomains.

dig axfr @{TARGET_IP} {DOMAIN}

Keep going

Network Service Enumeration machines (49)

16 of these are machines I solved myself and are listed first within each difficulty. 40 Linux, 8 Windows, 1 Other.

Listed when a machine has a catalog tag that is one of: mysql, mariadb, mssql, mongodb, rsync, anonymous, ftp anonymous, anonymous login, subdomain takeover, port scanning, reconnaissance, ftp, nfs, snmp, ldap, redis, nmap, telnet, dns, tshark. Capital letters, hyphens and underscores are ignored, and the tags that matched come first in each row. "Editor-mapped" marks machines assigned to this topic by hand because none of their tags match.

Network Service Enumeration at a glance

Very Easy (9)

MachinePlatformOSTags
ArchetypeMSSQLxp_cmdshellJuicyPotatoPowerShellHTBWindowsMSSQL, xp_cmdshell, JuicyPotato, PowerShell
CrocodileFTPAdmin PanelgobusterHTBLinuxFTP, Admin Panel, gobuster
DancingSMBShare EnumerationsmbclientHTBWindowsEditor-mapped, SMB, Share Enumeration, smbclient
FawnFTPAnonymous LoginHTBLinuxFTP, Anonymous Login
MeowTelnetDefault CredentialsHTBLinuxTelnet, Default Credentials
RedeemerRedisHTBLinuxRedis
SequelMySQLMariaDBDefault CredentialsHTBLinuxMySQL, MariaDB, Default Credentials
VaccineFTPSQLiSudoTar WildcardHTBLinuxFTP, SQLi, Sudo, Tar Wildcard
UnifiedMongoDBLog4jCVE-2021-44228UniFiHTBLinuxMongoDB, Log4j, CVE-2021-44228, UniFi

Easy (26)

MachinePlatformOSTags
Bounty HackerFTP-AnonymousHydraTar-SUIDTHMLinuxFTP-Anonymous, Hydra, Tar-SUID
Cap IppSecIDORHTBLinuxEditor-mapped, IDOR
Intermediate NmapnmapPort-ScanningTHMLinuxnmap, Port-Scanning
MongodMongoDBHTBLinuxMongoDB
Netmon IppSecCVE-2018-9276HTBWindowsEditor-mapped, CVE-2018-9276
PreignitionHTTPAdmin-BypassHTBLinuxEditor-mapped, HTTP, Admin-Bypass
SyncedRsyncHTBLinuxRsync
TakeOverSubdomain-TakeoverDNSTHMOtherSubdomain-Takeover, DNS
AnonforcenmapJohn The RipperTHMLinuxnmap, John The Ripper
AntiqueSNMPHTBLinuxSNMP
DavnmapgobusterTHMLinuxnmap, gobuster
Fowsniff CTFnmapMetasploitTHMLinuxnmap, Metasploit
GamingServernmapHydragobusterJohn The RipperTHMLinuxnmap, Hydra, gobuster, John The Ripper
IDEnmapsearchsploitlinPEASTHMLinuxnmap, searchsploit, linPEAS
Lian_YuFTPSteganographygobusterSudoTHMLinuxFTP, Steganography, gobuster, Sudo
LibrarynmapgobusterHydraTHMLinuxnmap, gobuster, Hydra
Net Sec ChallengenmapHydraTHMLinuxnmap, Hydra
Pandora IppSecSNMPHTBLinuxSNMP
Postman IppSecRedisHTBLinuxRedis
ResRedisWebShellSUID-XxdTHMLinuxRedis, WebShell, SUID-Xxd
ThompsonnmapgobusterMetasploitTHMLinuxnmap, gobuster, Metasploit
ToolsRusnmapdirbusterHydraNiktoTHMLinuxnmap, dirbuster, Hydra, Nikto
TShark Challenge I: TeamworkTsharkTHMLinuxTshark
TShark Challenge II: DirectoryTsharkTHMLinuxTshark
VulnNet: InternalRedisSMBTeamCityTunnelingTHMLinuxRedis, SMB, TeamCity, Tunneling
WhiterosenmapgobusterffufBurp SuiteTHMLinuxnmap, gobuster, ffuf, Burp Suite

Medium (13)

MachinePlatformOSTags
AnonymousFTPCronSUIDTHMLinuxFTP, Cron, SUID
BrainstormFTPBuffer-Overflowx86THMWindowsFTP, Buffer-Overflow, x86
Carrier IppSecSNMPHTBLinuxSNMP
Cascade IppSecLDAPAD Recycle BinAES-EncryptionActive DirectoryHTBWindowsLDAP, AD Recycle Bin, AES-Encryption, Active Directory
Clicker IppSecNFSMass AssignmentSQLiCronHTBLinuxNFS, Mass Assignment, SQLi, Cron
Format IppSecRedisLFINginx TraversalFormat StringHTBLinuxRedis, LFI, Nginx Traversal, Format String
HA Joker CTFnmapTHMLinuxnmap
Manager IppSecMSSQLActive DirectoryAD CSCertipyHTBWindowsMSSQL, Active Directory, AD CS, Certipy
Scrambled IppSecMSSQLActive DirectoryDeserializationKerberoastingHTBWindowsMSSQL, Active Directory, Deserialization, Kerberoasting
SeeTwoTsharkWiresharkbase64THMLinuxTshark, Wireshark, base64
SmolnmapwpscanJohn The RipperTHMLinuxnmap, wpscan, John The Ripper
VulnNet: Active (Retired)RedisActive DirectoryGPP-PasswordsKerberoastingTHMWindowsRedis, Active Directory, GPP-Passwords, Kerberoasting
WatcherFTPLFICronSudoTHMLinuxFTP, LFI, Cron, Sudo

Hard (1)

MachinePlatformOSTags
CherryBlossomnmapsmbclientbase64binwalkTHMLinuxnmap, smbclient, base64, binwalk

Related techniques

Related guides: TJ Null OSCP list, OSCP exam scoring and time budget, OSCP vs CPTS, OSCP report template.

Practise it, then track it.

Log every box and the commands you used in ZeroBox.