GithubHelp home page GithubHelp logo

gavz / cobaltpatch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from askyeye/cobaltpatch

0.0 0.0 0.0 14 KB

Cobalt Strike Malleable Profile Inline Patch Template: A Position Independent Code (PIC) Code Template For Creating Shellcode That Can Be Appended In Stage / Post-Ex Blocks. Made for C Programmers

Makefile 5.82% Python 13.55% Assembly 3.41% C 75.09% C++ 2.12%

cobaltpatch's Introduction

About

Custom project template for creating useable bytecode blobs that can be placed in the various transform-x64 and transform-x86 blocks for post-ex and stage libraries.

The entrypoint of our code is stored under source/main.c EntryPoint function. While this is not the true entrypoint, it is called after the stack has been cleaned ( x86/x64 ) and aligned ( x64 ).

Build

To build the template, you must install make, nasm, mingw-w64, python3 and pefile from pip. Once this has completed, you must run the make build command, which will produce an output similiar to the below:

$ make
nasm -f win32 source/asm/EntryPointSc.asm -o EntryPointSc.x86.o
nasm -f win64 source/asm/EntryPointSc.asm -o EntryPointSc.x64.o
i686-w64-mingw32-gcc source/*.c EntryPointSc.x86.o -o patch.x86.exe -ffunction-sections -Os -fno-asynchronous-unwind-tables  -nostdlib -fno-ident -fno-align-functions -falign-functions=1 -fpack-struct=8 -Wl,-s,--no-seh,--enable-stdcall-fixup,-Tmisc/link_x86.ld
x86_64-w64-mingw32-gcc source/*.c EntryPointSc.x64.o -o patch.x64.exe -ffunction-sections -Os -fno-asynchronous-unwind-tables  -nostdlib -fno-ident -fno-align-functions -falign-functions=1 -fpack-struct=8 -Wl,-s,--no-seh,--enable-stdcall-fixup,-Tmisc/link_x64.ld
python3 misc/pedump.py patch.x86.exe patch.x86.bin
python3 misc/pedump.py patch.x64.exe patch.x64.bin

cobaltpatch's People

Contributors

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