emptymonkey / revsh

A reverse shell with terminal support, data tunneling, and advanced pivoting capabilities.
MIT License
458 stars 90 forks source link

Controller and Target Crash while using Socks Proxy #17

Closed ghost closed 6 years ago

ghost commented 7 years ago

I found a bug where Controller and Target both would crash while downloading a file using Socks Proxy

The crash will happen randomly anytime your downloading or browsing using the socks proxy but I found a specific procedure to reproduce this bug

here is the last part of strace output from controller:

read(4, "\xbd\x13\x65\x9e\x51\x0e\x36\xcc\xec\x2f\x62\xd5\x5c\x25\xeb\xe6\x8d\xfe\xcc\x50\x10\x02\x31\xe9\xf3\x8f\xe0\x1f\x93\xfa\xaa\x20"..., 4128) = 914
read(4, 0x63a76a, 3214) = -1 EAGAIN (Resource temporarily unavailable)
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
read(4, "\xd2\xb5\xe6\x61\x80\x2f\x27\x1c\x7c\x60\xcc\x4c\x1c\x54\x25\x65\x45\xb2\x90\xdb\xe1\xb0\xd5\xb7\x46\xfa\xcc\xb9\x09\xf7\x30\x7b"..., 3214) = 1420
read(4, 0x63acf6, 1794) = -1 EAGAIN (Resource temporarily unavailable)
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
read(4, "\xeb\x6f\x06\x8d\xc7\xd7\xac\x40\x4a\x2c\xeb\x86\xf5\xe1\x32\x0e\xbb\x41\xa1\x7a\x82\x55\x86\x9d\xa3\xd6\x5c\x6b\x61\x8b\x94\x9c"..., 1794) = 1420
read(4, 0x63b282, 374) = -1 EAGAIN (Resource temporarily unavailable)
select(5, [4], NULL, NULL, NULL) = 1 (in [4])
read(4, "\x1f\x60\xfa\x65\xff\x58\xd6\x69\x95\xac\x27\xf7\xb2\xba\xd8\xd6\xf8\x12\x81\x2e\x2d\xda\xe5\x3c\x52\x03\xe3\x10\xbb\xa6\x21\xd8"..., 374) = 374
write(5, "\xb3\xf2\x26\xf0\xbc\x33\x7c\xa4\x8f\xec\xf6\xab\x53\xea\xd1\x88\x83\xdd\xa6\x0b\xbc\xb3\x85\xd6\x1e\x94\x5a\xcb\xe0\x61\x38\xbb"..., 4096) = -1 EPIPE (Broken pipe)
--- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=24072, si_uid=0} ---
+++ killed by SIGPIPE +++
emptymonkey commented 6 years ago

I was unable to reproduce this, however I did just commit a pull request from ahmedm that should fix it. Let me know if the issue persists. (The fix is in the "devel" branch. I'll push it to master in a couple of weeks after more fixes / features + testing. ) Thanks!