Vulnerabilities / Threats

4/10/2012
10:26 PM
50%
50%

Malware Encryption Efforts Mixed, But Getting Stronger

Russian botnets mostly use crypto, Chinese attacks mostly don't, but attack analysis finds that the bad guys are increasingly using better encryption

When a new software threat is discovered, reverse engineers dig into the code to find ways to detect the attack, identify the code and its authors, and discover the purpose behind the malware.

Such investigations pit the digital detectives who reverse- engineer malicious programs against the developers who created the malware. In the cat-and-mouse game, reverse engineers can easily find copies of the software to crack open and analyze, and attackers respond by throwing up a number of hurdles to slow down analysts' efforts. Chief among the roadblocks are encryption and obfuscation.

In the not-too-distant past, encryption in malware was a sign of an ambitious effort on the part of the program's author. Today, nearly all malware uses some encryption, and perhaps two-thirds of botnets use encrypted communications to obfuscate their activities, says Jeff Edwards, a research analyst with network security firm Arbor Networks.

"There is a gradual trend toward improving their encryption," Edwards says. "It all comes down to whether the botnet operators and authors feel pressure to evolve."

With the takedown of the Rustock and Kelihos botnets, which counted tens of thousands of compromised computers among their nodes, the underground operators controlling the botnets are likely feeling pressure to hide their activities to an even greater extent. In addition, as malicious software developers grow more experienced, they frequently add more complex and better implemented encryption to their products.

[Less than one day after botnet hunters announced they had crippled the Kelihos.B/Hlux.B botnet, a new version of the tenacious botnet is now back up and running today. See It's (Already) Baaack: Kelihos Botnet Rebounds With New Variant.] 

The Black Energy bot software, for example, originally used a basic encryptor to scramble its executable to avoid detection by antivirus software, and it used Base64 encoding to scramble its communications. Both were easily reverse-engineered. The latest version of Black Energy, however, uses a variant -- somewhat flawed, it turns out -- of the more robust RC4 stream cipher to encode its communications.

In a recent set of blog posts, Arbor Networks analyzed the encryption of four major bot programs used for denial-of-service. The analyses have found a wide variety of encryption methods, from custom substitution algorithms to the RC4 stream cipher, a popular encryption method used in Secure Sockets Layer, among other protocols. In one analysis, Arbor researched the Dark Comet remote access Trojan, which uses RC4 to encrypt its communications and uses other interesting techniques to obfuscate the encryption keys.

"It's all over the map -- you get everything from no encryption to really solid encryption," Edwards says. "RC4 is the most popular one right now, or some variation of RC4. It's a standard, it's well-understood, and it's reasonably secure."

Encryption in botnets has evolved slowly. Five years ago, the Sinowal, or Torpig, Trojan used a modified version of the XTEA block cipher to encrypt its configuration data, according to Kurt Baumgartner, senior security researcher with Kaspersky Lab. Since late 2008, the Waledac and Kelihos, or Hlux, botnets used custom implementations of the advanced encryption standard (AES) mixed with other encoding and compression to obfuscate their code and communications, he says.

"Over the past several years, we have seen malware applying encryption schemes rise and fall," Baumgartner says. "These guys are not giving up on it."

Oddly enough, the programs that researchers expect to use encryption sometimes use only simple obfuscation. While malware coming from Russia and Europe have gradually used better encryption methods, Chinese cybercriminals still use simpler methods and sometimes no obfuscation at all. Many attacks that are considered advanced persistent threats (APT) eschew encryption and use other types of obfuscation.

"We see odd, modified encoding schemes and compression schemes in their malware toolset, but not a lot of elegant or complex crypto," says Baumgartner. "It appears that it is all maintained to fly under the radar as best they can."

The situation underscores a trade-off in malware's use of encryption. Encrypted data is generally easy to detect, but not decrypt. Custom encryption or obfuscation can hide data less securely, but more effectively get around security tools, such as antivirus detection.

"These schemes are very sensitive to the amount of noise they may sound out to listening anti-malware technologies," Baumgartner says. "Some anti-malware [programs] are much better or much worse at listening for that noise than others."

Have a comment on this story? Please click "Add Your Comment" below. If you'd like to contact Dark Reading's editors directly, send us a message.

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
WebAuthn, FIDO2 Infuse Browsers, Platforms with Strong Authentication
John Fontana, Standards & Identity Analyst, Yubico,  9/19/2018
New Cold Boot Attack Gives Hackers the Keys to PCs, Macs
Kelly Sheridan, Staff Editor, Dark Reading,  9/13/2018
Yahoo Class-Action Suits Set for Settlement
Dark Reading Staff 9/17/2018
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Current Issue
Flash Poll
The Risk Management Struggle
The Risk Management Struggle
The majority of organizations are struggling to implement a risk-based approach to security even though risk reduction has become the primary metric for measuring the effectiveness of enterprise security strategies. Read the report and get more details today!
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2018-17229
PUBLISHED: 2018-09-19
Exiv2::d2Data in types.cpp in Exiv2 v0.26 allows remote attackers to cause a denial of service (heap-based buffer overflow) via a crafted image file.
CVE-2018-17230
PUBLISHED: 2018-09-19
Exiv2::ul2Data in types.cpp in Exiv2 v0.26 allows remote attackers to cause a denial of service (heap-based buffer overflow) via a crafted image file.
CVE-2018-17231
PUBLISHED: 2018-09-19
** DISPUTED ** Telegram Desktop (aka tdesktop) 1.3.14 might allow attackers to cause a denial of service (assertion failure and application exit) via an "Edit color palette" search that triggers an "index out of range" condition. NOTE: this issue is disputed by multiple third par...
CVE-2018-17228
PUBLISHED: 2018-09-19
nmap4j 1.1.0 allows attackers to execute arbitrary commands via shell metacharacters in an includeHosts call.
CVE-2018-8889
PUBLISHED: 2018-09-19
A directory traversal vulnerability in the Connect Service of the BlackBerry Enterprise Mobility Server (BEMS) 2.8.17.29 and earlier could allow an attacker to retrieve arbitrary files in the context of a BEMS administrator account.