Registration is now open for SASE Week 2023! Get on the guest list.

  • Security Service Edge Products

    Protect against advanced and cloud-enabled threats and safeguard data across all vectors.

  • Borderless SD-WAN

    Confidently provide secure, high-performance access to every remote user, device, site, and cloud.

The platform of the future is Netskope

Intelligent Security Service Edge (SSE), Cloud Access Security Broker (CASB), Cloud Firewall, Next Generation Secure Web Gateway (SWG), and Private Access for ZTNA built natively into a single solution to help every business on its journey to Secure Access Service Edge (SASE) architecture.

Go to Products Overview
Netskope video
Borderless SD-WAN: Ushering in the New Era of Borderless Enterprise

Netskope Borderless SD-WAN offers an architecture that converges zero trust principles and assured application performance to provide unprecedented secure, high-performance connectivity for every site, cloud, remote user, and IoT device.

Read the article
Borderless SD-WAN
  • NewEdge

    NewEdge is the world’s largest, highest-performing security private cloud.

  • Cloud Security Platform

    Unrivaled visibility and real-time data and threat protection on the world's largest security private cloud.

  • Technology Partners & Integrations

    Netskope partners with the strongest companies in enterprise technology.

Embrace a Secure Access Service Edge (SASE) architecture

Netskope NewEdge is the world’s largest, highest-performing security private cloud and provides customers with unparalleled service coverage, performance and resilience.

Learn about NewEdge
Your Network of Tomorrow

Plan your path toward a faster, more secure, and more resilient network designed for the applications and users that you support.

Get the white paper
Your Network of Tomorrow
Netskope Cloud Exchange

The Netskope Cloud Exchange (CE) provides customers with powerful integration tools to leverage investments across their security posture.

Learn about Cloud Exchange
Netskope video
Make the move to market-leading cloud security services with minimal latency and high reliability.

Learn about NewEdge
Lighted highway through mountainside switchbacks
Safely enable the use of generative AI applications with application access control, real-time user coaching, and best-in-class data protection.

Learn how we secure generative AI use
Safely Enable ChatGPT and Generative AI
Zero trust solutions for SSE and SASE deployments

Learn about Zero Trust
Boat driving through open sea
Netskope enables a safe, cloud-smart, and fast journey to adopt cloud services, apps, and public cloud infrastructure.

Learn about Industry Solutions
Wind turbines along cliffside
  • Resources

    Learn more about how Netskope can help you secure your journey to the cloud.

  • Blog

    Learn how Netskope enables security and networking transformation through security service edge (SSE).

  • Events & Workshops

    Stay ahead of the latest security trends and connect with your peers.

  • Security Defined

    Everything you need to know in our cybersecurity encyclopedia.

Security Visionaries Podcast

Leveling Up the SASE Conversation
Robert Arandjelovic and Gerry Plaza sit down to chat with Max Havey about how embracing a SASE journey can help bring networking and security teams closer together.

Play the podcast
Leveling Up the SASE Conversation
Latest Blogs

How Netskope can enable the Zero Trust and SASE journey through security service edge (SSE) capabilities.

Read the blog
Sunrise and cloudy sky
SASE Week 2023: Your SASE journey starts now!

Join us for the fourth annual SASE Week, September 26-28.

Get on the guest list
SASE Week 2023
What is Security Service Edge?

Explore the security side of SASE, the future of network and protection in the cloud.

Learn about Security Service Edge
Four-way roundabout
  • Our Customers

    Netskope serves more than 2,000 customers worldwide including more than 25 of the Fortune 100

  • Customer Solutions

    We are here for you and with you every step of the way, ensuring your success with Netskope.

  • Netskope Community

    Learn from other network, data, and security professionals.

  • Training and Certification

    Netskope training will help you become a cloud security expert.

We help our customers to be Ready for Anything

See our Customers
Woman smiling with glasses looking out window
Netskope’s talented and experienced Professional Services team provides a prescriptive approach to your successful implementation.

Learn about Professional Services
Netskope Professional Services
The Netskope Community can help you and your team get more value out of products and practices.

Go to the Netskope Community
The Netskope Community
Secure your digital transformation journey and make the most of your cloud, web, and private applications with Netskope training.

Learn about Training and Certifications
Group of young professionals working
  • Company

    We help you stay ahead of cloud, data, and network security challenges.

  • Why Netskope

    Cloud transformation and work from anywhere have changed how security needs to work.

  • Leadership

    Our leadership team is fiercely committed to doing everything it takes to make our customers successful.

  • Partners

    We partner with security leaders to help you secure your journey to the cloud.

Supporting sustainability through data security

Netskope is proud to participate in Vision 2045: an initiative aimed to raise awareness on private industry’s role in sustainability.

Find out more
Supporting Sustainability Through Data Security
Highest in Execution. Furthest in Vision.

Netskope recognized as a Leader in the 2023 Gartner® Magic Quadrant™ for Security Service Edge.

Get the report
Netskope recognized as a Leader in the 2023 Gartner® Magic Quadrant™ for Security Service Edge.
Thinkers, builders, dreamers, innovators. Together, we deliver cutting-edge cloud security solutions to help our customers protect their data and people.

Meet our team
Group of hikers scaling a snowy mountain
Netskope’s partner-centric go-to-market strategy enables our partners to maximize their growth and profitability while transforming enterprise security.

Learn about Netskope Partners
Group of diverse young professionals smiling

Not Laughing: Malicious Office Documents using LoLBins

Jun 29 2021

Co-authored by Ghanashyam Satpathy and Jenko Hwong


Attackers have long used phishing emails with malicious Microsoft Office documents, often hosted in popular cloud apps like Box and Amazon S3 to increase the chances of a successful lure. The techniques being used with Office documents are continuing to evolve.

In August – September of 2020, we analyzed samples that used advanced techniques like:

  1. Constructing a PowerShell script at runtime. 
  2. Constructing WMI namespaces at runtime. 
  3. Using VBA logic obfuscation to evade static and signature-based detections.

In January 2021, we examined samples that use obfuscation and embedded XSL scripts to download payloads.

In this blog post, we will examine a new set of malicious Office documents using additional techniques to evade signature-based threat detection, including:

  1. Embedded base64 payloads 
  2. Code injection

This is the first time we have seen attackers using Office documents that use both VBA and LoLbins (certutil.exe and mavinject.exe). This blog post provides a default teardown of how these techniques are being used by the Lazarus Group. 


In this blog post, we examine a malicious Microsoft Word document linked to the Lazarus Group:







The techniques used in the sample include:

  • Embedded payload in base64
  • Decoding the base64 payload using certutil.exe
  • Using mavinject.exe for code injection

Mavinject.ext and certutil.exe are Windows LoLbins (living off the land binaries), used by this sample to connect to the C&C servers and download next stage payloads.

Embedded base64 payload

The sample is a Word document (screenshot below) that prompts the user to click the “Enable Content” button. The macro code has an auto-trigger routine to execute as soon as “Enable Content” is clicked.

Screenshot of sample Word doc

The initial payload is stored inside the VBA code as a base64 encoded string. The base64 string is saved into a file on the local disk and later decoded back into a PE file. For decoding it uses certutil.exe, a Windows utility installed as part of Certificate Services that is used to configure Certificate Services, backup and restore CA components, and verify certificates and key pairs. The VBA code references certutil.exe using a wildcard string (certut*) inside the VBA code. The use of a wildcard is to evade simple pattern match on certutil.exe. The VBA script invokes certutil.exe with the -decode command line option to decode the base64 encoded data. 

The following screenshot shows the VBA project. The base64 string can be seen inside the VBA code. The VBA Function WLQGQifZzoSMZHc is invoked inside Document_Open():

Screenshot showing the VBA project with the base64 string in the VBA code.

The sample writes the base64 content into a file at location C:\Drivers and names it: DriverGFC.tmp. It then copies certutil.exe from system location to c:\Drivers location and renames it as DriverUpdateRx.exe. It refers to certutil using a wildcard as certut*.exe while copying it from the system location. This is done to evade signatures that key off of the string “certutil.” The original payload is renamed to DriverCLHD.tmp. The command executed at runtime is shown below:

"C:\Windows\System32\cmd.exe" /c copy /b C:\Windows\system32\certut*.exe c:\Drivers\DriverUpdateRx.exe

"C:\Windows\System32\cmd.exe" /c copy /b c:\Drivers\DriverGFC.tmp+c:\Drivers\DriverGFXCoin.tmp c:\Drivers\DriverCLHD.tmp & del c:\Drivers\DriverGFC.tmp & del c:\Drivers\DriverGFXCoin.tmp

It decodes the file content using certutil (now copied to  DriverUpdateRx.exe) with the -decode option. 

This creates the output file DriverGFY.db. After decoding, the sample deletes the DriverUpdateRx.exe from C:\Drivers location and creates another copy of DriverGFY.db as DriverGFY.db.dll. The technique the attacker is using here is Deobfuscate/Decode Files or Information from the Mitre ATT&CK Framework.

The command executed at runtime is shown below:

"C:\Windows\System32\cmd.exe" /c c:\Drivers\DriverUpdateRx.exe -decode c:\Drivers\DriverCLHD.tmp c:\Drivers\DriverGFY.db & del c:\Drivers\DriverCLHD.tmp & del c:\Drivers\DriverUpdateRx.exe

"C:\Windows\System32\cmd.exe" /c copy /b c:\Drivers\DriverGFY.db c:\Drivers\DriverGFY.db.dll

Using the WMI utility, it gets the handle to the running instance of Explorer.exe. Following is the VBA code snippet:

Set vQSppIeZ = GetObject("winmgmts:\\.\root\cimv2")
Set HfXHePNP = vQSppIeZ.ExecQuery("Select * from Win32_Process where name='explorer.exe'")

Using mavinject.exe (Microsoft Application Virtualization Injector), it does code injection into explorer.exe with its payload DriverGFY.db. The technique the attacker is using here is Process Injection in the Mitre ATT&CK Framework.

The command executed at runtime for doing code injection is shown below:

"C:\Windows\System32\cmd.exe" /c mavinject.exe 568 /injectrunning c:\Drivers\DriverGFY.db

The following is a screenshot of the HexEdit view of the payload after it has been decoded using certutil.exe:

Screenshot of the HexEdit view of the payload after it has been decoded using certutil.exe

The SysMon capture of Process Injection into Explorer.exe is:

Screenshot of the SysMon capture of Process Injection into Explorer.exe.

The screenshot of payload code shows a reference to download the next stage payload. The Exported function InitUpdate downloads from allgraphicart[.]com.

Screenshot of payload code showing a reference to download the next stage payload.

Netskope Detection

At Netskope, we apply a hybrid approach to malicious Office document detection that leverages a combination of heuristics and supervised machine learning to identify malicious code embedded in documents. Netskope Advanced Threat Protection provides proactive coverage against zero-day samples including APT and other malicious Office documents using both our ML and heuristic-based static analysis engines, as well as our cloud sandbox. The following screenshot shows the detection for 648DEA285E282467C78AC184AD98FD77, indicating it was detected by both Netskope AV and the Netskope Advanced Heuristic Engine. The indicators section shows the reasons it was detected as malicious: the sample auto executes the macro code described in this blog post, writes files to the system, and executes system APIs.


In addition to the techniques covered in our previous blog posts, the sample we analyzed in this post uses two additional techniques that leverage LoLBins:

  1. Using certutil.exe to decode an enclosed base64 payload to PE file. 
  2. Using mavinject.exe to inject the payload into explorer.exe.

Netskope Advanced Threat Protection includes a custom Microsoft Office file analyzer and a sandbox to detect campaigns like APT that are in active development and are using new Office documents to spread. We will continue to provide updates on this threat as it evolves.


Sample 1: 648DEA285E282467C78AC184AD98FD77 

Dropped executable file 


DNS requests

domain allgraphicart[.]com


ip 155.138.135[.]1

ip 184.24.77[.]69

Thank you to Zhi Xu and Benjamin Chang for helping analyze the sample files and contributing to this blog. 

author image
Ghanashyam Satpathy
Ghanashyam Satpathy is a Principal Researcher with the Netskope Efficacy team, which drives the detection effectiveness. His background is building threat detection products using AI/ML technology for cloud and endpoint security.

Stay informed!

Subscribe for the latest from the Netskope Blog