gobuster
gobuster copied to clipboard
Add SOCKS proxy support
At the moment we support HTTP/S proxies, but we don't support SOCKS from what I can tell. I have tried making use of the environment variables but this doesn't work.
So we need to bake this in.
@OJ this should already be possible https://go-review.googlesource.com/c/go/+/35488/
Have you tried socks5://host:port as a proxy url?
HTTP_PROXY="socks5://127.0.0.1:1080/" ./gobuster
Didn't work with my socks4 proxy.
Jeah the source code change only adds socks5:// support. So is it worth to implement socks4 support manually?
Looks like the main problem here is https://godoc.org/golang.org/x/net/proxy not supporting SOCKS4 at all which sucks :/
Yeah exactly. Maybe I just need to skip that idea then.
Seems stupid.
sock5 is important
Hi guys! Gobuster has done wonders for me so I thought it was time to give back to help you guys if I could!
As I type this, I'm successfully running Gobuster over socks5 with zero problems within my PWK/OSCP labs!
- I installed/configured Ligolo (HIGHLY recommend) on my Kali (attack machine) machine https://github.com/sysdream/ligolo
- Dropped the Ligolo binary on a compromised Windows machine (victim machine)
- Started up listener on the attack machine
- Ran the connection binary on the victim machine to receive a connection on attack machine
- Per Ligolo instructions, added socks5 127.0.0.1 1080 to /etc/proxychains.conf
- Ran the following Gobuster call: gobuster dir -p socks5://127.0.0.1:1080 -u http://<IP> -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
and it's running as fast as it would be directly connecting to a server (much faster than wfuzz ;) )
I'll also attempt socks4 as soon as I can in the lab to see if I can replicate the same results!
'--proxy socks5://host:port' work just fine. Seems like https://godoc.org/golang.org/x/net/proxy now supports socks5.
5. Per Ligolo instructions, added **socks5 127.0.0.1 1080** to /etc/proxychains.conf 6. Ran the following Gobuster call: **gobuster dir -p socks5://127.0.0.1:1080 -u http:// -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt**
You doing it wrong. You just running 'gobuster' as usual. To get use of proxychains, you should start it like this: 'proxychains gobuster [your_args]'. Your example works just because gobuster now have built-in socks5 support.
Confirmed socks4 does not function as of Gobuster 3.0.1 (told you I'd get around to socks4 testing eventually! )
-
Configure SSH Dynamic Port Forwarding ssh -N -D 127.0.0.1:8081 user@host
-
set /etc/proxychains.conf to socks4 127.0.0.1 8081
-
Using
gobuster dir -p socks4://127.0.0.1:8081 -u http://host -w <wordlist>resulted in Error: error on running gobuster: unable to connect to http://host/: Get "http://host/": EOF -
Using
proxychains gobuster dir -u http://host -w <wordlist>resulted in Error: error on running gobuster: unable to connect to http://host/: Get "http://host /": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Hope this helps! It would be great to see this implemented!
See https://godoc.org/golang.org/x/net/proxy socks5:// works just fine
Hey, I try to run this command "gobuster dir -p socks5://127.0.0.1:1080 -u http://10.20.115.31/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt" but i get " Error: error on parsing arguments: pattern file "socks5://127.0.0.1:1080" does not exist: stat socks5://127.0.0.1:1080: no such file or directory"
Hey, I try to run this command "gobuster dir -p socks5://127.0.0.1:1080 -u http://10.20.115.31/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt" but i get " Error: error on parsing arguments: pattern file "socks5://127.0.0.1:1080" does not exist: stat socks5://127.0.0.1:1080: no such file or directory"
use —proxy
gobuster -q dir --proxy socks5://127.0.0.1:1080 -u http://127.0.0.1:80 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt works for me
still no socks4 support so closing this