Coder Social home page Coder Social logo

tpm-malcrypt's Introduction

tpm-malcrypt

An example malicious payload controller and obfuscator assisted by TPM-protected keys.

malcrypter

This is the offline (server-side) component that generates the executed payload from the decrypter stub and your choice of encrypted payload.

Installation:

  1. Grab PyDbg from: http://www.lfd.uci.edu/~gohlke/pythonlibs/
  2. Within CMD: SET VS90COMNTOOLS=%VS120COMNTOOLS%
  3. pip install pefile pycrypto

malcrypt

This is a Windows VS2013 solution containing two projects. The logic can be rewritten on OSX or Linux, depending on the intended target.

Part 1: tpm-keyextract

Detect a TPM on a client and create a new encryption keypair using standard protections. Return the public key component to be transmitted back to a encrypted PE generator.

Part 2: malcrypt

Using an input public key and input malicious payload, generate and return a self-decrypting PE that decrypts and executes in-memory.

Although the output PE can be executed on any machine, only a target machine will have the private key pair in it's crypto-store. Thus only a target machine will decrypt and executed the original input payload.

The malcrypt application involves several components and processes:

  • Target OS crypto-store accesses.
  • An in-memory decryption/execution stub.
  • An encryptor and PE section injector.

For the crypto-store access, malcrypt assumes the input public key was created with no or known controls by tpm-keyextract. The security of the private key is not critical to malcrypt if a TPM was used to generate the key pair. Malcrypt intends to limit the execution of the input payload to a target system. There are trusted computing concerns related to proving a TPM was used to create the keypair, but they are outside the scope of the example PoC implementation.

References

License

MIT and Microsoft MSR-LA.

tpm-malcrypt's People

Contributors

theopolis 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  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.