✅ Webpentest through SOCKS proxy

Penetration Testing Wiki

Auditing locally through a SOCKS proxy or jumpbox:

Target
    |
    V
Ssh server  (ssh -D)
   |
   V
burp: Lan or Wifi
   |
   V
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 192.168.1.14:8000 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 dir -k -u https://$IP -p http://$PROXY:9090 -w /usr/share/wordlists/dirb/common.txt --useragent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36"

PRO TIP

You can use Burpsuite as a WEB proxy to capture all the traffic or modify any request on the fly using the match-and-replace functionality or any of the Burpsuite plugins.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.