Phishing attacks use an old Microsoft Office flaw to spread Agent Tesla malware

Threat actors are exploiting an old Microsoft Office vulnerability, tracked as CVE-2017-11882, to spread the Agent Tesla malware.

Threat actors are exploiting an old Microsoft Office vulnerability, tracked as CVE-2017-11882 (CVSS score: 7.8), as part of phishing campaigns to spread the Agent Tesla malware.

Agent Tesla is a spyware that is used to spy on the victims by collecting keystrokes, system clipboard, screenshots, and credentials from the infected system. To do this, the spyware creates different threads and timer functions in the main function.

The experts first discovered the malware in June 2018, but it has been available since 2014, when they observed threat actors spreading it via a Microsoft Word document containing an auto-executable malicious VBA Macro.

Once the users have enabled the macro, the spyware will be installed on the victim’s machine

In recent campaigns, the attackers sent out spam messages using words like “orders” and “invoices” in an attempt to trick recipients into opening weaponized Excel documents.

The CVE-2017-11882 flaw is a memory-corruption issue that affects all versions of Microsoft Office released in the past 17 years, including the latest Microsoft Office 365. The vulnerability could be triggered on all versions of the Windows operating system, including the latest Microsoft Windows 10 Creators Update.

The vulnerability affects the MS Office component EQNEDT32.EXE which is responsible for the insertion and editing of equations (OLE objects) in documents.

The component fails to properly handle objects in the memory, a bug that could be exploited by the attacker to execute malicious code in the context of the logged-in user.

Even if the flaw was patched in 2017, experts at Microsoft continue to see threat actors exploiting it in the wild, with a peak in the number of attacks leveraging the issue over the past few weeks.

“Once a user downloads a malicious attachment and opens it, if their version of Microsoft Excel is vulnerable, the Excel file initiates communication with a malicious destination and proceeds to download additional files without requiring any further user interaction.” reads the report published by Zscaler. “Figure 3, shown below, depicts how the first additional file downloaded is a heavily obfuscated VBS file. “The VBS file incorporates variable names that are 100 characters long, adding a layer of complexity to the analysis and deobfuscation.”

Agent Tesla phishing

The obfuscated VBS downloads a malicious JPG file that includes a Base64-encoded DLL file.

After downloading the JPG file, the VBS file triggers a PowerShell executable, which fetches the Base64-encoded DLL from the image, decodes it, and loads the malicious code from the embedded DLL.

The DLL fetches the Agent Tesla payload and injects a thread into the Windows tool RegAsm process.

“Our blog provided an overview of the tactics employed by threat actors exploiting CVE-2017-11882 to deliver Agent Tesla, from their methods of data theft to evasion strategies, like obfuscation and anti-debugging techniques. Our analysis highlights how threat actors constantly adapt infection methods, making it imperative for organizations to stay updated on evolving cyber threats to safeguard their digital landscape.” concludes the report. “In addition to staying on top of these threats, Zscaler’s ThreatLabz team continuously monitors for new threats and shares its findings with the cybersecurity community.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, malware)