A recently discovered threat actor is leveraging an advanced open-source network mapping tool called SSH-Snake to surreptitiously locate private keys and traverse victim infrastructure. Uncovered by the Sysdig Threat Research Team (TRT), SSH-Snake operates as a “self-modifying worm,” distinguishing itself from conventional SSH worms by evading typical scripted attack patterns. This malicious tool meticulously hunts for private keys across various system locations, including shell history files, enabling it to silently propagate throughout networks after mapping them.
The distinguishing feature of SSH-Snake lies in its ability to autonomously refine its code, making it more compact and harder to detect upon initial execution. This adaptability, combined with its comprehensive credential discovery capabilities, renders it a potent and stealthy threat. Released on January 4, 2024, SSH-Snake, a bash shell script, is designed to autonomously hunt for SSH credentials on compromised systems and utilize them for lateral movement.
SSH-Snake’s versatility allows for customization to suit specific operational requirements, empowering threat actors to adjust strategies for private key discovery and utilization. The malware employs a combination of direct and indirect methods to uncover private keys, including scouring common directories, analyzing shell history files, and examining system logs. Sysdig’s analysts have confirmed the operational status of SSH-Snake after identifying a command and control (C2) server used by its operators to store harvested data, suggesting active exploitation and propagation across endpoints.
With around 100 victims already targeted, SSH-Snake represents an evolutionary advancement in malware, particularly due to its focus on exploiting a widely used secure connection method like SSH. The tool’s sophisticated capabilities pose significant risks to corporate environments, underscoring the importance of robust cybersecurity measures to mitigate such threats effectively.