

GitHub - boku7/CobaltStrikeReflectiveLoader: Cobalt Strike User-Defined Reflecti...
source link: https://github.com/boku7/CobaltStrikeReflectiveLoader
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Cobalt Strike User-Defined Reflective Loader
Cobalt Strike User-Defined Reflective Loader written in Assembly & C for advanced evasion capabilities.
- Based on Stephen Fewer's incredible Reflective Loader project:
- Created while working through Renz0h's Reflective DLL videos from the Sektor7 Malware Developer Intermediate (MDI) Course
Versions
- Different version of this User-Defined Reflective Loader project can be found in the versions folder
Initial Project Goals
- Learn how Reflective Loader works.
- Write a Reflective Loader in Assembly.
- Compatible with Cobalt Strike.
- Cross compile from macOS/Linux.
- 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.
Usage
- Start your Cobalt Strike Team Server with or without a profile
- At the moment I've only tested without a profile and with a few profiles generated from Tylous's epic SourcePoint project
#### This profile stuff below is optional, but this is the profile I tested this Reflective Loader with #### # Install Go on Kali if you need it sudo apt install golang-go -y # Creating a Team Server Cobalt Strike profile with SourcePoint ## Clone the SourcePoint project git clone https://github.com/Tylous/SourcePoint.git ## Build SourcePoint Go project cd SourcePoint go build SourcePoint.go ## Run it with some cool flags (look at the help menu for more info) ### This is the settings I have tested UD Reflective Loader with ./SourcePoint -PE_Clone 18 -PostEX_Name 13 -Sleep 3 -Profile 4 -Outfile myprofile.profile -Host <TeamServer> -Injector NtMapViewOfSection ## Start Team Server cd ../ sudo ./teamserver <TeamServer> 'T3@Ms3Rv3Rp@$$w0RD' SourcePoint/myprofile.profile
- Go to your Cobalt Strike GUI and import the rdll_loader.cna Agressor script
- Generate your x64 payload (Attacks -> Packages -> Windows Executable (S))
- Does not support x86 option. The x86 bin is the original Reflective Loader object file.
- Use the Script Console to make sure that the beacon created successfully with this User-Defined Reflective Loader
- If successful, the output in the Script Console will look like this:
Build (Only tested from macOS at the moment)
- Run the compile-x64.sh shell script after installling required dependencies
# Install brew on macOS if you need it (https://brew.sh/) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Install Ming using Brew brew install mingw-w64 # Clone this Reflective DLL project from this github repo git clone https://github.com/boku7/CobaltStrikeReflectiveLoader.git # Compile the ReflectiveLoader Object file cd CobaltStrikeReflectiveLoader/ cat compile-x64.sh x86_64-w64-mingw32-gcc -c ReflectiveLoader.c -o ./bin/ReflectiveLoader.x64.o -shared -masm=intel bash compile-x64.sh
- Follow "Usage" instructions
Credits / References
Reflective Loader
Cobalt Strike User Defined Reflective Loader
Great Resource for learning Intel ASM
Implementing ASM in C Code with GCC
Cobalt Strike C2 Profile Generator
Recommend
-
15
强化你的Cobalt strike之Cortana Evi1cg
-
44
Hello大家好哇,我是你们的lmn小姐姐,从今天开始,我们要 发N期Cobalt Strike的教程 ,主要是介绍 从入门到入狱
-
17
Hello,大家好哇,我们上一节讲了Cobalt Strike Beacon的一些 基础知识 ,但是好像喜欢看的小伙伴不是很多呀,是不是太枯燥...
-
50
0X00 背景 最近在做渗透测试相关的工作,因工作需要准备用Cobalt Strike,老早都知道这款神器,早几年也看过官方的视频教程,但英文水平太渣当时很多都没听懂,出于各种原因后来也没怎么深入了解,所以一直都是...
-
16
0x00 前言 Cobalt Strike 3.14添加了blockdlls功能,限定子进程只能加载带有Microsoft签名的dll。 这个功能可以阻止第三方安全软件向子进程注入dll,也就无法对子进程进行hook,最终起到保护子进程的效果。 XPN在他的博客中也介...
-
125
Cobalt-Wipe [FREE VERSION OF COBALT STRIKE 4.3 2021 MAY RELEASE] Note: wipe ur ass with the real cobalt strike Usage LINUX...
-
21
SPAWN - Cobalt Strike BOF Beacon Object File (BOF) that spawns an arbitrary process from beacons memory. Supports Parent Process ID (PPID) spoofing & blocking non-MS signed DLLs from loading into the processes memory (some EDR DL...
-
27
Beaconator Beaconator is an aggressor script for Cobalt Strike used to generate a raw stageless shellcode and packing the generated shellcode using PEzor. How to Us...
-
18
Cobalt Strike BOF - Inject AMSI Bypass Cobalt Strike Beacon Object File (BOF) that bypasses AMSI in a remote process with code injection. Running inject-amsiBypass BOF from CobaltStrike What does this do? 1....
-
11
Registry-Recon Cobalt Strike Aggressor Script that Performs System/AV/EDR Recon. Author: Jess Hires Description As a red-team practitioner, we are often using tools that attempt to fingerprint details about a c...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK