Giter Site home page Giter Site logo

rop-fk's Introduction

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.

rop-fk's People

Contributors

rctcwyvrn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.