Skip to content
PHASE 08/16OP ARCHIVE

URL and endpoint discovery

Noise
Passive and active
Reads
http/live.txt
Writes
urls/raw.txturls/clean.txt

Scope checkActive phase. Check the program policy first. Send traffic only to in-scope assets, at the rate the program allows.

4 min readRecon Atlas

Build a list of every path and query string the target has ever exposed. Two sources feed it:

  • Archives (Wayback Machine, Common Crawl, AlienVault OTX, URLScan) remember URLs from years ago. Passive.
  • Crawlers follow links and parse JavaScript on the live site today. Light active.

Old URLs matter. Endpoints get removed from the UI long before they get removed from the server.

Tool Noise Role Status
gau Passive URLs from Wayback, Common Crawl, OTX and URLScan Maintained
waybackurls Passive Wayback Machine URLs only, tiny and fast Works, rarely updated
Waymore Passive More archive sources than gau, can download archived responses Maintained
urlfinder Passive ProjectDiscovery’s passive URL collector Maintained
Katana Light active Crawler with JavaScript parsing and optional headless mode Maintained
Hakrawler Light active Simple fast crawler Works
GoSpider Light active Crawler that also pulls from archives Rarely updated
uro Passive Removes near-duplicate URLs. Local only Maintained

Crawl http/live.txt only. A parked domain burns timeouts. Keep the crawler on your domains. An unbounded crawl follows links out to analytics hosts and the identity provider. Skip logout, sign-out, and account-deletion URLs.

https://api.example.com/v1/export/users?format=csv&token=8f9a2b3c4d5e

Some client requested /v1/export/users with format=csv and that token, and an archive stored the URL. It does not mean the route still exists, that the token still works, or that an anonymous caller can download users. It tells you the old route is worth requesting again.

https://app.example.com/api/v2/organizations/{orgId}/billing/invoices

Katana found that string in a script on app.example.com. It does not mean the route is mounted, public, or finished. It can be an unreleased feature or an admin API.

httpx -l urls/clean.txt -mc 200 marks thousands of dead routes as live, including /old-portal/1999 and /admin-beta. The single-page app returns the same index.html shell for every path. If the length matches a request for a path you know is fake, the 200 is the shell, not the old endpoint.

The crawl file fills with /events/calendar?year=2015&month=04&day=12 and /shop?filter=shoes&color=red&size=10&sort=asc&page=842. The crawler followed pagination and filters without a stop. Kill it and exclude that path.

urls/with-params.txt contains https://example.com/assets/vendor/jquery.min.js?v=3.6.0 and https://example.com/fonts/glyphicons.woff?#iefix. The archive stored every asset the HTML referenced. gau --blacklist and uro exist so those lines never reach a parameter fuzzer.

uro collapses numbered ids into one pattern. That hides a handler that behaves differently for one id. If a parameter changes what the handler does, keep one URL for each behavior before you trust urls/clean.txt.

  1. Archives first. These are passive, so run them even on manual-only programs.

    Terminal window
    # gau: all providers, include subdomains, skip static files
    gau --subs --threads 5 --blacklist png,jpg,jpeg,gif,svg,ico,woff,woff2,ttf,css example.com > urls/gau.txt
    Terminal window
    # waybackurls: Wayback Machine only
    echo example.com | waybackurls > urls/wayback.txt
    Terminal window
    # Waymore: URLs only (mode U), so it does not download archived pages
    waymore -i example.com -mode U -oU urls/waymore.txt
    Terminal window
    # urlfinder: every passive source it knows
    urlfinder -d example.com -all -o urls/urlfinder.txt
  2. Crawl live hosts. Katana with -jc reads JavaScript files for endpoints, and -kf all checks robots.txt and sitemap.xml. Depth 3 is plenty for a first pass.

    Terminal window
    # Crawl every live host, parse JS, rate-limited to 20 requests per second
    katana -list http/live.txt -d 3 -jc -kf all -rl 20 -c 10 -silent -o urls/katana.txt
    Terminal window
    # Hakrawler as a quick second crawler on the same hosts
    cat http/live.txt | hakrawler -d 2 -subs > urls/hakrawler.txt

    For single-page apps that build links in the browser, run Katana in headless mode. It drives real Chrome, so it finds routes the static crawl misses.

    Terminal window
    # Headless crawl of one SPA, parsing JS and following XHR
    katana -u https://app.example.com -headless -jc -d 3 -rl 20 -c 10 -silent -o urls/katana-headless.txt

    The crawls above are logged out, so they only see the public surface. Most of the interesting endpoints sit behind the login. Feed Katana your session as a cookie or header, and it crawls what your account can reach.

    Terminal window
    # Authenticated crawl: pass the session cookie, or any header the app needs
    katana -u https://app.example.com -headless -jc -d 3 -rl 20 -c 10 \
    -H "Cookie: session=YOUR_SESSION_COOKIE" -silent -o urls/katana-auth.txt

    Scope an authenticated crawl tightly and keep logout, sign-out and account-deletion paths excluded, or the crawler will end your session or delete your test account.

  3. Merge and keep only in-scope URLs.

    Terminal window
    # Merge all sources, keep URLs on example.com hosts
    cat urls/gau.txt urls/wayback.txt urls/waymore.txt urls/urlfinder.txt urls/katana.txt urls/katana-headless.txt urls/katana-auth.txt urls/hakrawler.txt 2>/dev/null \
    | grep -Ei '^https?://([a-z0-9-]+\.)*example\.com(:[0-9]+)?(/|$)' | sort -u > urls/raw.txt
  4. Deduplicate with uro. It collapses /blog/1, /blog/2 and /blog/3 into one, and drops static and boring URLs. A list of 400,000 often shrinks to 20,000.

    Terminal window
    # Remove near-duplicates and noise
    uro -i urls/raw.txt -o urls/clean.txt
  5. Slice the list. A few cuts make it easy to read.

    Terminal window
    # URLs that carry query parameters
    grep '?' urls/clean.txt > urls/with-params.txt
    Terminal window
    # Interesting file extensions
    grep -Ei '\.(json|xml|ya?ml|env|bak|old|sql|zip|tar|gz|log|conf|config|txt|cfg|ini|php|aspx|jsp)(\?|$)' urls/clean.txt > urls/files.txt
    Terminal window
    # API-looking paths
    grep -Ei '/(api|v[0-9]+|graphql|rest|internal|admin)(/|$|\?)' urls/clean.txt > urls/api.txt
  6. First cut by bug class with gf. Before the deeper parameter work in phase 10, a one-pass gf split tells you which classes even have candidates on this target, so you know where to spend time.

    Terminal window
    # One file per bug class from the cleaned URL list
    mkdir -p urls/gf
    for p in xss sqli ssrf redirect lfi idor ssti; do gf "$p" < urls/clean.txt | sort -u > "urls/gf/$p.txt"; done
    wc -l urls/gf/*.txt

    These are leads, not findings. Phase 10 adds archived parameters and reflection checks on top of the same patterns.

  • JavaScript URLs in urls/clean.txt feed phase 9.
  • urls/with-params.txt feeds parameter work in phase 10.
  • urls/api.txt shapes API brute force in phase 11.
  • Crawling with no rate limit and no depth limit on a large site.
  • Keeping static assets in the list, which buries the endpoints.
  • Skipping archives because “the crawler found everything”. The crawler only sees what is linked today.
  • Forgetting that Waymore defaults to downloading archived responses when you pass a bare domain. Use -mode U when you only want URLs.
What to look for
  • Paths with admin, internal, debug, test, backup, export, import, upload, callback, webhook
  • Old API versions such as /api/v1/ when the app now uses /api/v3/
  • Parameters that take URLs or paths: url=, next=, redirect=, file=, path=, template=
  • Parameters that look like IDs: id=, user_id=, account=, uuid=
  • Swagger, OpenAPI and GraphQL paths: /swagger.json, /v2/api-docs, /openapi.yaml, /graphql

Next, read the JavaScript files from urls/clean.txt for routes and secrets in phase 9.

Connections5 backlinks · 3 outgoingFull 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.