Git Product home page Git Product logo

protect's Introduction

ProTecT

Copyright 1995-1996 Philippe Paquet

Description

ProTecT is an MS-DOS packer designed to protect executables from analysis.

The protector is written in Turbo Pascal with original comments in French. The stub code and the modules are written in x86 assembly.

It's from 1995! Why should I care?

This packer use a number of interesting techniques that are still relevant today and can be leveraged to defend against analysis:

  • Executing code backward
    • Using the single step mode of the microprocessor, we can adjust the instruction pointer as instructions are executed and run code backward
    • Any analysis tool that also use the single step mode of the microprocessor will interfere with proper execution
    • Decompilers will have a particularly hard time with this technique
  • Return oriented programming
    • If you think that ROP was invented in 2012, think again...
    • A full call-stack is created early on and the rest of the code just returns to the right location
    • This allows the use of functions without a visible code structure
    • A return instruction could be a jump or the end of a function
      • It is impossible to know without knowing the call-stack
    • Decompilers will have a particularly hard time with this technique
  • Pointing the stack to critical code or data while the stack is not being used
    • Any analysis tool that use the stack will destroy critical code or data
  • Using a single buffer to decrypt and execute code
    • This make analysis harder:
      • You never have all the code mapped to its execution location in memory
      • You never have all the code decrypted in memory
  • Calculating decryption keys from debugger detections
    • This allow to decouple the consequence from the point of detection
  • Jumping to instructions hidden inside other instructions
    • This break instruction decoding by the debugger
    • Debugger have improved significantly but, surprisingly, this is still somewhat effective

Test executable

test_u.exe is the unprotected test executable test_p.exe is the protected test executable

Contact

If you have any questions, feel free to contact me at [email protected]

protect's People

Contributors

philippelyp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bb33bb 5l1v3r1

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.