guides-resources

Enumeration Penetration Testing: Network, AD & Web Guide

Enumeration Penetration Testing: Network, AD & Web Guide

Offensive Enumeration 2026: host discovery, SMB, LDAP, Kerberos, BloodHound, web fuzzing and post-compromise. From zero to domain admin.

  • Posted on 2026-06-16
  • Reading time: 10 min

Penetration Testing Enumeration: The Definitive Guide to Networks, AD, Web, and Services #

Enumeration is the step that separates an effective penetration tester from a novice script kiddie. Without a complete map of the attack surface, you don't know what you're looking for, and what you're not looking for, you won't find. Exposed credentials, unpatched services, shares accessible without authentication, escalation paths in BloodHound—it all depends on how thoroughly you've enumerated before moving on to exploitation.

This guide covers everything from host discovery to mapping a full Active Directory domain, from network services to the web, from post-compromise to the reporting pipeline.


The Fundamental Principle: Enumerate Before Attacking #

The temptation in a pentest is to jump on the exploit as soon as you see something interesting. This is almost always a mistake. An SMB service with a null session may seem trivial until you find the administrator credentials in a configuration file on a share. An SNMP community string public It may seem low impact until it reveals the entire internal network topology.

Rule of thumb: 80% of successful attack vectors in enterprise environments emerge during enumeration, not exploitation.


Phase 0 — Intelligent Automation #

Before you start using manual controls, an automatic scanner running in the background gives you a baseline to work from.

AutoRecon #

bash
# Scan completo su singolo host — lancia nmap, gobuster, nikto, enum4linux in parallelo
autorecon TARGET_IP

# Su range di IP
autorecon 192.168.1.0/24 --only-scans-dir

# Con output strutturato
autorecon TARGET_IP -o ./autorecon_output

AutoRecon is the standard starting point for CTFs and time-constrained engagements. It runs everything in parallel and organizes the output by protocol.

RustScan + Nmap Pipeline #

bash
# RustScan per discovery rapida di porte aperte (molto più veloce di nmap -p-)
rustscan -a TARGET_IP --ulimit 5000 -- -sV -sC

# Poi nmap mirato sulle porte trovate
rustscan -a TARGET_IP -b 500 --ulimit 5000 | grep "Open" | cut -d"/" -f1 | \
  xargs -I{} nmap -p{} -sV --script default TARGET_IP

Phase 1 — Host Discovery #

Local Network (Layer 2) #

bash
# ARP scan — il più affidabile sulla rete locale, bypassa firewall
arp-scan -l -I eth0
arp-scan 192.168.1.0/24

# Netdiscover — passivo + attivo
netdiscover -r 192.168.1.0/24
netdiscover -i eth0  # modalità passiva

Remote Network (Layer 3) #

bash
# Ping sweep ICMP
nmap -sn 10.10.10.0/24

# Quando ICMP è bloccato — TCP/UDP probing su porte comuni
nmap -sn -PS22,80,443,445,3389,8080 10.10.10.0/24
nmap -sn -PU53,161,67 10.10.10.0/24

# Masscan per subnet grandi — molto più veloce
masscan 10.0.0.0/8 -p 80,443,22,445 --rate=10000 -oL hosts.txt

Phase 2 — Port Scanning #

Scan Strategy #

bash
# Step 1: scan veloce su top-1000 porte per avere risultati rapidi
nmap -sV -sC --top-ports 1000 -T4 TARGET_IP -oN quick.txt

# Step 2: scan completo TCP su tutte le 65535 porte (in background)
nmap -p- --min-rate 5000 -T4 TARGET_IP -oN full_tcp.txt

# Step 3: UDP — spesso dimenticato, goldmine
nmap -sU --top-ports 20 -T4 TARGET_IP -oN udp.txt
nmap -sU -p 53,67,69,111,123,161,162,500,514,1194 TARGET_IP

# Step 4: scan aggressivo sulle porte identificate
nmap -p PORTE_APERTE -sV -sC -A -T4 TARGET_IP -oN detailed.txt

AD ports to always look for:

text
53    DNS
88    Kerberos
135   RPC Endpoint Mapper
139   NetBIOS Session
389   LDAP
445   SMB
464   Kerberos Password Change
593   HTTP RPC
636   LDAPS
1433  MSSQL
1521  Oracle
2049  NFS
3268  Global Catalog LDAP
3269  Global Catalog LDAPS
3389  RDP
5985  WinRM HTTP
5986  WinRM HTTPS
8080  Web alt
9389  AD Web Services

Phase 3 — DNS Enumeration #

DNS is the infrastructure mapping. You'll often find hostnames that reveal roles (dc01, fileserver, VPN, backup) and IP addresses of systems that aren't directly accessible.

bash
# Query base
nslookup TARGET_DOMAIN DC_IP
host TARGET_DOMAIN DC_IP

# Zone transfer (spesso abilitato per errore)
dig axfr TARGET_DOMAIN @DNS_SERVER
host -l TARGET_DOMAIN DNS_SERVER

# Subdomain bruteforce
gobuster dns -d target.com -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-20000.txt -t 50
dnsenum --dnsserver DC_IP --enum -p 0 -s 0 -f /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt TARGET_DOMAIN

# dnsx — veloce, supporta wildcard detection
echo "target.com" | dnsx -a -cname -mx -ns -txt -resp

# Reverse DNS lookup su subnet
for ip in $(seq 1 254); do nslookup 192.168.1.$ip DNS_IP 2>/dev/null | grep "name ="; done

# dnsrecon — enumerazione completa
dnsrecon -d TARGET_DOMAIN -t std,brt,axfr,cache -D /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt

In an AD environment, the DNS is often the DC's own server. Zone transfer to the AD domain can reveal all registered hosts, including those not present in any other lists.


Phase 4 — SMB Enumeration #

SMB has historically been the richest source of information in Windows environments. Even without credentials, null sessions (still enabled on many legacy systems) can reveal users, shares, and policies.

Null Session and Share Discovery #

bash
# NetExec — null session
nxc smb TARGET_IP -u '' -p '' --shares
nxc smb TARGET_IP -u 'guest' -p '' --shares
nxc smb 192.168.1.0/24 -u '' -p '' --shares  # sweep subnet

# smbclient
smbclient -L //TARGET_IP -N
smbclient -L //TARGET_IP -U ''%''

# smbmap — mostra permessi per share
smbmap -H TARGET_IP
smbmap -H TARGET_IP -u '' -p ''
smbmap -H TARGET_IP -u 'user' -p 'pass' -R  # ricorsivo

With Credentials #

bash
# Enum completa
nxc smb TARGET_IP -u user -p pass --shares
nxc smb TARGET_IP -u user -p pass --users
nxc smb TARGET_IP -u user -p pass --groups
nxc smb TARGET_IP -u user -p pass --local-users
nxc smb TARGET_IP -u user -p pass --pass-pol
nxc smb TARGET_IP -u user -p pass --sessions  # sessioni attive
nxc smb TARGET_IP -u user -p pass --loggedon-users
nxc smb TARGET_IP -u user -p pass --disks

# Download ricorsivo da share
smbclient //TARGET_IP/SHARENAME -U 'domain\user%pass' -c 'recurse;prompt;mget *'

# Spider share per file interessanti
nxc smb TARGET_IP -u user -p pass -M spider_plus

enum4linux-ng — Legacy but Useful #

bash
enum4linux-ng -A TARGET_IP          # full enum
enum4linux-ng -A -u user -p pass TARGET_IP
enum4linux-ng TARGET_IP -P          # solo password policy
enum4linux-ng TARGET_IP -U          # solo utenti

Targeted NSE Scripts #

bash
nmap -p 445 --script smb-enum-shares,smb-enum-users,smb-os-discovery,smb2-security-mode TARGET_IP
nmap -p 445 --script smb-vuln-ms17-010 TARGET_IP  # EternalBlue check
nmap -p 445 --script smb-enum-domains TARGET_IP

Phase 5 — LDAP Enumeration #

LDAP is the Active Directory address book. It contains users, computers, groups, policies, ADCS configurations, trusts—pretty much everything.

Without Credentials (Anonymous Access) #

bash
# Null bind — funziona su molti DC non hardened
ldapsearch -H ldap://TARGET_IP -x -b "DC=corp,DC=local"
ldapsearch -H ldap://TARGET_IP -x -s base namingcontexts  # leggi naming contexts

# Dump base information
ldapsearch -H ldap://TARGET_IP -x -b "DC=corp,DC=local" \
  "(objectClass=*)" | head -100

With Credentials #

bash
# Tutti gli utenti
ldapsearch -H ldap://TARGET_IP -x \
  -D "user@corp.local" -w 'Password123' \
  -b "DC=corp,DC=local" \
  "(objectClass=user)" sAMAccountName description pwdLastSet memberOf

# Utenti con description (spesso contiene password)
ldapsearch -H ldap://TARGET_IP -x -D "user@corp.local" -w 'pass' \
  -b "DC=corp,DC=local" \
  "(&(objectClass=user)(description=*))" sAMAccountName description

# Computer accounts
ldapsearch -H ldap://TARGET_IP -x -D "user@corp.local" -w 'pass' \
  -b "DC=corp,DC=local" \
  "(objectClass=computer)" dNSHostName operatingSystem

# Gruppi privilegiati
ldapsearch -H ldap://TARGET_IP -x -D "user@corp.local" -w 'pass' \
  -b "DC=corp,DC=local" \
  "(cn=Domain Admins)" member

# Account con AdminCount=1 (account protetti elevati)
ldapsearch -H ldap://TARGET_IP -x -D "user@corp.local" -w 'pass' \
  -b "DC=corp,DC=local" \
  "(&(objectClass=user)(adminCount=1))" sAMAccountName

# Account con SPN (Kerberoastable)
ldapsearch -H ldap://TARGET_IP -x -D "user@corp.local" -w 'pass' \
  -b "DC=corp,DC=local" \
  "(&(objectClass=user)(servicePrincipalName=*))" sAMAccountName servicePrincipalName

# Account senza pre-autenticazione (AS-REP Roastable)
ldapsearch -H ldap://TARGET_IP -x -D "user@corp.local" -w 'pass' \
  -b "DC=corp,DC=local" \
  "(&(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=4194304))" sAMAccountName

ldapdomaindump — HTML output #

bash
ldapdomaindump -u 'corp.local\user' -p 'Password123' TARGET_IP \
  -o /tmp/ldapdump/
# Genera file HTML navigabili con tutti gli oggetti AD

See: ldapsearch


Phase 6 — Kerberos Enumeration #

Kerberos on port 88 allows credential-less user enumeration by leveraging various KDC error codes.

bash
# User enumeration — KDC_ERR_PREAUTH_REQUIRED = utente valido
kerbrute userenum --dc DC_IP -d corp.local \
  /usr/share/seclists/Usernames/xato-net-10-million-usernames.txt

# Con lista utenti custom
kerbrute userenum --dc DC_IP -d corp.local users.txt

# AS-REP Roasting — utenti senza pre-autenticazione
GetNPUsers.py corp.local/ -usersfile users.txt -no-pass -dc-ip DC_IP -format hashcat
GetNPUsers.py corp.local/user:pass -request -dc-ip DC_IP

# Kerberoasting — TGS per SPN
GetUserSPNs.py corp.local/user:pass -dc-ip DC_IP -request -outputfile tgs.txt

Kerberos enumeration is stealthy compared to SMB enumeration — failures generate Event 4771 instead of the more monitored 4625.


Phase 7 — RPC Enumeration #

RPC (port 135) and rpcclient (port 445) open a window to AD information that is not always accessible via LDAP.

bash
# Connessione null session
rpcclient -U "" -N TARGET_IP
rpcclient -U "user%pass" TARGET_IP

# Comandi rpcclient utili
rpcclient $> enumdomusers         # lista utenti dominio
rpcclient $> enumdomgroups        # lista gruppi
rpcclient $> enumalsgroups domain # builtin groups
rpcclient $> querydominfo         # info dominio (policy, SID)
rpcclient $> getdompwinfo         # password policy
rpcclient $> querydispinfo        # display info utenti (descrizione, etc.)
rpcclient $> queryuser 0x3e8      # info su RID specifico
rpcclient $> netshareenum         # lista share
rpcclient $> netsharegetinfo SHARE # info su share specifica
rpcclient $> lsaenumsid           # SID del sistema
rpcclient $> lookupsids S-1-5-21-... # risolvi SID in nome

# Enumeration automatica del range RID
for i in $(seq 500 1100); do
  rpcclient -N -U "" TARGET_IP -c "queryuser 0x$(printf '%x\n' $i)" 2>/dev/null | \
  grep "User Name"
done

See: rpcclient


Phase 8 — SNMP Enumeration #

SNMP over UDP 161 is often forgotten during TCP-only port scans. Community string public It is still common in poorly configured environments and can reveal significant information: network interfaces, running processes, logged in users, installed software.

bash
# Brute force community string
onesixtyone -c /usr/share/seclists/Discovery/SNMP/snmp.txt TARGET_IP
nmap -sU -p 161 --script snmp-brute TARGET_IP

# Dump MIB completo
snmpwalk -v2c -c public TARGET_IP
snmpwalk -v2c -c public TARGET_IP 1.3.6.1.2.1.25.4.2.1.2  # processi
snmpwalk -v2c -c public TARGET_IP 1.3.6.1.2.1.25.6.3.1.2  # software installato
snmpwalk -v2c -c public TARGET_IP 1.3.6.1.4.1.77.1.2.25   # utenti Windows
snmpwalk -v2c -c public TARGET_IP 1.3.6.1.2.1.2.2         # interfacce rete

# snmp-check — output leggibile
snmp-check TARGET_IP -c public

# SNMPv3 con credenziali
snmpwalk -v3 -l authNoPriv -u snmpuser -a MD5 -A AuthPass TARGET_IP

See: SNMP


Phase 9 — NFS and File Services #

bash
# Lista mount disponibili
showmount -e TARGET_IP
nmap -sV -p 111,2049 --script nfs-ls,nfs-showmount,nfs-statfs TARGET_IP

# Mount
mkdir /mnt/nfs_target
mount -t nfs TARGET_IP:/export/share /mnt/nfs_target
mount -t nfs -o nolock TARGET_IP:/home /mnt/nfs_target

# Cerca file interessanti sul mount
find /mnt/nfs_target -name "*.key" -o -name "*.pem" -o -name "id_rsa" \
  -o -name "*.conf" -o -name "*.bak" 2>/dev/null

# Verifica permessi
ls -la /mnt/nfs_target
cat /etc/exports  # se hai accesso al server

Privilege escalation pattern via NFS: if the share is mounted with no_root_squash, you can copy a SUID bash to the mount and run it as root on the server.


Phase 10 — Advanced Active Directory Enumeration #

BloodHound + SharpHound #

The de facto standard for mapping AD attack paths. After data collection, BloodHound builds a graph showing all paths from any user to Domain Admin.

bash
# Da Linux (bloodhound-python)
bloodhound-python -u user -p Password123 -d corp.local \
  -ns DC_IP -c All --zip

# Tutti i metodi di raccolta
bloodhound-python -u user -p Password123 -d corp.local \
  -ns DC_IP -c DCOnly,All,LoggedOn,LocalAdmin,Session,Trusts,Default

# Da Windows (SharpHound in memoria)
.\SharpHound.exe -c All --outputdirectory C:\Temp\
.\SharpHound.exe -c DCOnly,Session,LocalAdmin  # meno rumoroso

# Query BloodHound essenziali dopo import:
# - "Shortest Paths to Domain Admins"
# - "Find All Domain Admins"  
# - "Kerberoastable Users"
# - "AS-REP Roastable Users"
# - "Users with DCSync Rights"
# - "Find Computers with Constrained Delegation"
# - "Find Computers with Unconstrained Delegation"

See: BloodHound

PowerView — Granular Enumeration from Windows #

powershell
Import-Module .\PowerView.ps1

# Info di base sul dominio
Get-Domain
Get-DomainController
Get-Forest
Get-ForestTrust  # trust inter-forest

# Utenti e attributi
Get-DomainUser | select samaccountname, description, pwdlastset, logoncount
Get-DomainUser -SPN | select samaccountname, serviceprincipalname  # Kerberoastable
Get-DomainUser -PreauthNotRequired  # AS-REP Roastable
Get-DomainUser -AdminCount         # account protetti/privilegiati

# Gruppi privilegiati e membership
Get-DomainGroupMember "Domain Admins" -Recurse
Get-DomainGroupMember "Enterprise Admins" -Recurse
Get-DomainGroupMember "Backup Operators"
Get-DomainGroupMember "Account Operators"

# Computer e OS
Get-DomainComputer | select dnshostname, operatingsystem, lastlogondate
Get-DomainComputer -Unconstrained  # unconstrained delegation — alto rischio
Get-DomainComputer -TrustedToAuth  # constrained delegation

# ACL su oggetti AD
Get-ObjectAcl -Identity "Domain Admins" -ResolveGUIDs | \
  Where-Object {$_.ActiveDirectoryRights -match "GenericWrite|WriteDacl|WriteOwner|GenericAll"}

# Share accessibili nel dominio
Invoke-ShareFinder -Verbose
Find-InterestingDomainShareFile -Include "*.txt","*.ini","*.config","*.ps1","*.bat"

# GPO
Get-DomainGPO | select displayname, gpcfilesyspath
Get-DomainGPOLocalGroup  # chi ha admin locale via GPO

# Password policy
Get-DomainPolicy | select -ExpandProperty SystemAccess
Get-DomainDefaultPasswordPolicy

See: PowerView

Impacket for AD Enum from Linux #

bash
# Utenti del dominio
GetADUsers.py -all corp.local/user:pass -dc-ip DC_IP

# SID enumeration
lookupsid.py corp.local/user:pass@DC_IP

# Enum share
smbclient.py corp.local/user:pass@DC_IP

# Informazioni sul DC
rdap.py DC_IP  # (se disponibile)

ACL Abuse Discovery #

powershell
# Trova ACL interessanti sul tuo utente
Find-InterestingDomainAcl -ResolveGUIDs | \
  Where-Object {$_.IdentityReferenceName -match "YourUser|YourGroup"}

# Trova oggetti dove hai diritti di scrittura
Get-ObjectAcl -ResolveGUIDs | \
  Where-Object {
    $_.IdentityReferenceName -eq "YourUser" -and
    $_.ActiveDirectoryRights -match "GenericWrite|WriteDacl|WriteOwner"
  }

See: ACL Abuse

ADCS Enumeration #

bash
# Certipy — trova template ADCS vulnerabili
certipy-ad find -u user@corp.local -p pass -dc-ip DC_IP -vulnerable -enabled

# Solo output a schermo
certipy-ad find -u user@corp.local -p pass -dc-ip DC_IP -stdout

See: Certipy


Phase 11 — Web Enumeration #

Directory and File Fuzzing #

bash
# ffuf — veloce e flessibile
ffuf -u https://target.com/FUZZ \
  -w /usr/share/seclists/Discovery/Web-Content/raft-large-directories.txt \
  -mc 200,204,301,302,307,401,403 -t 50

# Con estensioni
ffuf -u https://target.com/FUZZ \
  -w /usr/share/seclists/Discovery/Web-Content/raft-medium-files.txt \
  -e .php,.asp,.aspx,.txt,.bak,.old,.zip,.tar.gz,.config,.env

# Fuzzing Virtual Hosting
ffuf -u http://10.10.10.10 -H "Host: FUZZ.target.com" \
  -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt \
  -fs 0

# Gobuster
gobuster dir -u https://target.com \
  -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt \
  -x php,html,txt,bak,old,conf -t 50 -k

# feroxbuster — supporta ricorsione automatica
feroxbuster -u https://target.com -w wordlist.txt --auto-tune

Technology Fingerprinting #

bash
# whatweb
whatweb https://target.com -v

# wappalyzer CLI
wappalyzer https://target.com

# httpx con fingerprint
echo "target.com" | httpx -tech-detect -status-code -title -web-server

# Analisi header
curl -I https://target.com
curl -sI https://target.com | grep -i "server\|x-powered-by\|x-generator\|set-cookie"

# robots.txt e sitemap (sempre)
curl https://target.com/robots.txt
curl https://target.com/sitemap.xml

API Discovery #

bash
# Fuzzing endpoint API
ffuf -u https://target.com/api/FUZZ \
  -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt

# Parameter fuzzing con arjun
arjun -u https://target.com/api/endpoint

# Analisi JavaScript per endpoint e chiavi API
cat *.js | grep -E "api\.|/api/|fetch\(|axios\.|baseURL" 
# oppure usa tool come LinkFinder
python3 linkfinder.py -i https://target.com -d -o cli

Nikto — Common Web Vulnerabilities #

bash
nikto -h https://target.com -ssl
nikto -h target.com -port 80,443,8080,8443

Phase 12 — Database Enumeration #

MSSQL (1433) #

bash
# Connessione e enum
mssqlclient.py corp.local/user:pass@TARGET_IP -windows-auth

# Con NetExec
nxc mssql TARGET_IP -u user -p pass --local-auth -q "SELECT @@version"
nxc mssql TARGET_IP -u user -p pass -M mssql_priv  # check privilege escalation

# Abilitare xp_cmdshell
mssqlclient.py user:pass@TARGET_IP
SQL> EXEC sp_configure 'show advanced options', 1; RECONFIGURE;
SQL> EXEC sp_configure 'xp_cmdshell', 1; RECONFIGURE;
SQL> EXEC xp_cmdshell 'whoami';

MySQL (3306) #

bash
# Connessione diretta
mysql -u root -h TARGET_IP -p

# Enum
mysql -u root -p -e "SELECT User, Host, authentication_string FROM mysql.user;"
mysql -u root -p -e "SHOW DATABASES;"
mysql -u root -p -e "SHOW GRANTS FOR 'user'@'host';"

See: NetExec


Phase 13 — Various Services #

FTP (21) #

bash
# Anonymous login
ftp TARGET_IP   # user: anonymous, pass: [vuoto o email]
nmap -p 21 --script ftp-anon,ftp-bounce,ftp-syst TARGET_IP

# Se anonimo funziona — download ricorsivo
wget -r ftp://TARGET_IP/ --ftp-user=anonymous --ftp-password=anon

SMTP (25) #

bash
# User enumeration via VRFY/EXPN
smtp-user-enum -M VRFY -U /usr/share/seclists/Usernames/top-usernames-shortlist.txt -t TARGET_IP
smtp-user-enum -M EXPN -U users.txt -t TARGET_IP
nmap -p 25 --script smtp-enum-users,smtp-commands TARGET_IP

# Connessione manuale
nc TARGET_IP 25
EHLO hacker.com
VRFY admin

See: Netcat for manual connections and banner grabbing.

SNMP (161 UDP) #

See dedicated section above and SNMP.

Redis (6379) #

bash
# Connessione (spesso senza auth)
redis-cli -h TARGET_IP ping
redis-cli -h TARGET_IP info server
redis-cli -h TARGET_IP keys "*"   # lista tutte le chiavi
redis-cli -h TARGET_IP get KEY    # leggi valore

# Verifica configurazione
redis-cli -h TARGET_IP config get dir
redis-cli -h TARGET_IP config get dbfilename

Phase 14 — Post-Compromise Enumeration (Host) #

Once access to a host is gained, enumeration starts again from the local perspective.

Linux #

bash
# Privesc vectors immediati
id; whoami; sudo -l; groups

# Kernel e OS
uname -a; cat /etc/os-release

# SUID e capabilities
find / -perm -4000 2>/dev/null
getcap -r / 2>/dev/null

# Cron jobs
cat /etc/crontab; ls /etc/cron.*; crontab -l

# File con credenziali
cat ~/.bash_history
find /var/www -name "*.php" | xargs grep -l "password\|DB_PASS" 2>/dev/null
find / -name ".env" 2>/dev/null

# Rete
ip addr; ip route; ss -tlnp; arp -a

Automated tools: LinPEAS , LinEnum , tshark for traffic analysis, Top 100 Linux Commands for reference.

Windows #

cmd
systeminfo
whoami /all
net user; net localgroup administrators
ipconfig /all; route print

# Privilege check
whoami /priv

# Processi e servizi
tasklist /SVC
wmic service get name,startname,pathname

# Credenziali salvate
cmdkey /list

Tools: WinPEAS , WinEnum , WMIC


Phase 15 — Network Topology and Pivot Discovery #

bash
# Interfacce multiple — host potenzialmente dual-homed
ip addr | grep "inet "
# Se hai più interfacce → pivot verso subnet interna

# ARP cache — host vicini già contattati
arp -a
cat /proc/net/arp

# Route table — subnet raggiungibili
ip route
route -n

# DNS config — rivela dominio e DC
cat /etc/resolv.conf
cat /etc/hosts
nmcli dev show | grep DNS  # Linux con NetworkManager

# File hosts Windows
type C:\Windows\System32\drivers\etc\hosts

Trust and Multi-Domain Enumeration #

In enterprise environments, you often find multiple trusted domains. Enumerating them is essential for ExtraSID attacks.

powershell
# Da PowerView
Get-ForestTrust
Get-DomainTrust
Get-DomainTrustMapping  # mappa ricorsiva di tutti i trust

# Da Impacket
GetUserSPNs.py corp.local/user:pass -dc-ip DC_IP -target-domain child.corp.local

Methodology: The Order That Doesn't Make Mistakes #

text
SENZA CREDENZIALI:
1. Host discovery (arp-scan, nmap -sn)
2. Port scan rapido → full TCP → UDP
3. DNS (zone transfer, subdomain brute)
4. SMB null session (share, utenti, policy)
5. LDAP anonymous bind
6. Kerberos user enumeration (kerbrute)
7. SNMP community brute (UDP 161)
8. Web enumeration (dir fuzzing, tech fingerprint)
9. FTP/SMTP anonymous

CON CREDENZIALI:
10. NetExec sweep su subnet (SMB, LDAP, WinRM, MSSQL)
11. BloodHound collection
12. PowerView / Impacket enum
13. ADCS enum (certipy find)
14. Share spider (file con credenziali, config)
15. ACL enum → attack path verso DA

Tool Reference #

toolMain use
NmapPort scan, NSE scripts
NetExecSMB/LDAP/WinRM enum with credentials
blood houndAD attack path analysis
PowerViewAD enum from PowerShell
fuf / GobusterWeb fuzzing
PacketLDAP, Kerberos, SMB, MSSQL
enum4linux-ngLegacy SMB/LDAP
LinPEAS / LinEnumPost-compromise Linux
WinPEASPost-compromise Windows
NetcatBanner grab, manual connections
TsharkNetwork traffic analysis
SNMP toolsSNMP enumeration

MITER ATT&CK: T1018 (Remote System Discovery), T1087 (Account Discovery), T1069 (Permission Groups Discovery), T1046 (Network Service Discovery), T1135 (Network Share Discovery)

#enumeration penetration testing #active directory enumeration #pentest methodology

leave a message

I'm not a robot