Endpoint spidering
TL;DR: Crawl the rendered app — not just static HTML — to surface routes, hidden parameters, and internal API calls that scanners miss; katana, hakrawler, and gospider with headless mode are the workhorses.
What it is
Endpoint spidering walks the application like a browser would, following anchor tags, form actions, fetch/XHR calls, and JS-emitted URLs to build a request inventory. Modern SPAs render most of their attack surface client-side, so a wget --mirror pass captures almost nothing — you need a headless crawler that executes JS, intercepts network calls, and follows the dynamic routes. Output feeds content-discovery, wordlist-fuzzing-tactics, and the per-endpoint checklist from testing-methodology-checklists.
Preconditions / where it applies
- Live, reachable host (HTTP 200/302 on root)
- Authenticated and unauthenticated sessions when the app has both — crawl each separately
- For SPAs: a crawler with headless Chrome (katana
-headless, gospider with-js)
Technique
- Seed the crawl from
httpxoutput so you only spider live hosts:1
katana -list live.txt -d 3 -jc -kf all -aff -hl -silent -o endpoints.txt
Flags:
-jcparses JS for endpoints,-kf allenables known-files (robots, sitemap, swagger),-affauto-fills forms,-hlheadless. - Complement with passive sources — Wayback (
waybackurls), Common Crawl (gau), URLScan, AlienVault OTX. Stale URLs often reveal removed-but-still-live endpoints.1
gau --subs target.tld | tee gau.txt
- Run an authenticated crawl. Burp/Caido proxy mode + manual click-through still beats automated auth for complex flows; export the proxy history as
.harand merge with the spider output. - Extract parameter names with
unfurl keysorparamspider. Distinct param names per endpoint are the input for fuzzing campaigns and IDOR hunting (see common-issues-to-start-with). - Diff today’s crawl against yesterday’s — new endpoints are the highest-yield triage targets in a continuous-recon-automation loop.
- Normalise: strip session tokens, sort, dedupe by
host + path + paramset. A clean endpoint list is reusable across nuclei, ffuf, and manual hunting.
Detection and defence
- Headless crawlers leave a distinctive UA and request rhythm; WAFs flag rapid sequential GETs from one IP
- Defenders should treat any non-browser UA hitting hidden routes as suspicious — log JSON-API 401s and watchlist source IPs
- For the hunter: throttle (
-rlin katana,-cconcurrency) and rotate egress on programs that ban aggressive crawling
References
- projectdiscovery/katana — headless-aware crawler, current best-in-class
- hakluke/hakrawler — fast Go crawler, good for piping
- HackTricks web pentesting methodology — where crawling sits in the wider flow