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

TargetWhere to look
ASN / netblocksbgp.he.net, ARIN, RIPE, whois
DNS historycrt.sh, securitytrails, viewdns.info, PTRArchive
People / usernamesLinkedIn, linkedin2username, Twitter
Emailshunter.io, phonebook.cz, clearbit
Leaked docsGoogle dorks (see below), GrayHatWarfare for S3/Blob
Breach dataHaveIBeenPwned, 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 free

Identifying Domain Controllers

A DC speaks the full stack: 88/tcp (Kerberos), 389/tcp LDAP, 636/tcp LDAPS, 3268/tcp GC, 53 DNS, 445 SMB. 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 2000

Null 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 administrator

From 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 only

JSON/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:

-h is deprecated — use -H ldap://host on 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.txt

Feed 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 '' --shares

Signing status

nxc smb <range> prints signing:False for 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.5

Quick 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