| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A sophisticated proof-of-concept demonstrating advanced in-memory evasion techniques that cyclically encrypts and decrypts shellcode while fluctuating between different memory protection states to evade detection by memory scanners.
Shellcode Fluctuation is an advanced cybersecurity tool that demonstrates modern malware and sophisticated memory evasion techniques. This tool implements the following new approach to hide shellcode in memory:
When shellcode resides in RW or NoAccess memory pages, advanced memory scanners cannot detect or dump it for analysis:
| State | Beacon Status | Scanner Detection |
|---|---|---|
| Not Encrypted | ❌ Visible | 🚨 DETECTED - Abnormal executable memory |
| Encrypted (Fluctuating) | ✅ Hidden | ✅ EVADED - No suspicious executable regions |
The technique operates by intercepting the moment when shellcode enters a sleep state and performing cryptographic operations combined with memory protection changes.
graph TD
A[Shellcode Execution] --> B[Sleep Call Detected]
B --> C[Hook kernel32!Sleep]
C --> D[Encrypt Shellcode XOR32]
D --> E[Change Protection to RW]
E --> F[Unhook Sleep - Clean IOCs]
F --> G[Execute Original Sleep]
G --> H[Re-hook Sleep]
H --> I[Decrypt Shellcode]
I --> J[Restore RX Protection]
J --> A
Detailed Process:
This advanced mode, inspired by ORCA666's research, uses Vectored Exception Handling (VEH):
graph TD
A[Shellcode Execution] --> B[Sleep Call Detected]
B --> C[Encrypt + Set PAGE_NOACCESS]
C --> D[Execute Sleep]
D --> E[Shellcode Resume Attempt]
E --> F[Access Violation Exception]
F --> G[VEH Handler Triggered]
G --> H[Decrypt + Restore RX]
H --> I[Continue Execution]
I --> A
Key Advantages:
Download the project to your computer.
Open the solution file (ShellcodeFluctuation.sln).
Select Build Solution from the Build menu.
ShellcodeFluctuation.exe shellcode_file fluctuation_modeFluctuation Modes:
Example Usage:
# Test baseline IOCs without injection
ShellcodeFluctuation.exe beacon64.bin -1
# Standard injection (detectable)
ShellcodeFluctuation.exe beacon64.bin 0
# RW fluctuation mode (evasive)
ShellcodeFluctuation.exe beacon64.bin 1
# PAGE_NOACCESS mode (maximum evasion)
ShellcodeFluctuation.exe beacon64.bin 2[DETECTED] Abnormal private executable memory Region: 0x000002210C091000 - 0x000002210C0C0000 Protection: PAGE_EXECUTE_READ Type: MEM_PRIVATE
[CLEAN] No abnormal executable memory detected [INFO] Modified code in kernel32.dll (expected IOC)
PE-Sieve detection requires the /data 3 parameter to identify implanted PE modules. The tool successfully evades standard scanning modes but may trigger on advanced analysis due to kernel32 modifications.
Detection Matrix:
| Scanner | Mode | Standard Injection | RW Fluctuation | NoAccess Fluctuation |
|---|---|---|---|---|
| Moneta | Default | 🚨 DETECTED | ✅ EVADED | ✅ EVADED |
| PE-Sieve | Default | 🚨 DETECTED | ✅ EVADED | ✅ EVADED |
| PE-Sieve | /data 3 | 🚨 DETECTED | ⚠️ PARTIAL | ⚠️ PARTIAL |
The core technique leverages Windows memory management APIs to create a dynamic protection scheme:
// Encryption + Protection Change
VirtualProtect(shellcodeAddr, size, PAGE_READWRITE, &oldProtect);
xor32(shellcodeBuffer, size, encryptionKey);
// For NoAccess mode
VirtualProtect(shellcodeAddr, size, PAGE_NOACCESS, &oldProtect);The hooking mechanism uses a fast trampoline technique:
// x64 Trampoline
uint8_t trampoline[] = {
0x49, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov r10, addr
0x41, 0xFF, 0xE2 // jmp r10
};XOR32 Implementation:
Important: Avoid unhooking kernel32.dll during operation as this will prevent the fluctuation mechanism from functioning. If using tools like unhook-bof, exclude kernel32:
beacon> unhook kernel32
[*] Will skip these modules: kernel32.dllThis technique builds upon foundational research in memory evasion:
This project is licensed under the MIT License. For more information, see the LICENSE file.
⚠️ DISCLAIMER ⚠️
This tool is provided for educational and authorized security testing purposes only. The author assumes no liability for misuse or damage caused by this software.
Learn Continuously
| Back | FazBrowse Home | New Git URL |