Blog

TRU Positives: Weekly investigation summaries and recommendations from eSentire's Threat Response Unit (TRU)

OneNote Payload Smuggling: Multiple Threats Leverage OneNote to Deliver Malware

BY eSentire Threat Response Unit (TRU)

February 10, 2023 | 8 MINS READ

Attacks/Breaches

Threat Intelligence

Threat Response Unit

TRU Positive/Bulletin

Want to learn more on how to achieve Cyber Resilience?

TALK TO AN EXPERT

Adversaries don’t work 9-5 and neither do we. At eSentire, our 24/7 SOCs are staffed with Elite Threat Hunters and Cyber Analysts who hunt, investigate, contain and respond to threats within minutes.

We have discovered some of the most dangerous threats and nation state attacks in our space – including the Kaseya MSP breach and the more_eggs malware.

Our Security Operations Centers are supported with Threat Intelligence, Tactical Threat Response and Advanced Threat Analytics driven by our Threat Response Unit – the TRU team.

In TRU Positives, eSentire’s Threat Response Unit (TRU) provides a summary of a recent threat investigation. We outline how we responded to the confirmed threat and what recommendations we have going forward.

Here’s the latest from our TRU Team…

What did we find?

Since January 31st, 2023, TRU has observed a noted increase in malware delivery using OneNote documents. This follows reports dating back to December 2022 of OneNote documents being used to deliver Formbook malware.

OneNote documents have been adopted to deliver AsyncRAT, Redline Stealer, QuasarRAT, Bumblebee and Qakbot malware. The latter three have been observed in our telemetry and the majority of observations were tied to Qakbot.

How are OneNote Files Used to Deliver Malware?

As explained by Didier Stevens in his recent InfoSec Handler Diary, OneNote documents use a binary format called MS-ONESTORE. Executable files can be embedded within these documents then launched by clicking an icon on the page (Figure 1). “Weaponizing” OneNote documents is as straightforward as inserting executable files (including scripts) into the document body.

Figure 1 Embedding clickable executable content in OneNote.

Clicking the icon would result in a popup warning that opening the attachment could result in harm (Figure 2). If ignored, OneNote will spawn the appropriate child process (e.g., PowerShell) to execute the code. The popup does not provide any specific contextual information to help the user decide on whether the attachment is safe.

Like other warnings of this nature, it recommends the user judge the risk based on the source of the attachment. This behavior has been long exploited by the likes of Qakbot or Emotet using stolen email threads to masquerade as a trusted source.

Figure 2 Warning window when clicking executble content in OneNote.

In addition to easy insertion of clickable executable content, OneNote offers another desirable trait for malware execution as the attachment can still be clicked even when hidden behind an image (Figure 3).

Figure 3 Icons leading to embedded executables can be clicked when behind other content, such as this image of an apple.

The image below offers an example of a typical malicious OneNote document. In our observations, these documents masquerade as either OneNote or Office365 with text that lures the victim into clicking on an icon containing the payload (Figure 4).

Figure 4 Qakbot sample employing Office 365 theme.
Figure 5 The victim is presented with a false error window during initial code execution.

In the above sample, clicking the icon and accepting the warning prompt would execute an embedded HTA file using the MSHTA process (Figure 5). This HTA file used Curl to retrieve then execute a Qakbot DLL on the machine.

Examining endpoint telemetry shows this execution chain in detail:

Figure 6 Process tree showing successful execution of OneNote content.

In this particular example, Qakbot injected into wermgr.exe then spawned various Windows binaries to orient and assess the value of the target for further exploitation (Figure 7).

Figure 7 Post-infection Qakbot behavior.

Other Observations

Bumblebee

In early February, TRU analyzed a Bumblebee sample intercepted by our MDR for Endpoint service. The execution was blocked, but analysis tied it to an invoice themed email containing a OneNote attachment (Figure 8).

Figure 8 Invoice themed Bumblebee email seen February 2023.

The attachment used the typical OneNote theme to lure the victim in clicking on the “Open” image (Figure 9). This launched the “Open.hta” HTML application file which was blocked by MDR for Endpoint.

Figure 9 OneNote themed document containing an embedded HTA file.

Further analysis of the HTA document (Figure 10) revealed several VBScript and JavaScript code sections that write lightly obfuscated code to registry under HKCU\SOFTWARE\rq5w\ and used curl to retrieve and execute the DLL payload (“view.png”). It’s worth noting that this document appears very similar to those delivering Qakbot in late January and early February.

Figure 10 HTA file responsible for retrieving and loading a remote executable.

Qakbot PowerShell Variants

Recently observed Qakbot samples in our telemetry employed an embedded PowerShell script using a generic OneNote theme and executed by double clicking the “Open” icon and ignoring the content warning (Figure 11).

Figure 11 Qakbot sample employing a basic PowerShell loader.

We have also seen recent versions with lightly obfuscated PowerShell code (Figure 12). The lack of robust obfuscation may speak to benefits of the OneNote filetype in evading content inspection filters currently.

Figure 12 Recent sample using basic encoding techniques to obfuscate a portion of the script.

Quasar RAT

Finally, as explained by a TRU researcher on Twitter, QuasarRAT was observed in early February using OneNote documents. This sample contained an embedded CAB file which dropped and executed a VBS script payload (Figure 13). The VBS script called PowerShell to retrieve a PS script from a remote host. The final payload was a .NET executable that contained Quasar RAT.

Figure 13 Quasar RAT execution chain. "view.exe" was embedded in a OneNote document.

How did we find it?

Fortunately, detecting malicious OneNote document execution is relatively straightforward.

In this case, our team of 24/7 SOC Cyber Analysts and Threat Response Unit (TRU) used MDR for Endpoint rules to look for onenote.exe spawning executables or scripts. Existing signatures for Qakbot and other malware abusing this technique were successful in detecting this activity.

What did we do?

What can you learn from this TRU positive?

Figure 14 VirusTotal results (pulled February 8 2023).

Recommendations from our Threat Response Unit (TRU) Team:

As the adversarial TTPs grow in sophistication, they lead to a certain level of difficulty at which critical business decisions must be made. Preventing the various attack paths utilized by modern threat actors requires actively monitoring the threat landscape, developing, and deploying endpoint detection, and the ability to investigate logs & network data during active intrusions.

To increase your resilience against cyber threats like this, we recommend:

Indicators of Compromise

OneNote Payload Locations
bonusrehberi[.]comavalon-meta[.]com
comunidadnft[.]com quycu[.]com
attanzil[.]org charlotteblackfilmfestival[.]com
boosterfollow[.]com ebenezersecurelinks[.]com
fightfactory-ks[.]com ezintern[.]com
haraj5[.]com fcs-courier[.]com
key4academy[.]com limpezaarretada[.]com[.]br
skullhosting[.]com myanviral[.]com
opal-institute[.]com plasticsurgerydubaiuae[.]com
autovanin[.]com unitedmedicalspecialties[.]com
finetuning-digital[.]com jewishlabourbundarchive[.]net
olimobile[.]com laoitserv[.]com
sellscentre[.]com nerulgymkhana[.]com
somonoo[.]com somosacce[.]org
spincotech[.]com starcomputadoras[.]com
tinintrep[.]ro

eSentire’s Threat Response Unit (TRU) is a world-class team of threat researchers who develop new detections enriched by original threat intelligence and leverage new machine learning models that correlate multi-signal data and automate rapid response to advanced threats.

If you are not currently engaged with an MDR provider, eSentire MDR can help you reclaim the advantage and put your business ahead of disruption.

Learn what it means to have an elite team of Threat Hunters and Researchers that works for you. Connect with an eSentire Security Specialist.

eSentire Unit
eSentire Threat Response Unit (TRU)

The eSentire Threat Response Unit (TRU) is an industry-leading threat research team committed to helping your organization become more resilient. TRU is an elite team of threat hunters and researchers that supports our 24/7 Security Operations Centers (SOCs), builds threat detection models across the eSentire XDR Cloud Platform, and works as an extension of your security team to continuously improve our Managed Detection and Response service. By providing complete visibility across your attack surface and performing global threat sweeps and proactive hypothesis-driven threat hunts augmented by original threat research, we are laser-focused on defending your organization against known and unknown threats.

Read the Latest from eSentire