Monday, November 23, 2009

My First Post: Netcat, Hackers swiss army knife tool

NetCat

What is Netcat?
Netcat is a tool used as a network service for reading and writing data to network connections (custom port number). It runs in server or client mode, in which the server basically listens for connections on a custom port number (example 4444) and the client connects to the appropriate ip/port combination. This tool is refered to by many professionals as the swiss army knife of networking tools for its many uses.

NB: There are versions of netcat that run on windows or linux.

Netcat can:

  • Act as a peer-to-peer chat system
  • Transfer files
  • Port-forward/relay connections to bypass some firewall restrictions
  • Spwan a remote shell (backdoor)
  • Tcp service banner grabber
Demo: Simple peer-to-peer chat
Comp1: 10.0.0.1 (linux)
Comp2: 10.0.0.2 (linux)

On comp1 (server) type in the commands: nc -l -p 4444
On comp2 (client) type in the commands: nc 10.0.0.1 4444

If all is well (Firewall should be off for this demo) you would have black command promps on your screen. Trying typing anything and press enter. The text should b e transfered to the server and displayed on its console and vice-versa. There you have it, a simple peer-to-peer chat between two computers. Couldn't be get any easier.

You can learn more about netcat and its other features @
http://netcat.sourceforge.net/

No comments:

Post a Comment