Skip to content

Following up on 403 Forbidden responses

7 min readRecon Atlas

TL;DR. A 403 response with a body that differs from the soft 404 proves that the routing layer recognizes the path. The usual mistake is launching credential stuffing tools against the route when program rules ban authentication attacks. You filter your discovery output into content/forbidden.tsv, test safe path normalization probes at two requests per second, and stop when you confirm route behavior.


This chapter deepens the content and API discovery process from Phase 11: Content and API discovery.

Light active

During content discovery, ffuf flags a path returning HTTP 403 Forbidden with a body that differs from the calibrated soft 404. You must decide whether to run light verification, inspect surrounding assets, or drop the record.

The tempting wrong answer is launching brute-force authentication attacks. Testers often aim hydra at login forms. Bug bounty rules strictly ban automated credential testing. The opposite mistake is discarding every 403 response immediately. A 403 status proves that the routing layer recognizes the endpoint.

Your file in hand is content/app-dirs.json, generated by ffuf during Phase 11. You filter this file to isolate candidate paths for review.

Your decision splits into three branches:

  1. Drop immediately. The 403 comes from a cloud web application firewall edge rule matching generic block templates. You drop the record to save time.
  2. Probe path normalization. The 403 comes from an origin web server protecting /admin. You send safe probes to check trailing slashes and HTTP verb handling.
  3. Record API route. The 403 comes from an application framework returning structured JSON. You record the path in content/forbidden.tsv and cross-reference it with client-side JavaScript.

The trade-offs balance depth against noise. Probing every 403 slows discovery. Dropping every 403 risks missing exposed static assets inside administrative directories. If you send packets, cap your rate at two requests per second.

This decision relies on responses collected during content discovery. In Phase 11, ffuf tests wordlist paths against https://app.example.com/FUZZ. With -ac, ffuf measures baseline values for missing resources using random strings.

The scanner records responses deviating from that baseline into content/app-dirs.json.

Terminal window
# Filter 403 responses distinct from soft 404s into the follow-up triage list
jq -r '.results[] | select(.status == 403) | [.url, .status, .length, .words] | @tsv' content/app-dirs.json > content/forbidden.tsv

From the sample input, this command produces: https://app.example.com/admin 403 542 48

The output file cannot contain internal routing tables, access control rules, or backend code. It cannot confirm whether the 403 originates from an edge proxy or an application handler. You evaluate headers and body lengths against baseline responses.

# SAMPLE, invented
https://app.example.com/admin 403 542 48 nginx/1.24.0
https://app.example.com/api/v1/internal 403 198 14 envoy
https://app.example.com/.env 403 284 21 cloudflare

The first record is https://app.example.com/admin.

  • What it asserts: The origin Nginx server matches the /admin location block and returns status 403 Forbidden. The response length of 542 bytes differs from the server 404 template.
  • What it does not assert: It does not assert that an administrative console exists behind the path. It does not assert that child paths inherit the restriction.
  • Next command: Send a request with a trailing slash to observe if the server performs a redirect.
Terminal window
# Check if appending a trailing slash changes the access control evaluation
curl -s -o /dev/null -w "%{http_code} %{size_download}\n" -H "User-Agent: recon-depth" "https://app.example.com/admin/" >> content/forbidden-probes.txt

Expected result from the sample host: 301 178

The redirect shows that Nginx treats the path as a directory. You check the destination URL before further action.

The second record is https://app.example.com/api/v1/internal.

  • What it asserts: Envoy routes traffic for /api/v1/ to an internal service that rejects unauthenticated access with a 198-byte JSON error body.
  • What it does not assert: It does not assert that the API accepts public authentication. It does not assert that credentials can be guessed.
  • Next command: Send an OPTIONS request to check supported HTTP verbs without sending authentication payloads.
Terminal window
# Probe allowed HTTP methods on the restricted API route at two requests per second
curl -s -I -X OPTIONS --max-time 5 "https://app.example.com/api/v1/internal" >> content/forbidden-probes.txt

Expected result from the sample host: Allow: GET, POST, OPTIONS

The endpoint confirms valid HTTP methods. You record this path in content/forbidden.tsv and cross-reference it against JavaScript endpoints.

The third record is https://app.example.com/.env.

  • What it asserts: The request triggered a managed firewall rule at the Cloudflare edge.
  • What it does not assert: It does not assert that a .env file exists on the host filesystem.
  • Drop reason: The response length of 284 bytes matches the generic Cloudflare edge block page seen across unrelated paths. The origin server never evaluated the request. You drop this record.

A common trap occurs when testing path normalization headers on forbidden routes. You find https://app.example.com/console returning 403 Forbidden with an 840-byte body. You append custom headers such as X-Original-URL: /console or X-Forwarded-For: 127.0.0.1. The server responds with HTTP status 200 OK and a length of 1,420 bytes.

This looks like an authentication bypass. The check that kills this false positive sends that header to a random non-existent path:

Terminal window
# Verify whether custom proxy headers return a 200 response on non-existent endpoints
curl -s -o /dev/null -w "%{http_code} %{size_download}\n" -H "X-Forwarded-For: 127.0.0.1" "https://app.example.com/console-verify-random-91827" >> content/forbidden-probes.txt

Expected result: 200 1420

The proxy server returns a static 200 OK landing page for any request containing that header. The backend never evaluated /console. The apparent bypass was a soft 200 catch-all page generated by the reverse proxy.

You write this sentence in your notes: “Notes: Route /console returns 403 under standard headers; rewrite and forwarding headers cause the proxy to serve a generic 200 landing page with zero application data.”

This step relies on external HTTP requests sent across the public network. It cannot see backend routing logic that depends on internal network state.

If a server blocks /admin with a 403 status code for external IPs, public probes cannot reveal whether internal microservices reach that endpoint without authentication. Public requests cannot see endpoints protected by mutual TLS certificates.

The check that catches hidden internal functionality is static code extraction from JavaScript bundles. In Phase 09: JavaScript analysis, you parse client application code with tools like jsluice to extract internal route definitions and API schemas.

This check belongs to a separate step. Extracting endpoints from static scripts requires code parsing and AST analysis rather than sending repeated HTTP requests to active web servers.

You stop probing a 403 route when you determine whether it warrants further passive analysis.

The program rule is absolute: you stop testing whenever a route demands valid credentials. You never attempt credential stuffing or password guessing. When you see an authentication challenge, active testing on that path ends immediately.

Apply a strict time box. Spend no more than five minutes on any single 403 endpoint. Within those five minutes, you verify trailing slashes, check OPTIONS responses, and test if sibling static assets exist. If five minutes pass without identifying an unprotected sub-resource, record the path in content/forbidden.tsv and move to the next host.

In an automated reconnaissance pipeline, fail closed governs every action. If scope/policy.txt is missing, or if program rules ban active probing, the pipeline stops all follow-up requests. The worker writes an empty triage list and proceeds without sending a single probe.

If the program allows header and path tests, Transport tricks in the Broken Access Control field manual lists the verbs, headers and path forms worth trying. It is a separate manual with its own scope rules, so read them first.

You write verified forbidden endpoints to content/forbidden.tsv. The file uses tab-separated columns: url, status, length, words, server, and verdict.

Terminal window
# Save verified candidate records to the hand-off file
awk -F'\t' '$2 == "403" && $6 != "drop"' content/forbidden.tsv > content/forbidden-candidates.tsv

Expected line from content/forbidden-candidates.tsv: https://app.example.com/api/v1/internal 403 198 14 envoy api-lead

The next step uses this file to cross-reference candidate routes against application code. The primary question the next step asks is: “Does this confirmed forbidden route match any internal API endpoint identified in js/endpoints.txt?”

You hand this file off to Phase 09: JavaScript analysis for route correlation and Phase 12: Fingerprinting for component identification.

Where Claim Why it is uncertain
curl -I -X OPTIONS The Allow header lists all supported HTTP verbs. Many reverse proxies strip or hardcode the Allow header regardless of backend routing capabilities.
X-Original-URL / X-Rewrite-URL Custom rewrite headers bypass access restrictions on modern reverse proxies. Most production web servers ignore custom rewrite headers unless legacy rewrite modules are explicitly enabled.
ffuf -ac Auto-calibration reliably identifies all soft 404 response profiles across multi-tier applications. Applications serving dynamic error pages with varying timestamps or session identifiers can produce false negatives.
Connections0 backlinks · 4 outgoing · 1 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Recon AtlasFor authorized testing only. Your scope is the map edge.