Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rctcwyvrn/rop-fk
Taking return oriented programming a bit too literally
https://github.com/rctcwyvrn/rop-fk
brainfuck brainfuck-interpreter return-oriented-programming
Last synced: 3 days ago
JSON representation
Taking return oriented programming a bit too literally
- Host: GitHub
- URL: https://github.com/rctcwyvrn/rop-fk
- Owner: rctcwyvrn
- Created: 2020-08-19T05:40:57.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-19T22:33:59.000Z (about 4 years ago)
- Last Synced: 2024-08-02T05:05:48.276Z (3 months ago)
- Topics: brainfuck, brainfuck-interpreter, return-oriented-programming
- Language: C
- Homepage:
- Size: 41 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
rop-fk
---
Taking return oriented programming a bit too literally.What is this cursed creation? It's a brainfuck interpreter, except each instruction is "interpreted" by adding a return address to a smashed stack buffer. It manages to run and gracefully exit, with only some extremely bizarre memory corruption issues sometimes.
It correctly runs hello world, which means it's good enough for me. It's also a very very precariously balanced pile of memory corruption, so lots of seemingly insignificant changes can easily break the code. For example, removing some of the print statements from before the code executes causes the output to be mangled. Why? I have no clue
Usage
---
`./rop.sh [script]`If you look at `rop.sh` you see that it actually does this:
```
./rop-fk $1 > a.tmp; cat a.tmp; rm a.tmp
```And you may be wondering, why? Why? Why does that script exist? What does it do?
The answer is that otherwise something gets corrupted and the code outputs garbage
Why? I have literally no idea.
The code will execute correctly under `rop.sh` script, but not directly (`./rop-fk [script]`). Why? I have no idea.
Sometimes the code will not segfault with gdb, but segfault when running it directly. Why? I have no idea.