mirror of
https://github.com/licitrasimone/CrystalSliver
synced 2026-06-21 13:55:58 +00:00
f908321ebf
- Rename exported symbol go → Initialize in both crystal-loader.c and crystal-exec.c; update extension.json entrypoint accordingly. The go(char*, uint32_t, callback) export is the primary MeterBof.A static signature — renaming it removes the match. - Remove all [crystal-loader] / [crystal-exec] / PICO-identifying string literals from both DLLs; replace with short generic error strings. - Fix crystal-loader.c VirtualAlloc(PAGE_EXECUTE_READWRITE) → VirtualAlloc(RW) + VirtualProtect(RX); no RWX mapping ever held (same fix applied to crystal-exec.c in previous commit). - Add -s / -ffunction-sections / -fdata-sections / --gc-sections to wrapper/Makefile; crystal-loader.x64.dll shrinks from ~232 KB to 42 KB.
crystal-kit-sliver/
Source tree for the Crystal Palace ↔ Sliver port. See the project root README for the overview, build instructions, and operational flow.
Layout
| Directory | Contents |
|---|---|
loader/ |
Reflective loader sources (Use case A, implant evasion). Verbatim copy of loader/ from upstream Crystal-Kit. |
postex-loader/ |
Post-ex loader sources (Use case B). Crystal-Kit upstream + Xenon patch (DFR → ror13, removed $GMH/$GPA CS smart pointers, added dll_args section). |
sliver-glue/ |
Sliver-specific build glue and Extension wrapper. |
sliver-glue/wrapper/ |
crystal-loader.c — Sliver Extension DLL for Use case B (crystal command). |
sliver-glue/crystal-exec/ |
crystalexec.c + crystal-exec.c — built-in shell executor via Crystal Palace (crystal-exec command). 4-step build: DLL → PICO → embedded header → extension DLL. |
sliver-glue/stager/ |
Custom Use case A stager. stager.c reads payload.dat (AES-256-CBC), decrypts via BCrypt, and executes the PICO. gen_payload.py encrypts with openssl. manifest.xml declares asInvoker. |
libtcg.x64.zip |
Upstream binary dependency. Kept in-tree so loader.spec's mergelib "../libtcg.x64.zip" resolves without extra setup. |
Build entry points
make -C loader all— produce 8.ofiles + 1.binunderloader/bin/make -C postex-loader all— same for postexmake -C sliver-glue/wrapper all— producesliver-glue/crystal-loader.x64.dll(Sliver Extension,crystalcommand)make -C sliver-glue/crystal-exec all— producesliver-glue/crystal-exec.x64.dll(built-in shell executor,crystal-execcommand)sliver-glue/postex.sh <dll> [args]— Use case B convenience wrapper: DLL → PICO, prints ready-to-paste Sliver commandsliver-glue/generate.sh— lower-level Use case B build wrapper (called bypostex.sh)sliver-glue/generate-implant.sh— Use case A build wrappersliver-glue/bundle-stager.sh <pico.bin> [stager.exe]— Use case A primary: AES-encrypt PICO, compile stager →csvchelper.exe+payload.datsliver-glue/bundle-implant.sh— Use case A legacy: Crystal Palace demo stagerrun.x64.exe(detected by Defender, kept for reference)sliver-glue/pack-extension.sh— package both DLLs +extension.jsoninto Sliver Extension tarball
Required environment
export CRYSTAL_PALACE_HOME=/path/to/external/crystalpalace/dist
# Optional, only for generate-implant.sh --profile mode:
export SLIVER_SERVER=/path/to/sliver-server
Detailed documentation
- License:
../LICENSE— MIT, © 2026 Simone Licitra - Upstream attributions:
../NOTICE.md