# Command Injection in DVNA

## Exercise  - Command Injection - DVNA

**Step 1:** Click on `"A1: Injection" > "Command Injection: Network Connectivity Test"`

![](https://990422818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWGXF4oLcghA1GLq0CM%2F-LWHQt-EMiiOHTuosAKW%2F-LWHQx3mXuJuoL_-yqER%2F01_ci_ping_function.png?generation=1547571287902969\&alt=media)

**Step 2:** On the "Test System Connectivity" page, enter `8.8.8.8` in the Address field and click Enter. Capture the request that is made using Burp Intercept

![](https://990422818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWGXF4oLcghA1GLq0CM%2F-LWHQt-EMiiOHTuosAKW%2F-LWHQx3rbZqPH43zdF7c%2F02_ci_intercept_request.png?generation=1547571292020310\&alt=media)

**Step 4:** Send the intercepted request to Burp Repeater(CTRL+R) and navigate to repeater(CTRL+SHIFT+R)

![](https://990422818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWGXF4oLcghA1GLq0CM%2F-LWHQt-EMiiOHTuosAKW%2F-LWHQx3vjwJcU6bNVp1Q%2F03_ci_repeater_request.png?generation=1547571287941151\&alt=media)

**Step 5:** In the POST request in Repeater, modify the "address" parameter in POST body to `8.8.8.8;ip addr` and forward the request. The OS executes the `ping 8.8.8.8` and the `ip addr` commands and provides the output to the client.

![](https://990422818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWGXF4oLcghA1GLq0CM%2F-LWHQt-EMiiOHTuosAKW%2F-LWHQx3xmYmFjaKlZwWy%2F04_ci_command_exec.png?generation=1547571289218464\&alt=media)


---

# 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://infosecgirls.gitbook.io/infosecgirls-training/appsec/web-application-pentesting/injection/command-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.
