-
Netcat is a utility that accesses TCP/IP connections and runs commands across network connections. Basic operations performed by Netcat include relays, file transfers and port scanning. Relays check the quality of a port by sending packets of information and waiting for a response. Netcat transfers files across a TCP/IP connection without an FTP connection between the two computers. Netcat can also scan remote systems for open ports.
Netcat Relays
-
Netcat runs relays to check the quality of a port on a remote computer or on the local machine. Relays aid in security checks. To use relays, enter a temp folder by typing "CD C:\temp" in the command folder. Relays can be run in three methods: Listener-to-client, listener-to-listener and client-to-client.
Listener to client relays start from the local port and relay to specified port of a targeted IP address. The syntax are:
C:\> echo nc [TargetIPaddr] [port] >
relay.bat
C:\> nc --l --p [LocalPort] --e relay.bat
Listener to listener relays send packets from the listener on port one to the listener on port two. The syntax are:
C:\> echo nc --l --p [LocalPort_2] >
relay.bat
C:\> nc --l --p [LocalPort_1] --e
relay.bat
Client to client relays send packets from the previous IP to the next IP. The syntax are:
C:\> echo nc [NextHopIPaddr] [port2] >
relay.bat
C:\> nc [PreviousHopIPaddr] [port] --e
relay.bat
Netcat File Transfers
-
Netcat transfers files over a TCP/IP connection. It can send files from the client to the listener or vice versa. To send the file, the target port must be open to file transfers.
Client to listener file transfer syntax are:
C:\>nc --l -p [LocalPort] > [outfile]
C:\>nc --w3 [TargetIPaddr] [port] <
[infile]
Listener to client file transfer syntax are:
C:\> nc --l -p [LocalPort] < [infile]
C:\> nc --w3 [TargetIPaddr] [port] >
[outfile]
Netcat Port Scanner (TCP)
-
Netcat scans an IP address for open ports with the TCP port scan. The following syntax will check all ports without checking the port names or sending data. The port scan will try each port only once. Netcat port scan will return a detailed response from each port that it scans.
Syntax:
C:\> $ nc --v --n --z --w1 [TargetIPaddr]
[start_port]-[end_port]
No comments:
Post a Comment