Skip to main content
Mallory
MalwareUsed by 1 actor

SSH-Snake

SSH-Snake is a self-modifying, fileless, self-propagating SSH worm released on 4 January 2024. It is implemented as a bash shell script that autonomously searches a compromised host for SSH private keys, credentials, and related artifacts, including shell history files such as .bash_history. It uses discovered SSH credentials to laterally move to additional systems over SSH, copies itself to those systems, and repeats the process. On first run, it modifies itself by removing comments, whitespace, and unnecessary functions to reduce size. Reported target-discovery sources include shell history as well as commands such as last and arp. Sysdig reported that SSH-Snake has been used in active offensive operations and identified attacker infrastructure storing per-victim output files; observed collected data included discovered credentials, target IP addresses, and victims’ bash history. Sysdig assessed with high confidence that operators deploying SSH-Snake were exploiting known Atlassian Confluence vulnerabilities for initial access in many cases, although other exploits may also have been used. The malware has been associated with the CRYSTALRAY threat actor/campaign cluster, which used SSH-Snake for lateral movement as part of broader operations involving credential theft and cryptominer deployment. Reported victim counts grew from roughly 100 in early observations to campaigns later associated with more than 1,500 victims. High-confidence behavioral indicators mentioned in the content include SSH connections from compromised hosts, reads of sensitive files, searching for private keys or passwords, and harvesting of bash history and SSH-related artifacts.

Share:
For your environment

Hunt this family in your stack

Mallory pivots from this family to the IOCs, detections, and named campaigns that touch your stack, and pages you when something new lands.

THREAT ACTORS

Groups observed using it

1 distinct threat actor attributed by public researchers. Open in Mallory to see the full evidence chain and overlapping campaigns.

View more details
CRYSTALRAY

Released on 4 January 2024, SSH-Snake is a self-modifying worm that leverages SSH credentials discovered on a compromised system to start spreading itself throughout the network.

via sysdig blogsysdig.com
MITRE ATT&CK

Techniques & procedures

5 distinct techniques documented for this family, organized by ATT&CK tactic.

Stealth

1 technique
T1027Obfuscated Files or InformationEvidence1
TacticStealth

"...modifies itself when it is first run... All comments, whitespace, and unnecessary functions are removed... allows it to remain fileless."

Credential Access

2 techniques
T1552.004Private KeysEvidence1

"SSH-Snake ... autonomously searches the system it is run on for SSH credentials. Once credentials are found, the script attempts to log into the target system..."

T1555Credentials from Password StoresEvidence1

"...automatically searches through known credential locations and shell history files..." and "find_from_bash_history , where commands of ssh , scp , and rsync are searched for and parsed."

Discovery

1 technique
T1046Network Service DiscoveryEvidence1
TacticDiscovery

"...perform automatic network traversal... creating a comprehensive map of a network and its dependencies..." and "...it looks at sources of information, including last and arp to gather target data."

Lateral Movement

1 technique
T1021.004SSHEvidence1

"SSH-Snake is a self-modifying worm that leverages SSH credentials discovered on a compromised system to start spreading itself throughout the network."

INDICATORS OF COMPROMISE

IOCs tracked for this family

1 indicator attributed across vendor reports, sandbox runs, and researcher write-ups. Full values are available in Mallory.

View more in app
Network
1 tracked

IPs, domains, and DNS infrastructure linked to this family.

TypeValueLatest sighting
ip.v4●●●●●●●●●●●●View more in app2 years ago
What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching1

Match every observed IP, domain, and hash against your live telemetry.

Threat actor attribution1

Named campaigns wielding this family, with evidence pinned to each claim.

Exploited vulnerabilities

CVEs this family uses for access and lateral movement.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

MITRE ATT&CK mapping5

Every documented technique, ranked by evidence weight.

Researcher chatter

Reddit, Mastodon, and CTI community discussion around this family.