Recycled Cobalt Strike key pairs show many crooks are using same cloned installation

Around 1,500 Cobalt Strike beacons uploaded to VirusTotal were reusing the same RSA keys from a cracked version of the software, according to a security researcher who pored through the malware repository.

The discovery could make blue teams’ lives easier by giving them a clue about whether or not Cobalt Strike traffic across their networks is a real threat or an action by an authorised red team carrying out a penetration test.

Didier Stevens, the researcher with Belgian infosec firm NVISO who discovered that private Cobalt Strike keys are being widely reused by criminals, told The Register: “While fingerprinting Cobalt Strike servers on the internet, we noticed that some public keys appeared often. The fact that there is a reuse of public keys means that there is a reuse of private keys too: a public key and a private key are linked to each other.”

Around 25 per cent (1,500) of Cobalt Strike samples observed by Stevens used a single shared key pair, he said.

Stevens’ discovery came about after he searched Google-owned malware repository VirusTotal for files containing Cobalt Strike key file, .cobaltstrike.beacon_key. In a blog post on NVISO’s website, he detailed how he and his team had found six cloned key pairs lurking on VirusTotal.

Cobalt Strike was originally released as a penetration testing tool, as summarised by Cisco Talos, which pointed out its use by internet criminals in 2020. One of the software’s main features is its beacons: malware simulation payloads inserted into target networks.

Inevitably, malicious people became interested in what an adversary simulation platform could do in their hands and it wasn’t long before the software began presenting a genuine threat – with Cobalt Strike’s authors writing a blog post in 2013 titled “How to crack Cobalt Strike AND backdoor it.” (The post does also suggest that leaked versions may include a backdoor for its original authors, not that this seems to have deterred online criminals from using cracked versions of the software in later years.)

Legitimate installations of Cobalt Strike generate their own RSA key pair on first run of the server software, Stevens told El Reg. Thus the reuse of key pairs shows that a number of malicious people are using a cracked version – and the presence of that particular key pair can flag up signs of malicious activity to alert blue teams.

“We were wondering what could possibly explain key reuse,” said Stevens. “One of the hypotheses was reuse of file .cobaltstrike.beacon_keys because of cracked software… We did a search on VirusTotal for ZIP files containing file .cobaltstrike.beacon_keys, and found private keys that match the recurring public keys we observed.”

He intends to write further blogs explaining how network defenders can use the half-dozen identified key pairs to rapidly identify signs of network compromise.

Vanja Svajcer, outreach researcher at Cisco Talos, told The Register: “Cobalt Strike has become a de-facto standard, almost Swiss army knife of a post-exploitation tool used by a wide variety of actors, both legitimate and malicious. As such, any discovery related to better detection of Cobalt Strike is likely to be significant.”

Svajcer added: “The good news is that any Cobalt Strike communication using these known keys can be outright blocked as malicious. However, one could argue that any detected Cobalt Strike communication, even the one using ‘legitimate’ keys, should be immediately blocked as it indicates a potentially serious breach of a network.”

Legit keys for Cobalt Strike sell for $3,500 per seat at list price. Given ransomware gangs’ eight-figure revenues, buying a legitimate copy to crack wouldn’t even register as a cost of doing business.

Cobalt Strike has been seen in use by, among others, the Clop ransomware gang; China-based spies known in the West as APT41; and a black hat crew that targeted Germany’s Bundestag in 2017. ®

READ MORE HERE