Giter Site home page Giter Site logo

binary-exploitation's Introduction

binary-exploitation

Proof of concept binary patching/exploitation... just me playing around. I used BinaryNinja because it's what I'm most comfortable using at the moment, but my current goal is to switch to Ghidra.

The opensesame.c is the original C code used, the other two files are the subsequent patches. The "opensesame_patch1_all_pass" binary will say almost any password is correct. The "opensesame_patch2_no_pass_needed" binary doesn't even require a password to say it's correct.

The first patch changed the JNE 73A to JE 73A, in other words flipping the output of the compare statement. This gives the correct output for any input but the correct input. If I wanted to be more throrough I guess I could've changed what the input was being compared to also, so that any password including the actual correct password would give the correct result.

The second patch changed JNE 748 to JMP 72C. This causes the code to jump straight to the part of the code that gives the correct output, completly bypassing the check for input and the subsequent comparison.

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.