Thursday, 21 January 2016

Netcat



Netcat is a tool capable of writing data across a network using TCP or UDP protocol but this simple capability allows it to perform many functionalities. Its capability to create almost any kind of connection makes it a simple and efficient network debugging and exploration tool. It has been built in such a manner that it can act as a client as well as a server, which elevates its utility to a higher level.

Common uses for Netcat:
  • Chat/Messaging Server : By using Netcat, an operator can redirect simple text between two computers in a simplistic chat or in an instant message interface.
       Machine A root@bt:- # nc –l –p 123
      Machine B C:\> nc 192.168.118.130 123



http://2we26u4fam7n16rz3a44uhbe1bq2.wpengine.netdna-cdn.com/wp-content/uploads/Figure1-new.jpg



  • File Transfers : Netcat allows you to transfer files between computers without the need to install a full-blown FTP server

    Machine A root@bt:- # nc –lv -p 123 > test.txt
    Machine B C:\> nc 192.168.118.130 123 < test1.txt
 
  • Banner Grabbing : Netcat allows an operator to establish a socket to a specific port to potentially identify the operating system, service, version, and other information necessary to enumerate the purpose and/or potential weaknesses in the service.                                                
     Machine A root#kali# nc 172.35.9.1 21 

 
  • Port Scanning: Netcat allows the operator to utilize a rudimentary port scanning function, whereby a port or series of ports can be interrogated to determine if the port is open or closed.
       Machine B C:\> nc –v –w 2 –z 192.168.118.130 1-100 

 
  • Port Redirection: A simple technique used to transfer traffic from one port to another. It is utilized to access services which are restricted in any specific environment.
       Machine A root@bt:- # nc –l –p 8008 –c “nc google.com 80”
       Machine B Browse 192.168.118.130:8008
 Figure 4. Port Forwarding




No comments:

Post a Comment