Code Monkey home page Code Monkey logo

portable-executable-encryptor's Introduction

Portable Executable Encryptor

This is a small program that i created for educational purposes that creates a new section in a portable executable and injects code into it.

Getting Started

This build currently supports only x86 files. You could easily create a new section (header and data) with this program, encrypt an existing section data and inject code into a newly created section. The program also has a default decryption code(Xor and increment) that you could inject to "hide" sections data and makes them decrypt at runtime.

Warning

Runtime decryption will only work on PEs that got linked with a static base address.

/FIXED 
/DYNAMICBASE:NO

Build

You just need a 2015 update 3 of visual studio or later to build.

Parameters

[file] Portable Executable file name.
[bin] Binary file to inject in the new section(can be skipped if you don't want to use one or to use the default one).
	-x [SectionToEncrypt] Finds and encrypts the section data.
	-e Sets file entry point to the newly added section.
	-s [SectionName] Force the name of the new section (.kik is the default).
	-k [key] Force a new IncXor encryption key (A5 is the default).
	-o [OutputFileName] Force an output file name ([file].packed is the default).
	-d Force generation of a default code encryptor and use it.
	-h Will print this parameters guide and quit.

Examples

This command for example will encrypt the .text section with 0xA5 as a key, generate a decryption code and inject it in the new section and changes the file entry point to the injectedcode.

pck FileToPack.exe -x .text -e -s .NSec -k A5 -o OutputFile.exe -d

This one will just create a new section, injects your code into it and changes the entry point to the injected code.

pck FileToPack.exe CodeToInject.o -s .NSec -e

Contributing

My code is not that great if not horrible so feel free to contribute.

portable-executable-encryptor's People

Contributors

kikos0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.