Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 41f2d24ff4703bd4…

MALICIOUS

Office (OLE)

368.5 KB Created: 2007-03-13 10:04:27 Authoring application: Microsoft Excel First seen: 2021-06-17
MD5: ff7a04775ee93bc8a41f41e593e9b3db SHA-1: 63b078f32bb577296bf52737861c03c8a74f04a1 SHA-256: 41f2d24ff4703bd4ff034fc3fbfdc31a4ce278f0e89059dce3390bcf332249a3
212 Risk Score

Malware Insights

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

The file contains a Workbook_Open VBA macro that is heavily obfuscated and uses CreateObject to execute code. This pattern is commonly used to download and execute a second-stage payload. While no direct download URL is present, the obfuscated loader and the presence of VBA macros strongly suggest a malicious intent to compromise the user's system.

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) 115245 bytes
SHA-256: a9a92791eba3840b6368d57d6ab36849286fa5f6129f4704fe818ac01171b39a
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")
      Call NameRangeShowRows("FooterF")

    
    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")
      Call NameRangeShowRows("FooterJ")
      
  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")

  Call NameRangeHideRows("FooterF")
  Call NameRangeHideRows("FooterJ")
  '...
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("set
... (truncated)