For more than five months, Lastline security researchers have tracked the evolution of malicious Excel 4.0 (XL4) macros, observing the fast pace at which malware authors change them to stay ahead of security tools.
A central part of many organizations’ productivity tools, Excel opens the door for phishing attacks where victims are tricked into enabling macros in malicious documents, which can results in the attackers gaining a foothold on the network, in preparation for additional activities.
During their five-month research, Lastline observed thousands of malicious samples, clustered into waves that provide a comprehensive picture of how the threat has evolved in both sophistication and evasiveness.
The identified techniques, the cybersecurity firm says, include the ability to evade automated sandbox analysis and signature-based detection, but also hands-on analysis by researchers. Each new wave would introduce new techniques, building on the previous wave or cluster, but old methods continue to be used even in current samples.
New waves would emerge every one or two weeks, each one more evasive and sophisticated, extending previous functionality with new techniques. The samples appear generated by a toolkit or document generator, and closely resemble one another.
The malware authors, Lastline says, mainly focused on evasion and obfuscation, leaving the base functionality of the observed samples unmodified: they were created to download and execute a payload such as an EXE or DLL file.
“These macros are very straightforward and easy to create, thus easy to modify to bypass signature-based detection. Security vendors are having difficulty detecting this threat, likely due to not having solutions in place to properly assess and parse the format and structure of how these macros are stored in Excel documents,” Lastline notes.
The first wave of weaponized Excel documents contained a hidden macro holding the payload, along with an image to trick the victim into enabling the macro code, and the ability to perform sandbox and OS checks.
Almost all of the following waves build on this functionality, while adding novelty to evasion, payload delivery, and payload execution timing, while also including additional checks, as Lastline explains in their detailed blog.
The researchers also point out that Excel 4.0 macros provide malware authors with “near endless” possibilities, especially since they are quickly evolving, while security companies struggle to keep pace with them.
“Excel 4.0 macros continue to prove their value to attackers, providing a reliable method to get their code to run on a target. In many environments, Excel worksheets with macros are used too heavily for legitimate business purposes to disable or blacklist, thus analysts and security vendors will have to get used to consistently updating tooling and signatures as attacks continue to evolve,” Lastline concludes.
Related: Microsoft Office for Mac Users Exposed to Macro-Based Attacks
Related: Malicious RTF Persistently Asks Users to Enable Macros