Pentest - Active Information Gathering
Active Information Gathering
DNS
DNS - Basics
DNS Enumeration - Basics
DNS forward lookup brute-forcing to determine additional IPs belonging to a domain:
|
|
Comprehensive lists available at SecLists. Based on IPs determined from the above, we can perform reverse lookups by scanning an associated range:
|
|
dnsrecon
dnsenum2
nslookup
TCP/UDP Port Scanning
Simple port scan with Netcat:
|
|
where -w
is timeout in seconds and -z
specifies zero-I/O mode. TCP scans use the 3-way handshake to detect open ports. UDP is stateless, so open port detection involves a different mechanism. Using Netcat:
|
|
Here, if the destination UDP port is closed, the target should respond with an ICMP port unreachable. UDP scanning is often unreliable, as firewalls and routers may drop ICMP packets. This can lead to false positives and ports showing as open when they are, in fact, closed.
Recon - Port Scanning and nmap
Living off the Land
- Windows: lolbas
- Linux: gtfobins
- Drivers: loldrivers