Skip to content

Verifying JavaScript endpoints

6 min readRecon Atlas

TL;DR. You must decide if a path extracted by jsluice maps to an active backend route. The usual mistake treats every parsed string literal as a live API endpoint ready for automated scanning. The decision hangs on the evidence in js/endpoints.txt compared against live HTTP responses.


This guide deepens the endpoint extraction phase in Phase 09: JavaScript analysis.

Light active

jsluice writes /api/admin/export into js/endpoints.txt. What do you check before you treat it as a live route?

The tempting wrong answer feeds raw paths directly into active fuzzers or vulnerability scanners. Client scripts contain string fragments, template literals, and dead routes that lack backend handlers. Fuzzing every extracted string floods scanners with dead requests and triggers defensive blocks.

You hold three files in your workspace: the extracted path list in js/endpoints.txt, the source index in js/index.tsv, and the script files in js/files/. You evaluate each path on example.com and choose one of three branches.

First, the path is a verified backend route. The server returns status 200 with application/json, or returns status 401, 403, or 405 with structured error details. These codes prove a backend handler exists. You promote the path to endpoints/verified.tsv.

Second, the path is a client-side route or dead string. The server returns status 200 with HTML containing the application shell, or returns status 404 across GET and POST. The path exists only in browser logic or dead code. You drop the path from backend queues.

Third, the path is an ambiguous or gated route. The server redirects to an external provider, returns a WAF challenge, or returns status 429. You save the path for manual browser inspection.

Probing carries clear trade-offs. Fast probing trips firewalls and exhausts rate limits. Skipping verification leaves downstream scanners targeting dead URLs.

Send verification requests at a controlled rate. Keep traffic between 5 and 10 requests per second on 203.0.113.0/24.

The data comes from static analysis of client scripts during JavaScript analysis. The tool jsluice parses the abstract syntax tree of each file in js/files/. It traverses nodes to find string literals, template literals, and function arguments that construct URLs.

The extraction step produces three files: js/endpoints.txt stores extracted URL paths, js/index.tsv maps the 16-character SHA-1 hash of each saved script to its source URL on example.com, and js/files/ holds the downloaded scripts.

Client-side JavaScript bundles have strict limits. Bundles contain client code for browser execution. The source cannot contain server routing configurations, backend route definitions, API gateway maps, or deployment status. It cannot confirm whether a route exists on the production backend.

You connect the path in js/endpoints.txt to its origin by searching js/files/. This reveals the parent script and syntax tree context.

Terminal window
# Search downloaded JavaScript files for the target path
grep -Hn "/api/admin/export" js/files/*.js

You use the resulting file hash to find the original source script in js/index.tsv.

Terminal window
# Look up the original script URL from the file hash
grep "a1b2c3d4e5f60718" js/index.tsv
# SAMPLE, invented
/api/admin/export
/app/views/admin/export
/api/v1/internal/health

The first record is /api/admin/export. This record asserts that the string /api/admin/export appears inside client script js/files/a1b2c3d4e5f60718.js. It does not assert that the route is mounted on the production server, accepts GET requests, or responds to external callers. Next command: Check the surrounding code context in js/files/a1b2c3d4e5f60718.js. Then probe the path with httpx to inspect response status and content type.

Terminal window
# Probe the extracted route to inspect response status and content type
echo "https://example.com/api/admin/export" | httpx -status-code -content-type -content-length -silent

The second record is /app/views/admin/export. This record asserts that the string /app/views/admin/export exists inside the client bundle. It does not assert that the web server or API gateway routes network requests for this path. Drop reason: Source code inspection reveals that this string is an argument to a client router component. The path defines a browser view rendered by JavaScript. The server has no backend handler for this path. Drop the record from backend scan lists.

The third record is /api/v1/internal/health. This record asserts that the string /api/v1/internal/health exists in a diagnostic helper module inside js/files/c3d4e5f6a7b8c9d0.js. It does not assert that the diagnostic endpoint is enabled in production or exposed to external IP addresses on 203.0.113.0/24. Next command: Send an HTTP request to verify if the path is reachable on the origin server.

Terminal window
# Test whether the internal health route responds on the origin server
curl -sk -i https://example.com/api/v1/internal/health | head -n 15

If the server returns status 404 from the edge reverse proxy, drop the path.

A common trap occurs when probing /api/admin/export. You send an HTTP GET request to https://example.com/api/admin/export. The server responds with status 200 OK. An administrative route returning status 200 looks like an unauthenticated administrative interface.

A simple check kills this false hit. Inspect the response headers and body content. The response header displays Content-Type: text/html; charset=utf-8. The body contains the full Single Page Application HTML document with its root container element.

Verify server behavior by sending a probe to an invented, nonexistent path.

Terminal window
# Send a probe to an invented path to test for catch-all routing
curl -sk -i https://example.com/nonexistent-route-probe-test | head -n 15

The server returns status 200 OK with the exact same HTML content length and checksum. The web server uses a wildcard rewrite rule to serve index.html on unmapped routes. The path /api/admin/export has no backend service handler.

Write this entry in your notes: Endpoint returns HTTP 200 with HTML application shell on arbitrary paths; catch-all rewrite rule confirms route is inactive on backend.

JavaScript analysis cannot see backend API routes that the client application never references.

Frontend bundles contain only paths needed for implemented user interface features. They omit internal administrative APIs, legacy endpoints, deprecated microservices, and management routes reserved for operations teams. The frontend bundle also omits API routes that use dynamic path parameters constructed entirely at runtime by external services.

Active content discovery catches these hidden routes. In Phase 11: Content discovery, you send structured dictionary requests to the target web server.

This requires a separate step because client script analysis and content discovery use completely different mechanisms. JavaScript analysis examines static source code already downloaded to your local drive. Content discovery probes the remote web server routing table directly with wordlists.

You stop probing based on clear response criteria.

Promote the route when the server returns status 200 with application/json, status 401, status 403, or status 405. These responses confirm that the backend routing layer recognizes the path.

Drop the route when the server returns the Single Page Application HTML fallback or returns status 404 across both GET and POST requests.

Follow strict rules during active verification. Suspend probing if the server returns status 429 Too Many Requests or firewall challenge pages. Stop requests if latency spikes above three seconds. Never run automated brute-force attacks against discovered administrative routes.

Spend no more than 15 minutes verifying extracted paths for a single domain. If 20 consecutive endpoints return the HTML fallback page, stop active verification on that host.

Pipelines must fail closed. If an HTTP probe encounters a timeout, connection drop, or unexpected edge error, the pipeline marks the route unverified. The pipeline drops unverified paths from subsequent testing stages.

You write verified endpoints to endpoints/verified.tsv.

The file uses five tab-separated columns: host, path, status, content_type, method

Example output row: example.com /api/admin/export 403 application/json POST

The next phase asks one specific question: Which parameters and query arguments does this verified endpoint accept?

Feed this file directly into Phase 10: Parameter discovery.

Where Claim Why it is uncertain
jsluice syntax parsing Extracts paths from template literals containing complex expressions Dynamic template literals with computed variable expressions may yield partial or fragmented path strings depending on tree-sitter grammar rules.
HTTP status filtering Status 405 Method Not Allowed always confirms backend route presence Certain edge proxies and web application firewalls return status 405 on blocked paths before the request reaches the origin application.
Single Page Applications All Single Page Application servers return status 200 on unknown paths Some edge hosting platforms and serverless gateways return status 404 alongside the custom client-side error page.
Connections0 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.