Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
BokuLoader — A proof-of-concept Cobalt Strike Reflective Loader which aims to recreate, integrate, and enhance Cobalt Strike's evasion features! | Kitploit
Tools/GitHubGitHub/boku7/bokuloader
Penetration Testing FrameworksExploit FrameworksShellcodeBinary AnalysisRed TeamingPayload Development
GitHubboku7/bokuloader

BokuLoader

A proof-of-concept Cobalt Strike Reflective Loader which aims to recreate, integrate, and enhance Cobalt Strike's evasion features!

View Repository
1.4k275222 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

BokuLoader : Cobalt Strike Reflective Loader

A proof-of-concept User-Defined Reflective Loader (UDRL) which aims to recreate, integrate, and enhance Cobalt Strike's evasion features!

Contributors:

ContributorTwitterNotable Contributions
Bobby Cooke@0xBokuProject original author and maintainer
Santiago Pecin@s4ntiago_pReflective Loader major enhancements
Chris Spehn@ConsciousHackerAggressor scripting
Joshua Magri@passthehashbrwnIAT hooking
Dylan Tran@d_tranmanReflective Call Stack Spoofing
James Yeung@5cript1diotIndirect System Calls

UDRL Usage Considerations

The built-in Cobalt Strike reflective loader is robust, handling all Malleable PE evasion features Cobalt Strike has to offer. The major disadvantage to using a custom UDRL is Malleable PE evasion features may or may not be supported out-of-the-box.

The objective of the public BokuLoader project is to assist red teams in creating their own in-house Cobalt Strike UDRL. The project aims to support all worthwhile CS Malleable PE evasion features. Some evasion features leverage CS integration, others have been recreated completely, and some are unsupported.

Before using this project, in any form, you should properly test the evasion features are working as intended. Between the C code and the Aggressor script, compilation with different versions of operating systems, compilers, and Java may return different results.

Evasion Features

BokuLoader Specific Evasion Features

  • Reflective callstack spoofing via synthetic frames.
  • Custom ASM/C reflective loader code
  • Indirect NT syscalls via HellsGate & HalosGate techniques
    • All memory protection changes for all allocation options are done via indirect syscall to NtProtectVirtualMemory
  • obfuscate "true" with custom UDRL Aggressor script implementation.
  • NOHEADERCOPY
    • Loader will not copy headers raw beacon DLL to virtual beacon DLL. First 0x1000 bytes will be nulls.
  • XGetProcAddress for resolving symbols
    • Does not use Kernel32.GetProcAddress
  • xLoadLibrary for resolving DLL's base address & DLL Loading
    • For loaded DLLs, gets DLL base address from TEB->PEB->PEB_LDR_DATA->InMemoryOrderModuleList
    • Does not use Kernel32.LoadLibraryA
  • Caesar Cipher for string obfuscation
  • 100k UDRL Size
  • Import DLL names and import entry name strings are stomped in virtual beacon DLL.

Supported Malleable PE Evasion Features

CommandOption(s)Supported
allocatorHeapAlloc, MapViewOfFile, VirtualAllocAll supported via BokuLoader implementation
module_x64string (DLL Name)Supported via BokuLoader implementation. Same DLL stomping requirements as CS implementation apply
obfuscatetrue/falseHTTP/S beacons supported via BokuLoader implementation. SMB/TCP is currently not supported for obfuscate true. Details in issue. Accepting help if you can fix :)
entry_pointRVA as decimal numberSupported via BokuLoader implementation
cleanuptrueSupported via CS integration
userwxtrue/falseSupported via BokuLoader implementation
sleep_mask(true/false) or (Sleepmask Kit+true)Supported. When using default "sleepmask true" (without sleepmask kit) set "userwx true". When using sleepmask kit which supports RX beacon.text memory (src47/Ekko) set "sleepmask true" && "userwx false".
magic_mz_x644 char stringSupported via CS integration
magic_pe2 char stringSupported via CS integration
transform-x64 prependescaped hex stringBokuLoader.cna Aggressor script modification
transform-x64 strrepstring stringBokuLoader.cna Aggressor script modification
stomppetrue/falseUnsupported. BokuLoader does not copy beacon DLL headers over. First 0x1000 bytes of virtual beacon DLL are 0x00
checksumnumberExperimental. BokuLoader.cna Aggressor script modification
compile_timedate-time stringExperimental. BokuLoader.cna Aggressor script modification
image_size_x64decimal valueUnsupported
namestringExperimental. BokuLoader.cna Aggressor script modification
rich_headerescaped hex stringExperimental. BokuLoader.cna Aggressor script modification
stringwstringUnsupported
stringstringUnsupported

Test

  • (2/22/23) All 4 allocator methods tested with threatexpress/malleable-c2/master/jquery-c2.4.7.profile

Project Origins

  • Based on Stephen Fewer's incredible Reflective Loader project:
    • https://github.com/stephenfewer/ReflectiveDLLInjection
  • Initially created while working through Renz0h's Reflective DLL videos from the Sektor7 Malware Developer Intermediate (MDI) Course

Usage

  1. Compile the BokuLoader Object file with make
  2. Start your Cobalt Strike Team Server
  3. Within Cobalt Strike, import the BokuLoader.cna Aggressor script
  4. Generate the x64 beacon (Attacks -> Packages -> Windows Executable (S))
  5. Use the Script Console to ensure BokuLoader was implemented in the beacon build
  • Does not support x86 option. The x86 bin is the original Reflective Loader object file.
  • Generating RAW beacons works out of the box. When using the Artifact Kit for the beacon loader, the stagesize variable must be larger than the default.
    • See the Cobalt Strike User-Defined Reflective Loader documenation for additional information

Detection Guidance

Hardcoded Strings

  • BokuLoader changes some commonly detected strings to new hardcoded values. These strings can be used to signature BokuLoader:
Original Cobalt Strike StringBokuLoader Cobalt Strike String
ReflectiveLoaderBokuLoader
Microsoft Base Cryptographic Provider v1.012367321236742382543232341241261363163151d
(admin)(tomin)
beaconbacons

Memory Allocators

DLL Module Stomping

  • The Kernel32.LoadLibraryExA is called to map the DLL from disk
  • The 3rd argument to Kernel32.LoadLibraryExA is DONT_RESOLVE_DLL_REFERENCES (0x00000001)
    • the system does not call DllMain
  • Does not resolve addresses in LDR PEB entry as detailed by MDSec here
  • Detectable by scanning process memory with pe-sieve tool

Heap Allocation

  • Executable RX or RWX memory will exist in the heap if sleepmask kit is not used.

Mapped Allocator

  • The Kernel32.CreateFileMappingA & Kernel32.MapViewOfFile is called to allocate memory for the virtual beacon DLL.

Sleepmask Detection

  • If sleepmask kit is used, there exists detection methods for this independent memory allocation as detailed by MDSec here
Download Tool