Recon & Attack-Surface Mapping
> Recon is not a phase you finish; it is a map you keep redrawing. The best reports in this corpus > almost always start with a target the reporter reached because they enumerated harder than anyone > else โ a forgotten subdomain, a staging host, an internal API path leaked in JS, a deprecated > mobile endpoint. This page is the reusable recon methodology distilled from those reports, in the > HackTricks operational style. General background is marked as such; concrete tells are cited to the > case studies where they show up (see the class pages).
ยงMental model
Attack surface = every place your input reaches their code. You expand it along four axes:
- Horizontal โ more hosts/apps owned by the same org (root domains, acquisitions, ASNs).
- Vertical โ more of one app (subdomains, vhosts, paths, params, API versions, methods).
- Historical โ things that used to exist (Wayback, old JS, deprecated
/v1APIs, backups). - Client-side โ everything shipped to the browser/app (JS bundles, source maps, mobile APKs).
The scarce resource is unique surface. Anyone can run nuclei on the apex. Bounties live where enumeration is annoying: acquisition domains, per-tenant subdomains, internal tooling exposed by a misconfig, an API version the web UI no longer uses.
ยงHorizontal enumeration (find more roots)
Tells that a host is in-scope-adjacent: shared TLS cert SANs, shared favicon, shared analytics/GTM ID, shared error page, shared login SSO. Always confirm scope before testing.
ยงVertical enumeration (drill into one app)
Subdomains
Prioritize: dev. staging. uat. internal. admin. api. test. vpn. jira. git. โ non-prod hosts skip auth/rate-limits and leak the most. Dangling CNAMEs โ subdomain takeover (see attack-surface/subdomain-takeover โ this is one of the highest-ROI recon findings).
Content & endpoints
The single richest recon source: JavaScript
Modern SPAs ship their entire API surface to the client. Mine it:
Leaked API keys, internal hostnames, feature flags, and unreferenced admin endpoints all live here. (See vulnerabilities/info-disclosure for real cases of secrets-in-JS โ escalation.)
ยงHistorical enumeration
- Wayback /
gauโ dead endpoints often still work and skip new auth checks. Old?debug=,
?admin=, and legacy param names resurface here.
.git,.svn, backups โ/.git/config,/.env,/backup.zip,/config.php.bak,
editor swap files (.php~, .swp). git-dumper reconstructs the repo from an exposed .git/.
- Deprecated API versions โ
/api/v1/may lack the authz the web UI's/api/v3/enforces.
ยงAPI-specific recon
GraphQL: always test introspection (__schema) โ even "disabled" introspection often leaks types via field-suggestion errors. See attack-surface/graphql.
ยงMobile as recon
Decompile the APK/IPA โ it is a signed manifest of the backend:
Mobile apps hit endpoints the web app never exposes, embed long-lived tokens, and disable pinning in debug builds. (See the mobile pages under attack-surface/.)
ยงPrioritization โ where the bounties actually are
From the corpus, the endpoints that repeatedly pay:
- URL/host-fetch params (
url=,image=,webhook=,callback=,avatar_url=) โ SSRF. - ID params (
id=,uuid=,account=,/users/<id>/) โ IDOR/BOLA. - Redirect params (
next=,return=,redirect_uri=,continue=) โ open redirect / OAuth theft. - Render/preview features (PDF export, screenshot, "import from URL", markdown preview) โ SSRF/XSS/XXE.
- File upload + processing (avatars, attachments, import) โ upload RCE, XXE, image parsers.
- Admin/tooling subdomains and staging hosts โ auth bypass, debug endpoints, verbose errors.
ยงRecon hygiene
- Stay in scope; confirm acquisitions are covered before touching them.
- Passive before active. Don't brute-force production login/reset flows during recon.
- Keep a per-target notes file: hosts, tech, interesting params, and questions to answer next.
- Recon output feeds the vuln-class pages: pipe discovered params into the detection probes there.
ยงReferences
- Cross-links:
methodology/choosing-targets.md,attack-surface/subdomain-takeover.md,
attack-surface/graphql.md, vulnerabilities/ssrf/, vulnerabilities/info-disclosure/.
- Reference books: Bug Bounty Bootcamp (ch. Recon), Real-World Bug Hunting.
- Corpus case studies that begin with superior recon are cited on each class page.