Ne0nd0g / merlin

Merlin is a cross-platform post-exploitation HTTP/2 Command & Control server and agent written in golang.
GNU General Public License v3.0
5.03k stars 798 forks source link

socks5 listener #134

Closed trapisone closed 2 years ago

trapisone commented 2 years ago

Hii! :D How should the socks5 listener be used in merlinServer?.

merlinServer (ip_kali): socks start 0.0.0.0:9053

merlin-Agent: ./merlin-agent -url "https://ip_kali" -proto "https"

then I should use something like this?: (on the machine where I run merlinServer) ssh -f -N -D 0.0.0.0.0:1080 -p 9053 user@localhost

proxychains command ...

if so, in the merlin-Agent I get the following: "socks: Unsupported SOCKS version: [83]"

I'm sorry if I'm doing a barbarity XDD, I'm a newbie.

Best regards. :D

Prerequisite

Ne0nd0g commented 2 years ago

You can exclude the ssh command and just use proxy chains to connect

trapisone commented 2 years ago

Hi, thanks for replying :D,

I excluded the ssh, but in the agent it tells me: "[ERR] socks: Failed to authenticate: io: read/write on closed pipe".

using on the merlinServer machine:

❯ proxychains curl http://httpbin.org/get
[proxychains] configuration file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/x86_64-linux-gnu/libproxychains.so.4
[proxychains] DLL init: proxychains-ng 4.16
[proxychains] Strict string ...  127.0.0.1:9053 ... httpbin.org:80 <--Socket error or timeout!

in proxychains configuration: /etc/proxychains.conf

socks5 127.0.0.1 9053 <credentials here?>

Ne0nd0g commented 2 years ago

This is a different error. The connection timed out before SOCKS connection could finish and curl closed the connection. Try setting the sleep and skew to 0 in the agent before using SOCKS.

trapisone commented 2 years ago

It worked, thank u very much :'D Best regards.