# Recon Content Discovery

> Use when authorized recon has a live web target and needs to find its hidden paths, files, JavaScript endpoints, and API routes without guessing blindly. Covers wordlist-driven directory and file discovery, crawling and link extraction, JavaScript bundle analysis for endpoints and secrets hints, API route discovery from OpenAPI hints and client code, and validating every candidate with status, size, and content checks before it enters the target list. Authorized targets only, only probe hosts you are permitted to test.

- Skill: `mizazhaider-ceh/recon-content-discovery` (Agent Skill)
- Install (CLI): `npx get-skill add mizazhaider-ceh/recon-content-discovery`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mizazhaider-ceh/recon-content-discovery/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Product & Planning
- Author: mizazhaider-ceh (https://skillmd.com/u/mizazhaider-ceh)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/mizazhaider-ceh/recon-content-discovery

---


Subdomain enumeration finds hosts. Content discovery finds what lives on
them: admin panels, backup files, API routes, JavaScript bundles that name
internal endpoints, and forgotten directories that were never linked from
the main site. This skill covers that layer, and it only makes sense after
recon-active or recon-passive has confirmed a live web host. Everything
here is a request to the target, so scope, rate limits, and politeness
matter more than in passive work. Only probe hosts you are authorized to
test, and keep request rates inside what the program allows.

## Quick Workflow

1. Confirm the exact in-scope hosts and paths, and note any off-limits areas such as logout, delete, or payment endpoints.
2. Crawl the site from its root and collect every linked path, script, and form action.
3. Run wordlist directory and file discovery with status and size filtering.
4. Download JavaScript bundles found by crawling and extract endpoint strings, API paths, and parameter hints.
5. Look for API documentation hints, OpenAPI files, and client code references, and enumerate the routes they name.
6. Validate every candidate by status code, response size, and content, and drop soft 404s and wildcard responses.
7. Record confirmed paths with their evidence and hand them to web testing.

## 1. Confirm scope and set a safe baseline first

Before fuzzing, fetch the root and a known-missing path. The missing path
tells you what a 404 looks like on this host, including its size and body
shape, which is the baseline for filtering false positives later.

```bash
mkdir -p content/example.com
cd content/example.com
TARGET="https://app.example.com"
curl -sk -m 15 -o root.html -w "root status %{http_code} size %{size_download}\n" "$TARGET/"
curl -sk -m 15 -o notfound.html -w "missing status %{http_code} size %{size_download}\n" "$TARGET/no-such-path-xyz12345"
wc -c root.html notfound.html
grep -oiE "<title>[^<]*</title>" root.html notfound.html
```

If the missing path returns 200 with the root page content, the host uses
soft 404s, and every later discovery run needs size and content filtering,
not status filtering alone. Record the baseline size and title in the run
notes.

## 2. Crawl linked content before fuzzing blindly

Crawling finds real paths cheaply, and it tells you the site structure so
fuzzing can target the right directories instead of spraying the root.
Collect links, script sources, and form actions from fetched pages, and
follow them one level at a time.

```bash
# Extract links, scripts, and form actions from the root page
grep -oiE 'href="[^"]+"' root.html | sed 's/href="//; s/"//' | sort -u > crawled-links.txt
grep -oiE 'src="[^"]+\.js[^"]*"' root.html | sed 's/src="//; s/"//' | sort -u > js-files.txt
grep -oiE 'action="[^"]+"' root.html | sed 's/action="//; s/"//' | sort -u > form-actions.txt
wc -l crawled-links.txt js-files.txt form-actions.txt
cat crawled-links.txt
cat js-files.txt
```

A crawler that follows every link without a depth limit can wander into
user content, pagination loops, or logout links. Cap depth, skip logout
and delete actions entirely, and never submit forms during discovery.

## 3. Wordlist directory and file discovery

Wordlists turn guessing into coverage. Start with a small, common wordlist
for a first pass, then a larger one only for directories that proved
interesting. Filter by the baseline 404 size, and keep the raw output so
filtering decisions can be revisited.

```bash
# Directory discovery with ffuf, filtering the known 404 size
# Replace NOTFOUND_SIZE with the size measured in step 1
ffuf -u "$TARGET/FUZZ" -w /usr/share/wordlists/dirb/common.txt \
  -fc 404 -fs NOTFOUND_SIZE -o ffuf-dirs.json -of json -t 20
jq -r '.results[] | "\(.status) \(.length) \(.url)"' ffuf-dirs.json | sort -u > ffuf-dirs.txt
cat ffuf-dirs.txt

# Extension discovery on the root, for backup and config style files
ffuf -u "$TARGET/FUZZ" -w /usr/share/wordlists/dirb/common.txt \
  -e .php,.bak,.old,.txt,.json -fc 404 -o ffuf-files.json -of json -t 20
jq -r '.results[] | "\(.status) \(.length) \(.url)"' ffuf-files.json | sort -u > ffuf-files.txt
cat ffuf-files.txt
```

Gobuster gives the same coverage with a different output shape, which is
useful as a cross-check when ffuf results look odd:

```bash
gobuster dir -u "$TARGET" -w /usr/share/wordlists/dirb/common.txt \
  -s 200,204,301,302,307,401,403 -o gobuster-dirs.txt -t 20
head -30 gobuster-dirs.txt
```

A 403 is a finding, not a miss. It proves a path exists behind an access
control, and it belongs in the confirmed list with its status noted. A
401 likewise proves an authenticated area exists. Only soft 404s and
genuinely missing paths get dropped.

## 4. JavaScript bundle analysis for hidden endpoints

JavaScript bundles are maps of the application that the server never
intended to publish as documentation. Download each bundle found by
crawling, then extract URL-like strings, API paths, and parameter names.
Do this locally, on files you already fetched, not by fuzzing the bundle
URLs further.

```bash
# Download each JS file found by crawling, keeping the original name shape
while read -r js; do
  case "$js" in
    http*) url="$js" ;;
    /*) url="$TARGET$js" ;;
    *) url="$TARGET/$js" ;;
  esac
  fname=$(echo "$js" | tr '/:?&=' '_____')
  curl -sk -m 20 "$url" -o "js-$fname" || echo "failed - $url"
done < js-files.txt
ls -lh js-* | head -20

# Extract endpoint-like strings from the downloaded bundles
grep -rhoE '"/(api|v1|v2|graphql|internal|admin)[^"'"'"' ]*"' js-* 2>/dev/null | sort -u > js-endpoints.txt
grep -rhoE "https?://[a-z0-9.-]+\.example\.com[^\"' ]*" js-* 2>/dev/null | sort -u > js-hosts.txt
wc -l js-endpoints.txt js-hosts.txt
head -30 js-endpoints.txt
```

Endpoint strings in JavaScript are hints, not confirmed routes. Every
string goes through validation in step 6 before it enters the target
list. Strings naming other organizations, public libraries, or example
domains get filtered out, not reported.

## 5. API route discovery from documentation hints and client code

API routes hide in OpenAPI files, client SDK code, and error messages.
Check the standard documentation locations first, then follow whatever
the client code names, before brute forcing API paths.

```bash
# Standard API documentation and schema locations, probed once each
for p in openapi.json swagger.json api-docs v3/api-docs graphql .well-known/openapi.json; do
  code=$(curl -sk -m 15 -o /dev/null -w "%{http_code}" "$TARGET/$p")
  echo "$p $code"
done

# If an OpenAPI file exists, list its paths with jq
curl -sk -m 15 "$TARGET/openapi.json" -o openapi.json
jq -r '.paths | keys[]' openapi.json 2>/dev/null | sort -u > api-paths.txt
wc -l api-paths.txt
head -30 api-paths.txt
```

A GraphQL endpoint deserves its own note: a single `/graphql` path can
expose an entire schema through introspection where it is enabled, and
that schema is a route list in itself. Record whether introspection
responds, and do not run destructive mutations during discovery.

## 6. Validate candidates and drop soft 404s

Validation is the step that separates a discovery list from a fuzzing
dump. For each candidate, record status, size, and a content snippet, and
compare against the baseline 404 from step 1.

```bash
# Validate every candidate path once, recording status and size
cat ffuf-dirs.txt ffuf-files.txt api-paths.txt 2>/dev/null \
  | awk '{print $NF}' | sort -u > candidates.txt
while read -r url; do
  out=$(curl -sk -m 15 -o /tmp/validate-body -w "%{http_code} %{size_download}" "$url")
  title=$(grep -oiE "<title>[^<]*</title>" /tmp/validate-body | head -1)
  echo "$out $url $title"
done < candidates.txt > validated.txt
sort -u validated.txt | head -40
```

Drop a candidate when its status and size match the baseline 404, when
its body is identical to the root page (soft 404), or when it is a
wildcard response that answers for any path. Keep a candidate when its
status is 200, 401, or 403 with distinct content, or when its size and
title differ from the baseline even on a 404 status, because some
applications return 404 with a real, distinct error page for existing
routes.

## Edge cases

- Soft 404s defeat status-only filtering. Always filter on size and
  content as well, using the baseline measured in step 1.
- Rate limiting can make a live path return 429 during a run, which
  looks like a miss. Slow the rate, retry 429s once after a pause, and
  record the retry in the run notes.
- Case sensitivity differs by server. A path that 404s in lowercase may
  exist in mixed case on case-sensitive servers, and vice versa on
  Windows-style hosting. Test the case the application itself uses, as
  seen in crawling, before declaring a path missing.
- JavaScript bundles can be large, minified, and split across chunks.
  A single bundle rarely holds every endpoint, so collect every chunk
  the crawler found, including dynamically loaded ones named in the
  main bundle.
- API versioning means `/v1/users` and `/v2/users` are different routes
  with different behavior. Record the version prefix, do not collapse
  versions into one entry.
- Fuzzing can trigger account lockouts, log spam, or state changes if
  it touches logout, delete, or action endpoints. Exclude those paths
  from wordlists by filtering them out of candidates before probing.

## Key references

- MITRE ATT&CK T1590 Gather Victim Network Information
- MITRE ATT&CK T1590.004 Network Topology
- OWASP Web Security Testing Guide, Information Gathering: https://owasp.org/www-project-web-security-testing-guide/
- ffuf documentation: https://github.com/ffuf/ffuf
- gobuster documentation: https://github.com/OJ/gobuster
- OpenAPI specification: https://spec.openapis.org/oas/latest.html

