A Windows implant development framework for offensive engineering and C2 research.
A Modern Windows Implant Development Framework for Offensive Engineering and C2 Research.
Suture uses Crystal Palace to build a flat binary that pairs a position-independent loader (PIC) with a modular PICO payload. Projects compose capability libraries at link time with mergelib. The demo registers modules at startup and dispatches incoming commands by name. A small Go server logs TCP and HTTP traffic for inspection.
Lab status. Seven variants were compiled and linked. Runtime behavior remains unverified. Static disassembly shows the demo's resolver calling itself while trying to resolve
GetModuleHandleA. The WinHTTP HTTPS path requests exceptions for several server certificate errors. Use this project in an isolated, authorized lab.
loader.spec controls the library composition. The outer binary is flat and contains an embedded PE stub with its own import metadata.| Path | Contents |
|---|---|
agent/src/ | Loader, stub, entry point, and module dispatcher |
agent/libs/ | Debug, utility, and transport libraries, plus test support, remap definitions, and header-only capability interfaces |
basic/ and demo/ | Minimal example and module-dispatch example |
tests/ | LibUtils and dispatcher test sources |
tools/ and server/ | Local runner and optional Go test server |
The verified build used Windows 11 x64 with the MSYS2 UCRT64 toolchain, MinGW-w64 GCC 16.1.0, and Temurin JDK 25.0.4.1. Have Bash, GNU Make, x86_64-w64-mingw32-gcc, Python 3, zip, and java on PATH. The build also expects crystal-palace/crystalpalace.jar and the remap files under agent/libs/cp-dfr-defs/, including the project-specific dfr_agent.spec.
From the project root, build the LibTCG archive first. The project linker specs expect it next to the library directories.
make -C agent/libs/libtcg x64
cp agent/libs/libtcg/libtcg.x64.zip agent/libs/libtcg.x64.zip
make -C basic shellcode
If the archive recipe in common.mk raises IndentationError under MSYS2, place import zipfile; immediately after the opening quote in the python3 -c command. This removes the leading whitespace introduced by the line continuation. The build audit used that adjustment in its scratch copy.
| Command | Output |
|---|---|
make basic | Basic TCP build and runner |
make demo | Demo TCP build and runner |
make -C basic http or make -C demo http | HTTP variant and runner |
make basic-debug or make demo-debug | TCP debug variant and runner |
make test | Test PICO payload and runner |
Outputs go to bin/. Build variants sequentially and copy any artifact you want to keep before building another variant. The projects share output filenames.
| Build | Bytes |
|---|---|
| Basic TCP | 6,769 |
| Basic HTTP | 7,922 |
| Basic TCP debug | 9,086 |
| Demo TCP | 13,311 |
| Demo HTTP | 14,464 |
| Demo TCP debug | 15,524 |
| Test suite | 18,460 |
These sizes were reproduced using the available LibTCG archive. A clean scratch build that regenerated the archive from the included source produced a 6,830-byte basic TCP payload. The test PICO measured 18,444 bytes after its banner was renamed to Suture.
The test sources register 17 utility tests and eight module-dispatch tests through LibCPLTest. Failed assertions are nonfatal and are logged via the Windows debugger stream. A successful make test confirms the build. Test results require debugger output from an isolated runtime session.
Use scaffold.sh to create a project from the basic template. See the library template for the library layout and mergelib conventions.
See LICENSE.txt for the included notices. The tree includes code from Crystal Palace, LibTCG, and cp-dfr-defs. See the included upstream notices for LibCPLTest and the LibWinHttp wrapper. The vendored cp-dfr-defs files are based on upstream commit 202473b and include the local dfr_agent.spec overlay.
Mascot illustration generated for this project. References include the BingusLdr mascot remix and official Cobalt Strike character artwork.