Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 7a7385aca862f779…

MALICIOUS

Office (OOXML)

14.6 KB Created: 2021-05-19 14:04:00 UTC Authoring application: Microsoft Office Word 12.0000 First seen: 2021-05-26
MD5: 64f38350bbabed527ae825c92a2b0631 SHA-1: 21d537aa9ac1bec2ae0a3e0ac1b80ac173f5a37d SHA-256: 7a7385aca862f7792c26fc1b1ddcce991d731501caa4b33ba6986d68a5772a64
198 Risk Score

Malware Insights

MITRE ATT&CK
T1059.005 Visual Basic T1105 Ingress Tool Transfer T1204.002 Malicious File

The sample is an OOXML document containing a VBA macro. The Auto_Close macro uses URLDownloadToFile to download a file from https://prog.hu/site/images/proghu-icon.png and then uses the Shell function to execute it. This indicates a downloader pattern, likely to fetch and run a second-stage payload.

Heuristics 7

  • VBA project inside OOXML medium 5 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 "mspaint " & ActiveDocument.Path & Application.PathSeparator & "aaa.png"
  • URLDownloadToFile in VBA critical OLE_VBA_DOWNLOAD
    URLDownloadToFile in VBA
    Matched line in script
    #If Vba7 Then
        Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" _
        Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, _
  • 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.
  • Auto_Close macro low OLE_VBA_AUTOCLOSE
    Auto_Close macro
    Matched line in script
    Sub aUToCLOse()
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
    Matched line in script
        MsgBox Environ("Temp")
  • 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 https://prog.hu/site/images/proghu-icon.png Referenced by macro
    • http://schemas.openxmlformats.org/markup-compatibility/2006Referenced by macro
    • http://schemas.openxmlformats.org/officeDocument/2006/relationshipsReferenced by macro
    • http://schemas.openxmlformats.org/officeDocument/2006/mathReferenced by macro
    • http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingReferenced by macro
    • http://schemas.openxmlformats.org/wordprocessingml/2006/mainReferenced by macro
    • http://schemas.microsoft.com/office/word/2006/wordmlReferenced by macro

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) 1106 bytes
SHA-256: 265ec32d31db1383557b953cf572808ad92bf85c5d9d60603537baf6ee93ecff
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 URLDownloadToFile Lib "urlmon" _
    Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, _
    ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
    
#Else
    Private Declare Function URLDownloadToFile Lib "urlmon" _
    Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, _
    ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

#End If




Sub aUToCLOse()

    
    
    URLDownloadToFile 0, "https://prog.hu/site/images/proghu-icon.png", "aaa.png", 0, 0
    
    Shell "mspaint " & ActiveDocument.Path & Application.PathSeparator & "aaa.png"
    
    MsgBox Environ("Temp")
    
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 10240 bytes
SHA-256: ca200d7c2e5da25a5afb529aec8c07ed0aaffea9b0f76bb278ec38757e911886