Socks5 Proxy Doesnt Seem to Work #1528
-
Nuclei version:
Current Behavior:Nuclei tests the socks proxy but doesn't use it for the outgoing requests. Expected Behavior:Nuclei tests the socks proxy and uses it for the outgoing connections. Steps To Reproduce:
You can also try that with remote socks5 and remote web server. It will always skip the proxy and leak the real ip of the host. |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 5 replies
-
I have the same problem |
Beta Was this translation helpful? Give feedback.
-
@sbani this should be fixed in the dev branch. |
Beta Was this translation helpful? Give feedback.
-
thank you @ehsandeep . unfortunitely I'm not able to test your fix because nuclei doesn't work on my system when I try to build it myself (since v2.5.3). I basically do this:
Error:
This probably has nothing to do with your change, however it holds me back from testing. |
Beta Was this translation helpful? Give feedback.
-
@sbani this error is related to use of the old go version, make sure you are on |
Beta Was this translation helpful? Give feedback.
-
Thank you @ehsandeep, thank works. However, your fix doesn't solve the problem for me. Proxy test:
Nuclei run (proxy 1 - no requests!):
Nuclei run (proxy 1 - no requests!):
Requests that came through without proxy (
|
Beta Was this translation helpful? Give feedback.
-
@sbani it seems like this is an authentication error to the socks5 proxy: socks connect tcp 185.57.XXX.XXX:5080->interact.sh:80: username/password authentication failed
socks connect tcp 116.203.XXX.XXX:3225->interact.sh:80: username/password authentication failed Only RFC-compliant http requests will go through the proxy, whereas templates with unsafe http, network, and SSL requests will connect directly as they don't support it yet. I tried to setup a fresh instance of dantev with username authentication, and nuclei seem to work just fine: $ echo http://192.168.1.9:8000 | go run . -t technologies/tech-detect.yaml -v -vv -debug -proxy 'socks5://m:[email protected]:8128'
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ 2.5.8-dev
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions.
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[INF] Using Nuclei Engine 2.5.8-dev (development)
[INF] Using Nuclei Templates 8.8.2 (latest)
[INF] Using Interactsh Server https://interact.sh
[INF] Templates added in last update: 2861
[INF] Templates loaded for scan: 1
[tech-detect] Wappalyzer Technology Detection (@hakluke) [info]
[INF] [tech-detect] Dumped HTTP request for http://192.168.1.9:8000
GET / HTTP/1.1
Host: 192.168.1.9:8000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
[DBG] [tech-detect] Dumped HTTP response for http://192.168.1.9:8000
HTTP/1.1 200 OK
Connection: close
Content-Length: 137
Content-Type: text/html; charset=utf-8
Date: Tue, 11 Jan 2022 16:00:03 GMT
Last-Modified: Tue, 21 Dec 2021 15:34:21 GMT
<pre>
<a href=".DS_Store">.DS_Store</a>
</pre>
[INF] No results found. Better luck next time! I correctly got the callback from the proxy ip: I am unsure if it could be a bug with some specific proxy server software or configuration. Would it be possible to provide more info on the socks5 server setup/configuration? |
Beta Was this translation helpful? Give feedback.
-
Thank you @Mzack9999 for your feedback. One proxy is run with biosocks2 and the other one I don't know. It's from perfect-privacy a well known commercial VPN/Proxy provider. Biosocks2: https://github.com/bioboy/biosocks2/ |
Beta Was this translation helpful? Give feedback.
-
Just tested with $ echo http://192.168.1.16:8000 | go run . -t technologies/tech-detect.yaml -v -vv -debug -proxy 'socks5://login:[email protected]:12345'
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ 2.5.8-dev
projectdiscovery.io
[WRN] Use with caution. You are responsible for your actions.
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[INF] Using Nuclei Engine 2.5.8-dev (development)
[INF] Using Nuclei Templates 8.8.2 (latest)
[INF] Using Interactsh Server https://interact.sh
[INF] Templates added in last update: 2861
[INF] Templates loaded for scan: 1
[tech-detect] Wappalyzer Technology Detection (@hakluke) [info]
[INF] [tech-detect] Dumped HTTP request for http://192.168.1.16:8000
GET / HTTP/1.1
Host: 192.168.1.16:8000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
[DBG] [tech-detect] Dumped HTTP response for http://192.168.1.16:8000
HTTP/1.1 200 OK
Connection: close
Content-Length: 137
Content-Type: text/html; charset=utf-8
Date: Thu, 13 Jan 2022 09:09:40 GMT
Last-Modified: Tue, 21 Dec 2021 15:34:21 GMT
<pre>
<a href=".DS_Store">.DS_Store</a>
</pre>
[INF] No results found. Better luck next time! with
|
Beta Was this translation helpful? Give feedback.
-
I don't know what I do wrong, but this doesn't work for me. I'm really sorry because it seems weird to me too. |
Beta Was this translation helpful? Give feedback.
-
As @yabeow correctly pointed out, there is a small bug in the code, that transforms the input to lower-case characters (#1557). Until it gets fixed, as a workaround, you could probably put your proxy configuration in a file and pass that instead to nuclei. There isn't/shouldn't be any normalization there. |
Beta Was this translation helpful? Give feedback.
As @yabeow correctly pointed out, there is a small bug in the code, that transforms the input to lower-case characters (#1557). Until it gets fixed, as a workaround, you could probably put your proxy configuration in a file and pass that instead to nuclei. There isn't/shouldn't be any normalization there.