Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Vulnerabilities / Threats

11/24/2020
05:50 PM
Connect Directly
Twitter
LinkedIn
RSS
E-Mail
50%
50%

Latest Version of TrickBot Employs Clever New Obfuscation Trick

The malware takes advantage of how the Windows command line interpreter works to try and slip past anti-detection tools, Huntress Labs says.

Researchers at Huntress Labs have uncovered what they described as a really clever use of Windows batch scripting by the authors of Trickbot to try and sneak the latest version of their malware past automated detection tools.

The technique takes advantage of the way the Windows command line interpreter, cmd [.] exe, reads and interprets data that is typed on the command line.  

Related Content:

JavaScript Obfuscation Moves to Phishing Emails

The Changing Face of Threat Intelligence

New on The Edge: How Industrial IoT Security Can Catch Up With OT/IT Convergence

What the authors of Trickbot have done is use a batch script to break up their payload into numerous small chunks and then use the command line interpreter to rebuild the original payload, says John Hammond, senior security researcher at Huntress.

"The gist of this technique is substituting each character in a payload with a new mapped value, so the payload can be slowly created with building blocks."

This technique isn't specific to Trickbot. In fact, any other code or malware sample can do this within Windows batch scripting, Hammond says. But this is the first time that Huntress has observed a threat actor using this exact obfuscation technique, he says. "It seems to be a very simple technique, and now that Trickbot has introduced it, it may become more popular."

Though PowerShell and other command line tools are now available for Windows, cmd [.] exe remains the default command line interpreter for the operating system, as it has for decades. The technology makes a good target for attackers because it provides an interactive interface that they can use to execute commands, run malicious programs, delete files, and carry out a variety of other actions.

Typically, the command prompt can be hardened and locked down with application whitelisting or more secure configuration settings, Hammond notes. "But if a threat actor can access it, it is really a high-value target," because of the extent of control that it allows an attacker to establish over the operation system.

According to Huntress, the batch script that Trickbot authors have used to obfuscate their payload looks like a whole of lot of garbled code with random letters and weird percent signs scattered all over. But a closer examination of the code showed that it is designed to create small, one-letter or two-character variable values that are small chunks of the final payload. Though the code might look completely unintelligible, cmd [.] exe interprets it and executes it.

Troublingly, to an automated scanner, the multiple, smaller chunks would not appear like any malicious strings, so the malware would be able to evade detection. "This obfuscated loader primarily evades signature-based detection — which hunts for known bad strings or characters that can indicate malicious activity," Hammond says.

For organizations, the main takeaway is that automated tools don't guarantee protection against all malware threats. In this case, the obfuscation that the authors of Trickbot employed would have been relatively easy to spot for human analysts. But a scanner might not see any evidence of malicious or bad commands and let the malware slip past, Hammond says.

"A real person might look at this batch script and say, 'oh, if you just add this command right here, it spits out the payload and tells you what exactly it is trying to do,'" he says. "Automated solutions do not and cannot think to do that."

Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year ... View Full Bio
 

Recommended Reading:

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
News
Inside the Ransomware Campaigns Targeting Exchange Servers
Kelly Sheridan, Staff Editor, Dark Reading,  4/2/2021
Commentary
Beyond MITRE ATT&CK: The Case for a New Cyber Kill Chain
Rik Turner, Principal Analyst, Infrastructure Solutions, Omdia,  3/30/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
2021 Top Enterprise IT Trends
We've identified the key trends that are poised to impact the IT landscape in 2021. Find out why they're important and how they will affect you today!
Flash Poll
How Enterprises are Developing Secure Applications
How Enterprises are Developing Secure Applications
Recent breaches of third-party apps are driving many organizations to think harder about the security of their off-the-shelf software as they continue to move left in secure software development practices.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2021-27486
PUBLISHED: 2021-04-12
The Fatek Automation WinProladder Versions 3.3 and prior are vulnerable to an integer underflow, which may cause an out-of-bounds write and allow an attacker to execute arbitrary code.
CVE-2021-3465
PUBLISHED: 2021-04-12
** REJECT ** DO NOT USE THIS CANDIDATE NUMBER. ConsultIDs: none. Reason: This candidate was withdrawn by its CNA. Further investigation showed that it was not a security issue. Notes: none.
CVE-2020-15942
PUBLISHED: 2021-04-12
An information disclosure vulnerability in Web Vulnerability Scan profile of Fortinet's FortiWeb version 6.2.x below 6.2.4 and version 6.3.x below 6.3.5 may allow a remote authenticated attacker to read the password used by the FortiWeb scanner to access the device defined in the scan profile.
CVE-2021-22190
PUBLISHED: 2021-04-12
A path traversal vulnerability via the GitLab Workhorse in all versions of GitLab could result in the leakage of a JWT token
CVE-2021-24024
PUBLISHED: 2021-04-12
A clear text storage of sensitive information into log file vulnerability in FortiADCManager 5.3.0 and below, 5.2.1 and below and FortiADC 5.3.7 and below may allow a remote authenticated attacker to read other local users' password in log files.