Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 26cc0647c2cb91bd…

MALICIOUS

Office (OOXML)

61.5 KB Created: 2016-09-10 15:13:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-09-25
MD5: c597769deff1c5520e25ff1b436816c8 SHA-1: 6e7f813871a68f41df2c1205a2c6c9b5b9b74204 SHA-256: 26cc0647c2cb91bda5b49056373217d5fa6c35d6ba4f9a57f4330ef98cee2232
362 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File

This OOXML document contains obfuscated VBA macros with AutoOpen and Document_Open event handlers. The macros utilize WScript.Shell and the Shell() function, indicating an intent to execute arbitrary commands, likely to download and run a second-stage payload. The presence of these auto-execution macros and the use of obfuscation strongly suggest malicious intent.

Heuristics 9

  • VBA project inside OOXML medium 7 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
  • Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADER
    Auto-exec VBA reconstructs strings with a heavy custom decoder (numeric char-array, repeated hex-string decode, or junk-token Replace removal) and feeds them to a COM-instantiation or execution sink. This obfuscated-loader shape keeps CreateObject/Shell/URL indicators out of the macro source.
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open macro
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
  • 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.
  • 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.microsoft.com/office/word/2010/wordprocessingCanvas In 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/2020/wordml/sdtdatahashIn 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)
    • https://d.docs.live.net/6b812e81e7e06aab/In 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) 22221 bytes
SHA-256: 30254392130861ed68ad0da40fb4e7135375754188f552e44fb697df87aa264c
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "NewMacros"
Sub PDF_DDOC()
'
' PDF_DDOC Macro
'
'
Dim StrPDFFileNamePath, StrPDFFileName, StrPDFFilePath, OriginalFilePath, OriginalFileNamePath, StrASICEFileNamePath
    
  
    Dim StrShellCommand, DDocOutputFileName
           
    'StrPDFFileNamePath = ActiveDocument.FullName
    StrPDFFileName = ActiveDocument.Name
    StrPDFFilePath = ActiveDocument.Path
    
    StrPDFFileName = Replace(StrPDFFileName, ".docx", ".pdf")
    StrPDFFileName = Replace(StrPDFFileName, ".doc", ".pdf")
    
    StrPDFFilePath = Replace(StrPDFFilePath, "/", "\")
    StrPDFFilePath = Replace(StrPDFFilePath, "https://d.docs.live.net/6b812e81e7e06aab/", "C:\Users\KaidoLoor\OneDrive")
    StrPDFFilePath = Replace(StrPDFFilePath, "https:\\abloor-my.sharepoint.com\personal\kaido_loor_abloor_ee\Documents", "C:\Users\KaidoLoor\OneDrive - AB Loor OÜ")
    '"C:\Program Files (x86)\Open-EID\qdigidoc4.exe" "https:\\abloor-my.sharepoint.com\personal\kaido_loor_abloor_ee\Documents\AB\Kliendid\Vallo Arumäe\kliendileping (Vallo Arumäe).bdoc"
    '"C:\Program Files (x86)\Open-EID\qdigidoc4.exe" "https:\\abloor-my.sharepoint.com\personal\kaido_loor_abloor_ee\Documents\AB\Kliendid\Vallo Arumäe\kliendileping (Vallo Arumäe).bdoc"
    
    'MsgBox StrPDFFileNamePath
    'MsgBox StrPDFFileName
    'MsgBox StrPDFFilePath
    
    Set objRegEx = CreateObject("VBScript.RegExp")
    objRegEx.Global = True
    objRegEx.IgnoreCase = True
    objRegEx.Pattern = " \d{4}-\d{2}-\d{2} Kaido"
    
    StrPDFFileName = objRegEx.Replace(StrPDFFileName, "")
    StrPDFFileName = Year(Now) & "-" & TwoDigits(Month(Now)) & "-" & TwoDigits(Day(Now)) & " " & StrPDFFileName
        
    StrPDFFileNamePath = StrPDFFilePath & "\" & StrPDFFileName
    
    'MsgBox StrPDFFileNamePath
    
    'DDocOutputFileName = Replace(StrPDFFileNamePath, ".pdf", ".bdoc")
          
'teeme PDFi
    ActiveDocument.ExportAsFixedFormat OutputFileName:=StrPDFFileNamePath _
        , ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
        wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
        Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
        CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
        BitmapMissingFonts:=True, UseISO19005_1:=False
        
'teeme ASICE
       
    Dim WSShell
    Set WSShell = CreateObject("WScript.Shell")
    
    StrShellCommand = Chr(34) & "C:\Program Files (x86)\Open-EID\qdigidoc4.exe" & Chr(34) & " " & _
                        Chr(34) & StrPDFFileNamePath & Chr(34)
                        'DDocOutputFileName & Chr(34)
    
    'MsgBox (StrShellCommand)
    'TmpFolder = InputBox("Siit saab", "Siit", StrShellCommand)
    
    'StrASICEFileNamePath = Replace(StrPDFFileNamePath, ".pdf", ".asice")
    
    'RecentFiles.Add Document:=StrASICEFileNamePath
    'see paneb faili mitte Outlooki ega Exploreri recent filelist, aga Wordi recent filelisti
    
          
    WSShell.Run StrShellCommand, vbNormalFocus, True
    'avasime konteineri
    
      
End Sub

Function TwoDigits(num)
    If (Len(num) = 1) Then
        TwoDigits = "0" & num
    Else
        TwoDigits = num
    End If
End Function

Sub Convertchecklist()
Attribute Convertchecklist.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.Convertchecklist"
'
' Convertchecklist Macro
'
'
    Selection.MoveRight unit:=wdWord, Count:=5, Extend:=wdExtend
    Selection.Copy
    Selection.MoveLeft unit:=wdCharacter, Count:=1
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "[" & ChrW(8592) & "] [" & ChrW(8595) & "] [" & ChrW(8593) & _
            "
... (truncated)
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 75264 bytes
SHA-256: 20503a6b270da9d748530816af27fc8e5dd1cf13dea582bd45a7471a98a40486