Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 b3d15fcbfd6d4417…

MALICIOUS

Office (OLE)

422.5 KB Created: 2007-03-13 10:04:27 Authoring application: Microsoft Excel First seen: 2020-09-07
MD5: 4ffed23af205d441069eeba03d25ccb0 SHA-1: dcc13c6ef1416278b4aa64a04b63b766fdf224c0 SHA-256: b3d15fcbfd6d44178c92a16a35619b3d44c89c88d244364b1ee0432e6dfb3298
212 Risk Score

Malware Insights

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

The file is an Excel document containing a Workbook_Open macro that executes obfuscated VBA code. This code utilizes CreateObject and Environ() calls, indicative of a loader attempting to download and execute a secondary payload. The presence of an obfuscated auto-exec loader and p-code execution strongly suggests malicious intent, likely delivered via spearphishing.

Heuristics 8

  • 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
  • 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.
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
  • 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.
  • 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 http://www.w3.org/2001/XMLSchema In document text (OLE body)
    • http://www.w3.org/2001/XMLSchema-instanceIn document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 104010 bytes
SHA-256: 69e3adddf49e210e123c47ab45c1aa30079ce1e436fc422ebb64de670f975525
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 2 eval/decoder/string-building token(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 flErrSelect As Boolean
Public Sub SetflErrSelect()
  flErrSelect = True
End Sub

Private Sub Workbook_Open()
''Тимчасово вимкнено дану функціональність
''  Call OpzExcelCommon.SplashWindowShow(Version)
End Sub


Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
  Dim rng As Range
'Розробити в подальшому
'  If flErrSelect Then
'    If ActiveWorkbook.Sheets("setting").Range("B3").value = 1 Then
'      Set rng = SelExcelRegion( _
'        ActiveWorkbook.Sheets("setting").Range("C3").value, _
'        ActiveWorkbook.Sheets("setting").Range("D3").value _
'      )
'      rng.Interior.ColorIndex = ActiveWorkbook.Sheets("setting").Range("E3").value
'      rng.Interior.Pattern = ActiveWorkbook.Sheets("setting").Range("F3").value
'      rng.Interior.PatternColorIndex = ActiveWorkbook.Sheets("setting").Range("G3").value
'      ActiveWorkbook.Sheets("setting").Range("B3").value = 0
'    End If
'    flErrSelect = False
'  End If
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_Control = "CommandButton1, 6, 0, MSForms, CommandButton"
Attribute VB_Control = "Image1, 14, 2, MSForms, Image"
Attribute VB_Control = "ComboBox1, 20, 6, MSForms, ComboBox"

Private Sub ComboBox1_Change()
  'Зміна форми документа та виділення-затінення потрібних полів
  Dim J_F As String, nc_doc As String
On Error GoTo handle_err
  c_doc = GetValFromExcel("C4")
  J_F = Left(c_doc, 1)
  nc_doc = Mid(c_doc, 2, 5)
  
  Call PrepareDoc(J_F, nc_doc)
  
On Error GoTo 0
  Exit Sub

handle_err:
  Call MsgBox(Err.Description, vbCritical + vbOKOnly)

End Sub
'Підготовка форми вводу в залежності від поточного коду документа
Private Sub PrepareDoc(J_F As String, nc_doc As String)
  Call HiddenAllHRanges
  
  Select Case J_F
    Case "F"
      Call NameRangeShowRows("DOC_01_005")
      Call NameRangeShowRows("DOC_F_04")
    
    Case "J"
      Select Case nc_doc
        Case "02005"
          Call NameRangeShowRows("DOC_01_005")
        Case "02091"
          Call NameRangeShowRows("DOC_01_091")
        Case "02941"
          Call NameRangeShowRows("DOC_01_941")
        Case "02011"
          Call NameRangeShowRows("DOC_01_011")
      End Select
      
      Call NameRangeShowRows("DOC_J_04")
      
  End Select
  
End Sub

' Зховати всі іменовані діапазони що ховаються або показуються
Private Sub HiddenAllHRanges()
  Call NameRangeHideRows("DOC_01_005")
  Call NameRangeHideRows("DOC_01_091")
  Call NameRangeHideRows("DOC_01_941")
  Call NameRangeHideRows("DOC_01_011")
  
  Call NameRangeHideRows("DOC_J_04")
  Call NameRangeHideRows("DOC_F_04")
  '...
End Sub
'Процедура, що показує описаний діапазон
Private Sub NameRangeShowRows(NameRange As String)
  Dim rng As Range
  
  Application.GoTo NameRange
  Set rng = Selection
  rng.Rows.Hidden = False
End Sub
'Процедура, що ховає описаний діапазон
Private Sub NameRangeHideRows(NameRange As String)
  Dim rng As Range
  
  Application.GoTo NameRange
  Set rng = Selection
  rng.Rows.Hidden = True
End Sub


Private Sub CommandButton1_Click()
  If Worksheets("список").Visible = xlSheetVisible Then
    Worksheets("список").Visible = xlSheetHidden
    Worksheets("setting").Visible = xlSheetHidden
  Else
    Worksheets("список").Visible = xlSheetVisible
    Worksheets("setting").Visible = xlSheetVisible
  End If
End Sub

Public Sub CellLight(addr As String, Optional addrsave As String = "") 'Підсвічення поля поточного докумен
... (truncated)