intbjw / CobaltStrikeReflectiveLoader

Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cobalt Strike User-Defined Reflective Loader

Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities.

Initial Project Goals

  • Learn how reflective loader works.
  • Write my own reflective loader in assembly.
  • Compatible with Cobalt Strike.
  • Cross compile from macOS/Linux.
  • Figure out how to implement inline assembly into a C project.

Future Project Goals

  • Use the initial project as a template for more advanced evasion techniques leveraging the flexibility of Assembly.
  • Implement Cobalt Strike options such as no RWX, stompPE, module stomping, changing the MZ header, etc.
  • Write a decent Aggressor script.
  • Support x86.
  • Have different versions of reflective loader to choose from.
  • Implement HellsGate/HalosGate for the initial calls that reflective loader uses (pNtFlushInstructionCache, VirtualAlloc, GetProcAddress, LoadLibraryA, etc).
  • Optimize the assembly code.
  • Hash/obfuscate strings.
  • Some kind of template language overlay that can modify/randomize the registers/methods.

How to Use

  1. Start your Cobalt Strike Team Server with or without a profile
  1. Go to your Cobalt Strike GUI and import the rdll_loader.cna Agressor script
  2. Generate your x64 payload (Attacks -> Packages -> Windows Executable (S))

How to Build (Only tested from macOS at the moment)

  1. Install mingw/gcc
  2. Run the compile-x64.sh shell script
  3. Follow instructions above (How to Use)

Credits / References

Reflective Loader

Cobalt Strike User Defined Reflective Loader

Great Resource for learning Intel ASM

Implementing ASM in C Code with GCC

About

Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities.


Languages

Language:C 99.8%Language:Shell 0.2%