jm33-m0 / emp3r0r

Linux/Windows post-exploitation framework made by linux user
https://infosec.exchange/@jm33
MIT License
1.26k stars 232 forks source link

Port-Fwd: HTTP and SSH don't work #5

Closed jm33-m0 closed 4 years ago

jm33-m0 commented 4 years ago

When using ncat to test, the port-mapping works okay, I can even run a reverse shell inside ncat connection. Other services such as SSH and HTTP server, don't work at all.

2020/03/09 10:41:58 PortFwd started: -> 80 (08d91771-4eec-4ea0-85fa-f7090b2250f5)
2020/03/09 10:42:01 Read 0 bytes from port 80: EOF
2020/03/09 10:42:01 fwdToDport 80 exited
jm33-m0 commented 4 years ago

Related to #3

jm33-m0 commented 4 years ago

2020/03/09 10:42:01 Read 0 bytes from port 80: EOF looks weird. With retry, however, it grabs the bytes and sends back to CC, only the response looks odd as well.

jm33-m0 commented 4 years ago

https://github.com/jm33-m0/emp3r0r/commit/a7d6787df158520929681ad36d5c21eb6b19fbc4 https://github.com/jm33-m0/emp3r0r/commit/06881f7265c95fcc6903e788abd4e41ce93d8653 looks like io.Copy solves this issue. So far both side are using io.Copy to connect h2conn and net.Conn