Recon & Attack Surface Mapping

Finding everything a target exposes before testing it

You can only test what you know exists. Reconnaissance builds a map of the target's attack surface: domains, servers, services, web pages and APIs. Passive recon uses public sources without touching the target; active recon probes the systems in scope directly.

Beginner · 5 steps

Passive sourcesCertificate Transparency, DNS, search engines, public code
Active toolsNmap, web crawlers, content discovery
ATT&CK tacticReconnaissance (TA0043)
TechniqueT1595 (Active Scanning)
OutputPrioritised attack-surface map
Defender viewKnow your own surface first

Step by step

  1. Passive: certificates and DNS Without touching the target

    Every public TLS certificate is recorded in Certificate Transparency logs, so searching them for shop.example lists hostnames the company has used: www, api, staging, api-old. DNS lookups then show which of them still resolve and where they point.

  2. Passive: public footprint Code, jobs and old pages

    Public code repositories, job adverts ("experience with Django and Redis") and archived versions of the website reveal the technology stack, old URLs and sometimes leaked configuration. All of this is collected without sending a single packet to the target.

  3. Active: port and service scan Only hosts in scope

    With the hosts confirmed in scope, the tester runs Nmap at a gentle rate to find open ports and identify services and versions. The forgotten api-old host has HTTPS open and runs an outdated framework version.

  4. Web content discovery Pages nobody links to

    On the web servers, the tester crawls the site, reads robots.txt and the JavaScript files, and tries a list of common paths at a low rate. JavaScript bundles often reveal API routes; here they mention an admin endpoint and the old API version.

  5. Build the map Decide what to test first

    Everything goes into one attack-surface map: hosts, services, versions, endpoints and who owns them. Forgotten, outdated and unauthenticated assets go to the top of the list. For defenders, the same map shows what to retire or patch, and a dangling DNS record pointing at a deleted cloud service is flagged as a subdomain takeover risk.

Best practices

More in Penetration Testing.