I think you may be looking at the wrong version of Netcat:
$ which nc /bin/nc $ ls -ld /bin/nc lrwxrwxrwx 1 root root 20 2010-05-17 21:34 /bin/nc -> /etc/alternatives/nc $ ls -ld /etc/alternatives/nc lrwxrwxrwx 1 root root 15 2010-05-17 21:34 /etc/alternatives/nc -> /bin/nc.openbsd
But you are actually 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[:port]] [hostname] [port[s]] $ /bin/nc.traditional -l -p 9999 -e /bin/bash ^C $
You can fix that by:
$ sudo rm /etc/alternatives/nc && sudo ln -s /bin/nc.traditional /etc/alternatives/nc
I think you may be looking at the wrong version of Netcat:
$ which nc es/nc es/nc es/nc -> /bin/nc.openbsd
/bin/nc
$ ls -ld /bin/nc
lrwxrwxrwx 1 root root 20 2010-05-17 21:34 /bin/nc -> /etc/alternativ
$ ls -ld /etc/alternativ
lrwxrwxrwx 1 root root 15 2010-05-17 21:34 /etc/alternativ
But you are actually looking for /bin/nc.traditional :
$ /bin/nc.openbsd -l -p 9999 -e /bin/bash :port]] [hostname] [port[s]]
/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[
$ /bin/nc.traditional -l -p 9999 -e /bin/bash
^C
$
You can fix that by:
$ sudo rm /etc/alternativ es/nc && sudo ln -s /bin/nc.traditional /etc/alternativ es/nc