External Recon & Initial Enumeration
Unauthenticated OSINT and low-privilege AD discovery. Goal: build an IP/user/domain picture before you touch a credential.
What to collect
- IP space, ASN, netblocks, public hostnames
- Leaked documents and file metadata (authors, internal paths)
- Breach data (emails, hashes, cleartext passwords)
- Domain naming conventions (user schema, hostname schema)
- Tech stack hints (OWA, Citrix, VPN, M365, Horizon)
Operator mindset
Everything below should feed back into either a credential-stuffing list, a user list for spraying, or a target list for the next phase.
OSINT sources
| Target | Where to look |
|---|---|
| ASN / netblocks | bgp.he.net, ARIN, RIPE, whois |
| DNS history | crt.sh, securitytrails, viewdns.info, PTRArchive |
| People / usernames | LinkedIn, linkedin2username, Twitter |
| Emails | hunter.io, phonebook.cz, clearbit |
| Leaked docs | Google dorks (see below), GrayHatWarfare for S3/Blob |
| Breach data | HaveIBeenPwned, Dehashed, IntelX |
Google dorks that actually land
site:target.com filetype:pdf
site:target.com filetype:xlsx OR filetype:docx OR filetype:pptx
site:target.com intext:"internal use only"
site:*.target.com -www
site:linkedin.com/in "Target Corp"
Pull metadata from retrieved docs with exiftool — authors become usernames, paths leak internal hostnames and share names.
DNS discovery of the domain
Once you have an internal foothold (or a juicy DNS server exposed externally), dump SRV records — they point directly at DCs, KDCs, and GCs.
nslookup -type=SRV _ldap._tcp.dc._msdcs.inlanefreight.local
nslookup -type=SRV _kerberos._tcp.inlanefreight.local
nslookup -type=SRV _gc._tcp.inlanefreight.local
# Full sweep
dig @172.16.5.5 inlanefreight.local any
dig @172.16.5.5 -t axfr inlanefreight.local # long shot but freeIdentifying Domain Controllers
A DC speaks the full stack:
88/tcp(Kerberos),389/tcpLDAP,636/tcpLDAPS,3268/tcpGC,53DNS,445SMB. Port 88 open on a Windows box is effectively a DC fingerprint.
Passive host discovery on the wire
If you have L2 access on the internal network:
sudo responder -I eth0 -A # analyze mode — no poisoning, just listen
sudo tcpdump -i eth0 -nn 'arp or udp port 5353 or udp port 137'mDNS and ARP give you hostnames and IPs without sending a single probe.
Active host sweep
fping -asgq 172.16.5.0/23
nmap -sn 172.16.5.0/23 --min-rate 2000Null sessions and anonymous SMB
Always worth trying first — zero auth, often still enabled on older DCs and file servers.
# Is a null session allowed?
rpcclient -U "" -N 172.16.5.5
# Once in:
rpcclient $> querydominfo
rpcclient $> getdompwinfo
rpcclient $> enumdomusers
rpcclient $> enumdomgroups
rpcclient $> lookupnames administratorFrom Windows:
net use \\172.16.5.5\ipc$ "" /u:""The command completed successfully = null session alive.
enum4linux-ng (the one you actually want)
enum4linux-ng -A 172.16.5.5 -oA ilfreight
enum4linux-ng -P 172.16.5.5 # password policy only
enum4linux-ng -U 172.16.5.5 # users onlyJSON/YAML output chains into the rest of your pipeline.
LDAP anonymous bind
ldapsearch -H ldap://172.16.5.5 -x -b "DC=INLANEFREIGHT,DC=LOCAL" -s sub "*" \
| grep -m1 -B10 pwdHistoryLength
ldapsearch -H ldap://172.16.5.5 -x -b "DC=INLANEFREIGHT,DC=LOCAL" \
"(&(objectclass=user))" sAMAccountName | grep sAMAccountName:
-his deprecated — use-H ldap://hoston modern builds.
Kerbrute userenum against port 88
Kerberos pre-auth leaks user validity without failed-logon events. Quietest user enumeration on the box.
kerbrute userenum -d inlanefreight.local --dc 172.16.5.5 \
/opt/jsmith.txt -o valid_users.txtFeed it jsmith.txt/jsmith2.txt from statistically-likely-usernames when you have no user list yet.
SMB enumeration with and without creds
# Shares, no creds
smbclient -N -L //172.16.5.5
smbmap -H 172.16.5.5 -u null -p ''
# CrackMapExec / NetExec sweep
nxc smb 172.16.5.0/24
nxc smb 172.16.5.5 -u '' -p '' --shares --users --pass-pol
nxc smb 172.16.5.5 -u guest -p '' --sharesSigning status
nxc smb <range>printssigning:Falsefor every host — those are your NTLM relay targets later.
SNMP
Default community strings (public, private, community) still land. SNMP coughs up usernames, running processes, installed software, and interface tables.
onesixtyone -c /usr/share/seclists/Discovery/SNMP/common-snmp-community-strings.txt 172.16.5.0/24
snmpwalk -v2c -c public 172.16.5.5
snmp-check 172.16.5.5Quick checklist
- ASN / netblocks mapped
- LinkedIn + hunter.io → email list → username convention
- Google dorks for leaked files + metadata extracted
- Breach data checked against collected emails
- SRV records pulled → DCs identified
- Null session tested on every SMB host
- LDAP anonymous bind tested
- Kerbrute userenum against DC:88
- SMB signing map built for later relay work
- SNMP sweep with common community strings
Related
- 19 · Active Directory Enumeration & Attacks — module index
- 00 · Cheatsheet & Checklist
- AD Fundamentals
- Core Protocols
- LLMNR & NBT-NS Poisoning
- Password Policy & User Lists
- Password Spraying
- Credentialed Enumeration (Linux)
- Credentialed Enumeration (Windows)
- Kerberoasting & AS-REP Roasting
- ACL Abuse
- Lateral Movement & Attacks
- Trust Abuse
- Hardening & Detection
