SPA Calibration in Content Discovery
TL;DR. Decide whether to filter repeated 200 status codes by the exact body size of the single-page application fallback page or keep unique responses. Operators mistake client-side catch-all routing for thousands of exposed server files. The decision hangs on the baseline calibration record in content/app-calibration.json.
This chapter deepens the content discovery workflow from Content and API discovery.
The decision
Section titled “The decision”When ffuf with -ac returns hundreds of HTTP 200 responses sharing one body length on a single-page application host, what value do you supply to -fs, and which 200 responses do you keep?
The tempting wrong answer treats every 200 response as an exposed server file, logging thousands of false findings into your queue. Another wrong reaction discards every 200 response across the host, blinding you to genuine API endpoints, documentation files, and client source maps.
You hold content/app-raw.json from your initial discovery run and content/app-calibration.json from your baseline probe.
Evaluate responses across four branches:
- Matching fallback shell. Length matches the 4,128-byte fallback size and contains the root container. Drop the response using
-fs 4128. These paths are virtual client routes. Discard them from your route list. - Unique static asset. Returns 200 with a distinct size or asset extension (
.js,.json,.map). Keep the response and checkContent-Type. - Backend API route. Returns 200, 401, or 403 under prefixes like
/api/. Keep the record. Backend services bypass the SPA catch-all router. - Jitter size. Fallback lengths vary from 4,128 to 4,135 bytes due to tokens. Filter with
-fw 312or-fs 4128,4129,4130,4131,4132,4133,4134,4135.
Filtering by one body size risks dropping an authentic administrative endpoint whose body matches that byte count. Retaining every response swarms your storage with duplicate HTML documents. Verifying the Content-Type header resolves this trade-off.
The program cap permits 10 requests per second. Set -rate 10 and -t 5 in ffuf. Scanning at ten requests per second prevents target overload.
Where the data comes from
Section titled “Where the data comes from”The mechanism is active HTTP path fuzzing combined with baseline calibration probes.
ffuf with -ac sends four calibration requests with random non-existent paths. On an SPA, unmatched routes rewrite to index.html, returning HTTP 200. Variations in server timestamps or session tokens alter body hashes, letting subsequent 200 responses pass.
Send a baseline probe using curl before launching dictionary scans.
# Capture the single-page application baseline response size and headerscurl -s -i https://app.example.com/cal-probe-7x9q | head -n 25Each field comes from a distinct point in the network exchange:
status: Parsed from the HTTP status line on the TCP socket.length: Body byte count received after headers.words: Whitespace-separated tokens parsed by ffuf.lines: Newline characters parsed in the body.content_type: Value of theContent-Typeresponse header.
The raw output cannot contain client runtime state, JavaScript variables, or virtual DOM trees. It records HTTP transport metadata returned by the origin server.
Attach your decision to content/app-calibration.json for baseline metrics and content/app-raw.json for discovery records.
# Execute calibrated content discovery capped at ten requests per secondffuf -u https://app.example.com/FUZZ -w ~/wordlists/quickhits.txt -fs 4128 -rate 10 -t 5 -o content/app-raw.json -of jsonThree records
Section titled “Three records”# SAMPLE, invented{"input":{"FUZZ":"settings/account"},"status":200,"length":4128,"words":312,"lines":42,"content_type":"text/html; charset=utf-8"}{"input":{"FUZZ":"api/v1/config"},"status":200,"length":184,"words":12,"lines":2,"content_type":"application/json"}{"input":{"FUZZ":"static/app.js.map"},"status":200,"length":654120,"words":8920,"lines":1,"content_type":"application/json"}The first record is settings/account.
This record asserts that the server returned HTTP 200 with 4,128 bytes and 312 words of HTML.
This record does not assert that a server-side resource exists at settings/account. The response matches the baseline SPA fallback shell.
Drop reason: This path is a virtual client route. Drop it from your server route list.
The second record is api/v1/config.
This record asserts that the backend API gateway returned HTTP 200, 184 bytes, and JSON content.
This record does not assert that the endpoint leaks secrets or lacks authorization.
Next command: Inspect the JSON body to check for internal hosts.
# Fetch the API configuration payload directlycurl -s https://app.example.com/api/v1/config -o content/api-config.jsonThe third record is static/app.js.map.
This record asserts that the server hosts an unminified source map of 654,120 bytes.
This record does not assert that source files contain exploitable bugs.
Next command: Download the source map to extract developer source files.
# Download the client source map for code inspectioncurl -s https://app.example.com/static/app.js.map -o content/app.js.mapThe convincing dud
Section titled “The convincing dud”The convincing dud is /admin/portal/users.
In raw ffuf results, this path returns HTTP 200 with 4,128 bytes. An analyst sees admin with HTTP 200 and assumes an exposed console.
The check that kills it requests the endpoint with curl.
# Verify whether the admin path returns the SPA shellcurl -s https://app.example.com/admin/portal/users | head -n 15The output shows the root HTML document with <div id="root"></div> and /static/bundle.js. The server hosts no panel here.
The sentence you write in notes:
Route /admin/portal/users returns HTTP 200 with the 4,128-byte SPA shell, confirming client fallback routing.
The bad read equates HTTP status 200 with server route existence. Single-page applications return 200 for every requested path. Relying on status codes without checking body length and signatures generates empty reports.
What this step cannot see
Section titled “What this step cannot see”This step cannot see private API endpoints and client routing definitions hidden inside packed JavaScript bundles. Dictionary brute force relies on precompiled wordlists. When developers choose proprietary route names like /tenant-admin-v3/, dictionary guessing fails to generate them.
The check that catches it extracts script URLs from HTML, downloads bundle files, and parses JavaScript AST nodes or string literals.
# Extract API paths and routes from downloaded JavaScript bundlescat content/app.js | grep -Eo '"/api/[^"]+"' | sort -u > content/js-discovered-routes.txtThis is a different step because phase 11 performs active network dictionary probing by sending HTTP GET requests. Analyzing JavaScript bundles is a static code analysis process executed in phase 9.
When you stop
Section titled “When you stop”Run follow-up directory brute force only when a non-SPA directory returns non-shell status codes with non-HTML bodies. Prefixes like /api/ or /static/ warrant deeper wordlists.
If after filtering with -fs 4128, the target yields zero hits from a 5,000-word list, stop probing paths. Leave the host and proceed to JavaScript extraction.
Maintain probe frequency at or below the program limit of 10 requests per second. If the server responds with HTTP 429 or 503 on five consecutive probes, pause probing immediately. Resume after a two-minute backoff period.
A 5,000-entry wordlist executed at 10 requests per second finishes in 8.5 minutes. If a scan exceeds 12 minutes due to latency, terminate the job.
An automated pipeline must fail closed. When the baseline probe fails to confirm a reliable fallback length, the pipeline halts. It writes an alert into content/calibration-failure.log and refuses to run large wordlists.
The file you hand off
Section titled “The file you hand off”You write filtered records to content/spa-valid-endpoints.tsv.
The file contains six tab-separated columns:
path: The discovered URL path.status: The HTTP response code.length: The body size in bytes.words: The word count.content_type: The MIME type from the response header.classification: The category designating asset, api, or administrative route.
The next step asks one question: Does this discovered endpoint accept user parameters, or does it expose software version information?
Pass API routes to Parameter discovery to find hidden inputs, and pass exposed libraries to Fingerprinting to identify software versions.
Unverified
Section titled “Unverified”| Where | Claim | Why it is uncertain |
|---|---|---|
| Single-page app root catch-all handler | Every response matching the baseline 4,128-byte length is a false positive | A genuine administrative route or error page can match the fallback length by coincidence |
| Dynamic HTML shell rendering | Body size remains constant across all probes | Dynamic CSRF tokens, anti-bot scripts, or server timestamp comments shift response sizes by several bytes |
Static assets directory at /static/ |
Any HTTP 200 response indicates a sensitive project file | Public UI frameworks, icons, and open-source styles return 200 without exposing custom code |
| Client-side route declarations | A path extracted from JavaScript corresponds to an active server route | Frontend routers frequently define historical or planned routes lacking backend handlers |
Open local graph around this page
Recon AtlasFor authorized testing only. Your scope is the map edge.