Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execve bug #2411

Open
rommarius opened this issue May 23, 2024 · 1 comment
Open

execve bug #2411

rommarius opened this issue May 23, 2024 · 1 comment

Comments

@rommarius
Copy link

rommarius commented May 23, 2024

cant spawn a shell with arguments

rop = ROP(program, base=0x00007fffffffe400)
rop.call('execve', [b'/bin/sh', [[b'/bin/sh'], [b'-p'], [b'-c'], [b'ls']], 0])
chain_1  = b''
chain_1 += b'\x00'*136 # chain_1 += b'B'*6
chain_1 += rop.chain()
print(rop.dump())

with null terminated array also didn't work

rop.call('execve', [b'/bin/sh', [[b'/bin/sh'], [b'-p'], [b'-c'], [b'ls'], 0], 0])

this seems to work but complex parameters didn't

rop = ROP(program)
rop.execve(bin_sh, 0, 0)
chain_1  = b''
chain_1 += b'\x00'*136 # chain_1 += b'B'*6
chain_1 += rop.chain()
@peace-maker
Copy link
Member

This appears to be a duplicate of #2409

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants