Giter VIP home page Giter VIP logo

permute's Introduction

Tl;DR
1. Replace FLAG (note: size limitations)
2. Duild using ./build.sh
3. If modifying the 'inner crackme' see LIMITATIONS.

This is a program which be disassemble itself into basicblocks and reassemble itself using a new order of the basicblocks.
The order of the basicblocks can hold state. The number of bits which we can encode is propotional to the number of basicblocks.
This is used in the functions 'setup' and 'crackme' to encode the flag into the permutation of basicblocks.

Note: 'setup_func' is a function pointer to 'setup', but setup will set it to NULL on first execution.

Please replace the FLAG variable in Makefile.

Dockerfile is the build environment. 
build.sh build the challenge inside the build environment and copies it out of the docker.
Dockerfile.run is an environment in which the binary can be executed. It can be handed out as a part of the challenge.
Makefile is executed inside the docker build environment by build.sh. Building using the Makefile outside of docker is not recommended.

The flag validation can be changed by replacing 'setup' and 'crackme', the current flag validation is quite simple compared to the rest of the challenge.

LIMITATION:
    - No function pointers. The disassembler cannot detect them, and the function will be deadcode. Ẃhich makes the function pointer invalid.
    - No jumptables. These are essentially function pointers.
    - No optimisations. I don't know why this breaks stuff, but it does.
    - The code size will be larger after first execution. Please make the variable 'zeroes' in main.c big enough.
    - main must the the first function of the program. Do not change the ordering of the functions or in the SOURCES variable in the Makefile.

permute's People

Stargazers

 avatar

Watchers

 avatar  avatar

permute's Issues

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.