Attackers don't start with Nmap. They start with what you forgot you have: an old staging server, a public Jenkins dashboard, a subdomain pointing to a cloud resource that no longer exists, and a list of your email addresses. In this episode you map an organization's attack surface the way an attacker does, then see it from the defender's side: how to detect it, how to shrink it, and how to re-test every month.
⚠️ For education only. Our target is acme-corp.example, a fictional company. Only test systems you own or have written permission to test. Passive OSINT reads public data; active steps (DNS brute force, zone transfer, httpx) touch the target and need scope.
In this episode:
✔ Attack surface and the MITRE ATT&CK Reconnaissance tactic (TA0043)
✔ Certificate transparency with crt.sh: subdomains without sending a single packet
✔ subfinder, amass and dnsx, and spotting a dangling CNAME (subdomain takeover)
✔ httpx-toolkit: status codes, titles and technologies (public CI, end-of-life PHP)
✔ theHarvester: emails and the email format, a ready username list
✔ dnsrecon: DNS records, zone transfer (AXFR) test, and a missing DMARC record
✔ Search engine dorks for subdomains, documents, open directories and leaked code
✔ Ranking the findings into an attack surface map
✔ Detect: CT monitoring, BIND zone transfer logs, Zeek dns.log NXDOMAIN spikes
✔ Fix: dangling DNS, CI behind VPN, allow-transfer, DMARC, metadata, monthly re-test
⏱ Chapters
0:00 What you forgot you have
0:18 Welcome
0:24 Legal: passive vs active OSINT
0:44 Attack surface & ATT&CK reconnaissance
1:10 Certificate transparency with crt.sh
1:40 subfinder, amass & dnsx (subdomain takeover)
2:11 What's running? httpx-toolkit
2:39 theHarvester: emails & formats
2:58 DNS: dnsrecon, zone transfer, DMARC
3:24 Search engine dorks
3:38 The attack surface map
3:55 Detect: CT monitoring, BIND & Zeek
4:25 Fix: shrink the surface + monthly re-test
4:58 Common mistakes
5:19 Cheat sheet
5:43 Like & subscribe
5:55 Homework & up next
💻 Commands from this video
Kali (10.10.10.5), target: acme-corp.example (fictional)
curl -s 'https://crt.sh/?q=%25.acme-corp.example&output=json'; | jq -r '.[].name_value' | sort -u | tee crt.txt
subfinder -d acme-corp.example -all -silent -o subfinder.txt
amass enum -passive -d acme-corp.example -o amass.txt
sort -u crt.txt subfinder.txt amass.txt -o subs.txt ; wc -l subs.txt
dnsx -l subs.txt -a -cname -resp -silent
dnsx -l subs.txt -silent -o live.txt
httpx-toolkit -l live.txt -sc -title -td -silent (active: needs scope)
theHarvester -d acme-corp.example -b crtsh,duckduckgo,hackertarget -l 300 -f acme
dnsrecon -d acme-corp.example -t std -a (-a tries a zone transfer: active)
dig +short txt _dmarc.acme-corp.example
Search engine dorks:
site:acme-corp.example -site:www.acme-corp.example
site:acme-corp.example filetype:pdf
site:acme-corp.example intitle:"index of"
"acme-corp.example" site:github.com
Defender (Zeek):
cat dns.log | zeek-cut id.orig_h rcode_name | grep NXDOMAIN | sort | uniq -c | sort -rn | head -1
Fix + re-test:
BIND named.conf: allow-transfer { 203.0.113.3; };
_dmarc TXT: "v=DMARC1; p=none; rua=mailto:dmarc@acme-corp.example" (then quarantine, then reject)
exiftool -all= report.pdf
comm -13 subs-nov.txt subs-dec.txt (what's new this month?)
ATT&CK: TA0043 Reconnaissance · T1596.003 Digital Certificates · T1590.002 DNS · T1589.002 Email Addresses · T1593 Search Open Websites/Domains · T1595.003 Wordlist Scanning
🛡 Defender's checklist
• Monitor certificate transparency for your names and look-alike domains
• Delete DNS records that point to resources you no longer own
• CI, dev and staging never public: VPN or IP allowlist
• Keep a real asset inventory; decommission or patch forgotten systems
• Zone transfers only to your secondary name server
• Publish DMARC: p=none, then quarantine, then reject
• Strip metadata before publishing documents
• Re-test your attack surface every month
📺 Full course playlist:
⏮ Previous episode – #2 Think Like a Pro Hacker:
⏭ Next episode – #4 Nmap Deep Dive: scan types, timing & NSE: [EP4 LINK]
📝 Homework: map your own organization: CT logs, subdomains, email format and DMARC. Then find one thing you can shut down.
👍 If this helped, like & subscribe, it keeps the course free.
© netacademy.ge
#KaliLinux #EthicalHacking #OSINT #CyberSecurity #BugBounty