Initial Enumeration (OSINT)

External Reconnaissance

What Are We Looking For?

  • Data Point: Description
  • IP Space: Valid ASN for the target, public infrastructure netblocks, cloud presence, DNS entries, etc.
  • Información del dominio: Who administers the domain, subdomains, public services (mail servers, DNS, VPN), and defenses (SIEM, AV, IPS/IDS).
  • Schema Format: Email accounts, AD usernames, and password policies to build user lists.
  • Documentos públicos: Public files (.pdf, .docx, .xlsx) with user metadata, internal username format, credentials on GitHub, etc.
  • Fuga de Datos: Users, passwords, or other critical information published publicly.

Tools

  • ASN / IP registrars: BGP toolkit, IANA, arin (Americas), RIPE (Europe)
  • Domain Registrars & DNS: Domaintools, PTRArchive, ICANN, manual DNS queries (8.8.8.8)
  • Social Media: LinkedIn, Twitter, Facebook, news
  • Corporate Websites: embedded documents, "About" and "Contact" pages
  • Cloud & Dev Storage: GitHub, S3/Azure buckets (grayhatwarfare), Google Dorks
  • Breach Data: HaveIBeenPwned, Dehashed

Google Dorking (Examples)

txt
filetype:pdf inurl:inlanefreight.com
intext:"@inlanefreight.com" inurl:inlanefreight.com
Documents and metadata: exiftool to analyze metadata from downloaded documents.

Initial Domain Enumeration

Network Traffic Capture

terminal
sudo wiresharksudo tcpdump -i ens224 -w capture.pcap
Identify layer 2 traffic (ARP, MDNS) to discover hosts.

Passive Enumeration with Responder

terminal
sudo responder -I ens224 -A
Passive analysis mode: captures LLMNR/NBT-NS/MDNS without responding and identifies hostnames.

Active Host Discovery (fping)

terminal
fping -asgq 172.16.5.0/23
-a live hosts only, -s statistics, -g generates the range, -q quiet.
terminal
$ sudo nxc smb 172.16.5.0/24

Service Scanning with Nmap

terminal
$ sudo nmap -v -A -iL hosts.txt -oN host-enum

Identify Users (Kerbrute)

terminal
kerbrute userenum -d INLANEFREIGHT.LOCAL --dc 172.16.5.5 usuarios.txt -o valid_ad_userskerbrute passwordspray -d inlanefreight.local --dc 172.16.5.5 usernames.txt "Spring2023!"

Identify Potential Vulnerabilities

Having an NT AUTHORITYSYSTEM account within a domain is almost equivalent to having a domain user account. Ways to obtain SYSTEM: remote exploits (MS08-067, EternalBlue, BlueKeep), abusing SeImpersonate (Juicy Potato), local privilege escalation flaws, or local admin + PsExec. With SYSTEM, you can enumerate with BloodHound/PowerView, perform Kerberoasting/ASREPRoasting, use Inveigh for Net-NTLMv2 hashes, impersonate tokens, and carry out ACL attacks.