Webpentest through SOCKS proxy

Penetration Testing Wiki

Auditing locally through a SOCKS proxy or jumpbox:

Ssh server  (ssh -D)
burp: Lan or Wifi
Tools: nikto, firefox, curl, sqlmap, proxychains-ng

Adapted syntax for different tools with proxy support:

curl -k -x http://burp:8080 http://$IP
sqlmap --proxy=http://burp:8080 $IP
wfuzz -z file,wordlist/general/common.txt -p localhost:8080 http://$DOMAIN/FUZZ
nikto -useproxy http://burp:8080 -host http://$IP
+ ERROR: Proxy error: opening stream: can't connect: proxy connect failed: proxy connect to failed: Invalid argument at /var/lib/nikto/plugins/LW2.pm line 5157.

Sometimes nikto shows an error in perl library LWP.pm, if cannot verify the identity of the certificate. Use gobuster instead.

gobuster -k -u https://$IP -p http://$PROXY:9090 -w /usr/share/wordlists/dirb/common.txt