MCPcopy Create free account
hub / github.com/GhostFrankWu/SAEG / jmp2shellcode

Function jmp2shellcode

aeg_module/mod_exploit.py:125–131  ·  view source on GitHub ↗
(state_raw: angr.SimState, challenge: Challenge, new_mem: list, binary: InteractiveBinary)

Source from the content-addressed store, hash-verified

123
124
125def jmp2shellcode(state_raw: angr.SimState, challenge: Challenge, new_mem: list, binary: InteractiveBinary):
126 payload = get_shellcode(challenge.target_property)
127 constraints = [state_raw.memory.load(new_mem[0], size=len(payload) + challenge.target_property['arch_bytes']) ==
128 challenge.le(binary.io_seg_addr['text'] + binary.io_seg_addr['jmp_esp']) + payload]
129 for constraint in constraints:
130 state_raw.add_constraints(constraint)
131 binary.get_flag(state_raw, dump_payload(state_raw, True))
132
133
134def ret2win(state_raw: angr.SimState, challenge: Challenge, new_mem: list, binary: InteractiveBinary, align_=False):

Callers

nothing calls this directly

Calls 3

get_shellcodeFunction · 0.85
dump_payloadFunction · 0.85
get_flagMethod · 0.80

Tested by

no test coverage detected