Search This Blog


NetCat In Windows

In the unix world there is a utility called
that allows you to send data through a socket to communicate with a remote device listening on that socket.

In windows there is a way to emulate that using netcat for windows included in the nmap suite. It can be downloaded here and once downloaded there will be an executable that exists in:
C:\Program Files (x86)\Nmap\ncat.exe
that you can execute to perform operations as you would normally with
in unix.

The cool thing is, that with powershell, you are still able to "pipe" output to netcat.exe as you would in unix.

The following is an example of how to use ncat in Windows to send a message to a remote server
Write "Message Text" | & "C:\Program Files (x86)\Nmap\ncat.exe" $ServerName $Port
Where $ServerName is the remote server you wish to communicate with and $Port is the remote port the server is listening on.

In PowerShell if running a full path it is required to run with an & at that start.


No comments:

Post a Comment