GithubHelp home page GithubHelp logo

jeffry38 / xorpacker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tmenochet/xorpacker

0.0 1.0 0.0 21 KB

Basic packer using XOR encryption

License: GNU General Public License v3.0

Python 100.00%

xorpacker's Introduction

XorPacker

XorPacker encrypts regularly compiled payloads. The resulting PE uses a bruteforce attack to decrypt the payload and evade sandbox.

Packing unmanaged PE

  1. Build Memory Module (x64 version):
apt install cmake
apt install g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 g++-mingw-w64-i686 gcc-mingw-w64-i686
git clone --recurse-submodules https://github.com/tmenochet/XorPacker
cd XorPacker/MemoryModule
mkdir build; cd build
cmake ..
make MemoryModule

Change the following line in CMakeLists.txt to build x86 version:

set (PLATFORM "i686" CACHE STRING "Platform to compile for")
  1. Generate the packed PE:
python3 ./xorpacker.py -f mimikatz.exe -t UNMANAGED
  1. Compile the resulting GO code:
apt install golang-go-windows-amd64 golang-go-windows-386
# Build x64 version
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build payload.go
# Build x86 version
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc go build payload.go

Additionally, consider the use of the following flags in the GO build command:

  • -trimpath: remove file system paths
  • -ldflags "-w -s": strip debug (DWARF) & classic symbols
  • -ldflags "-H=windowsgui": hide Terminal window

Packing .NET assembly

  1. Install Donut's Python extension:
pip3 install donut-shellcode
  1. Generate the packed PE (x64 version):
python3 ./xorpacker.py -f Grunt.exe -t MANAGED -a x64
  1. Compile the resulting GO code:
GOOS=windows GOARCH=amd64 go build payload.go

Packing shellcode

  1. Generate the packed PE:
python3 ./xorpacker.py -f meterpreter.raw -t SHELLCODE
  1. Compile the resulting GO code:
GOOS=windows GOARCH=amd64 go build payload.go

Credits

xorpacker's People

Watchers

James Cloos 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.