implant does not uses socks5 proxy
Describe the bug generated implant does not uses proxy from "ALL_PROXY" environment variable in linux.
To Reproduce
- generate command:
generate -o linux -m 192.168.0.2 -d - run the implant
ALL_PROXY=socks5h://127.0.0.1:8080 ./implant
Expected behavior implant connects with socks5 server.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: linux(amd64)
- Version: v1.5.41 - f2a3915c79b31ab31c0c2f0428bbd53d9e93c54b
Additional context
- generated with http:
only reads proxy from "HTTPS_PROXY", while "ALL_PROXY" and "HTTP_PROXY" still does not work. if I use "HTTPS_PROXY=socks5h://127.0.0.1:8080", it still treats the proxy as a http proxy.
implant log:
netcat log:gohttp.go:84: Found proxy &proxy.proxy{protocol:"socks5h", host:"127.0.0.1", port:0x1f90, user:(*url.Userinfo)(nil), src:"Environment[HTTPS_PROXY]"} gohttp.go:91: Proxy URL = 'socks5h://127.0.0.1:8080'CONNECT 192.168.0.2:443 HTTP/1.1 Host: 192.168.0.2:443 User-Agent: Go-http-client/1.1 - generated with mtls: does not use "ALL_PROXY", "HTTPS_PROXY" or "HTTP_PROXY"
I am trying to use the implant with tor hidden service. so I need to use "socks5h" proxy.
Only HTTP/S proxies are supported by the implant currently.
thanks for clearing this up. I'll try using http proxy. but still humbly request for socks5 proxies 😅
I still wonder why only "HTTPS_PROXY" works. wiki says,
Environment Variable: HTTPS_PROXY, HTTP_PROXY, FTP_PROXY, or ALL_PROXY. NO_PROXY is respected.
Oh that's probably a bug.