Threat Hunting: Initial infection - Microsoft Office Document runs Certutil

Threat Hunting: Initial infection - Microsoft Office Document runs Certutil

Where in the Cyber Kill Chain?


ThreatHuntLatMS_6f0d54f7-e050-49ac-b964-86a8d2784908.png

IDENTIFYING

Runs Certutil.exe

COMPONENT

Remarks

TACTIC

Microsoft Office document runs the certutil.exe file to decode second stage binary.

TECHNIQUE

The certutil.exe file is a native windows binary that, among other features, can be used to read a base64 encoded file and output a binary to disk. This has been seen used in weaponized documents that use macros but could also be used by other first-stage methods. The certutil.exe file should not be executed by an Office application.

PROCEDURE

Trace Executed Processes

  1. Open the TaaS Tanium console.

  2. Use either the Question Builder or Question Bar, proceed to Trace Executed Processes.

  3. Configure the sensor with the following settings:

    1. Treat Inputs as Regular Expressions: Enabled

    2. Make Stackable/Skip Unique: Disabled

    3. Command Line: (?i).*certutil.*-decode.*

    4. Parent Process Patch: (?i).*(winword|excel|powerpnt).*

    Get Trace Executed Processes["","","","(?i).*certutil.*-decode.*","","",0,1,0,1,1629138378472|1629141977472,1 day] from all machines

Technique effective against the following adversary TTPs

  • Initial Infection: Microsoft Office macro attacks