SecurityBrief New Zealand - Technology news for CISOs & cybersecurity decision-makers
Story image
Cyber-gangs using SSH identities to sell on the black market
Mon, 17th Feb 2020
FYI, this story is more than a year old

Malware campaigns equipped with the capability to exploit powerful, hidden backdoors are becoming commoditised, researchers from Venafi have warned.

The research shows several high-profile hacker campaigns are integrating the misuse of SSH machine identities capabilities into their attacks.

Now, any attacker with access to the dark web can gain access to the same techniques that took down the Ukrainian power grid against every business and government agency.

Malware can target common SSH machine identities used to access and automate Windows, Linux and MacOS in the enterprise and out to the cloud.

These gangs can potentially monetise their victims further by selling these SSH backdoors to high profile or high-value machines in the underground to nation-state affiliated Advanced Persistent Threat (APT) groups.

SSH is a network protocol that provides a secure connection between two machines, enabling data communication and remote command execution.

SSH machine identities, also known as SSH keys, are used to secure remote connections and automate processes.

For example, controlling workloads running in cloud computing environments, VPN connections and connected IoT devices, giving privileged access to organisations' most critical systems, including servers and databases.

This makes them highly valuable to attackers. A single SSH key can be used to gain undetected root access to critical systems and data, enabling an attacker to do anything from circumventing security controls to injecting fraudulent data, subverting encryption software, or installing persistent malware.
 
Venafi's researchers analysed samples of several high-profile malware campaigns to detect where SSH capabilities are being used.

In most cases, the malware added the attacker's SSH key to a list of authorised key files on the victim's machine, meaning their machine would trust the key, enabling the attacker to remain persistent on it.

In other cases, the malware was able to weaken SSH authentication and gain access to the target by accessing credentials and host information to move laterally across the network and infect further machines.

Some examples of successful malware campaigns that leveraged SSH machine identities from 2019:
 
  • TrickBot: Originally a banking trojan that first appeared in 2016, TrickBot became a flexible, universal, module-based crimeware solution that has shifted focus to enterprise environments over the years. 
    TrickBot is offered as-a-service to criminals for various purposes and its modules are designed for the needs of a specific criminal activity. 
    It incorporates many features from network profiling, mass data collection, and incorporation of lateral traversal exploits. 
    Last year, TrickBot added credentials-grabbing capabilities for both PuTTY (SSH client for Microsoft) and OpenSSH. 
    In addition to targeting credentials, the malware is designed to look for Hostname and Username information for lateral movement.
     
  • CryptoSink: This cryptomining campaign exploits a five-year-old vulnerability (CVE-2014-3120) in Elasticsearch systems on both Windows and Linux platforms to mine XMR cryptocurrency. 
    CryptoSink creates a backdoor to the targeted server by adding the attacker's public key to the authorized key file on the victim's machine.
     
  • Linux Worm: This worm targets vulnerable Exim mail servers on Unix-link systems to deliver Monero cryptocurrency miners. 
    The worm creates a backdoor to the server by adding its own SSH public key and enabling the SSH server, if it is disabled.
     
  • Skidmap: This is a Kernel-mode rootkit that gains backdoor access to a targeted machine by adding the attacker's public SSH key to the authorized key file. 
    Skidmap uses exploits, misconfigurations, or exposure to the internet to gain root or administrative access to the system and drop cryptomining malware.
     

“SSH keys can be potent weapons in the wrong hands,” says Venafi threat intelligence specialist Yana Blachman. 

“But until recently, only the most sophisticated, well-financed hacking groups had this kind of capability. Now, we're seeing a ‘trickle-down' effect, where SSH capabilities are becoming commoditised. 

“What makes this “commoditisation” so worrying is that if an attacker is able to backdoor a potentially interesting target, they may monetise this access and sell it through dedicated channels to more sophisticated and sponsored attackers, such as nation-state threats for the purpose of cyberespionage or cyberwarfare. 

“We have seen this with the TrickBot cybercrime gang which was found to be selling a ‘bot-as-a-service', together with a full toolset, to North-Korean-sponsored group Lazarus for both monetisation and cyberespionage.”
 
The best defence organisations have against SSH abuse is to ensure they have complete visibility and intelligence over every authorised SSH key in the enterprise and out to the cloud, according to Venafi.

As this research shows, attackers not only abuse existing machine identities, they may also insert their own malicious SSH machine identities into target environments; it's not just the known keys, but all keys that must be discovered and analysed. 

However, organisations routinely overlook the importance of Machine Identity Protection for SSH keys. 

SSH keys are rarely part of an organisation's security strategies, says Venafi. And, because they never expire, many organisations have no way of knowing which SSH keys are being used for a specific action or task. 

Recent research shows only 10% of organisations believe they have complete and accurate intelligence over all SSH machine identities, raising the risk that SSH keys will be misused or stolen.

“SSH keys can dramatically increase attackers' ability to cause harm, so any malware that allows them to leverage SSH capabilities should be a real concern to organisations,” says Blachman. 

“As these capabilities become increasingly accessible, it's vital that organisations get their houses in order. 

“The only way to defend against these attacks is to have visibility and intelligence on how SSH machine identities are being used, so that malicious actors can be detected faster,” says Blachman.

“To do this, organisations must improve Machine Identity Protection for SSH keys and equip themselves to take complete control over every single SSH machine identity they rely on in order to identify signs of compromise.