Recon & enumeration

Passive vs active recon, subdomain/port/service discovery on your OWN lab or an authorized scope. Framed strictly for defenders and scoped pentests — never unauthorized targets.

About 25 min read3-question knowledge check

The mental model

Recon is making a map before you make a move — and the only maps you are allowed to draw are of buildings you own or have written permission to survey. Before anyone tests a system, they inventory it: what hosts exist, what services listen, what versions run, what endpoints and users are exposed. That inventory is the attack surface, and whoever draws it more completely — attacker or defender — has the advantage.

The framing that must come first, every time, in interviews and in practice: authorization is not a footnote, it is the whole license to act. Every technique below is legitimate against your own lab, your own domains, or a scope you have explicit written authorization to test (a signed pentest engagement, a bug-bounty program's in-scope list, a CTF). Run the same commands against a system you do not own and it is a crime under laws like the Computer Fraud and Abuse Act and India's IT Act — full stop. The candidate who leads with "first I confirm scope and authorization" is the one who gets hired; the one who seems eager to point tools at arbitrary targets is the one who does not.

The analogy that sticks: recon is a real-estate surveyor, not a burglar. A surveyor with a commission walks the perimeter, photographs the exterior, checks public records, then — with the owner's key — inventories every door and window. The value is the *complete inventory*, because you cannot secure (or, under authorization, test) what you did not know was there. The defender's twist is the punchline: the recon an attacker does against you is exactly the attack-surface management you should be doing against yourself. Same tools, same output, opposite intent — and running it on your own estate first means you find the forgotten staging subdomain before anyone else does.

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision