Posted in AWS Student Builder Group, NOUN
In the Lab: Building "Project Lattice" — A Next-Gen, AI-Integrated C2 Architecture in Go & Rust Over the…
jp101216 — Security Engineer | Offensive Security Research & Custom C2 Tooling
In the Lab: Building "Project Lattice" — A Next-Gen, AI-Integrated C2 Architecture in Go & Rust
Over the past few months, I’ve been heads-down designing and engineering a new open-source adversary emulation framework from the ground up: Project Lattice.
I wanted to share the architecture and feature set I’m currently building out to test how modern detection stacks hold up against bleeding-edge userland, kernel, and AI-assisted tradecraft.
Project Lattice pairs a containerized, microservice-based Go server architecture with "Wraith"—a lightweight, self-healing Rust implant engineered for deep in-memory stealth.
Architecture & Feature Set Currently in Development:
Containerized Microservice Server & Resilience (Go + Docker)
• Multi-Player Microservice Architecture: Fully Dockerized, Mythic-style decoupled services where listeners, payload builders, and browser-based operator consoles run as independent containers over an encrypted gRPC bus.
• Self-Healing Orchestration: Automated container watchdogs designed to recover faulted listeners or builder services and re-attach session state without dropping live implants.
• Graceful Server Shutdown: Signal-aware teardown that flushes encrypted campaign state, rotates ephemeral certificates, and safely hibernates active agents before container exit.
• Smart Transport Layer: Native HTTP/2, HTTP/3 (QUIC), DoH, mTLS, and WebSockets with automated SMB/TCP P2P mesh pivoting.
Dynamic Payload Generation & AI Obfuscation
• On-the-Fly Polymorphic Builds: Containerized build pipelines that compile unique agents per target on demand—stripping debug symbols, randomizing control flow, and scrambling import tables to defeat static hash and YARA detections.
• AI-Assisted Obfuscation & OPSEC: LLM integration via MCP to dynamically rewrite loader stubs, synthesize custom encryption routines, and lint operator commands against known EDR behavioral rules before execution.
• Environmental Keying: Cryptographic payload locking tied to target-specific domain/hardware attributes to neutralize automated sandbox detonation.
"Wraith" Implant (Rust): Bleeding-Edge Evasion & Kernel Tradecraft
• Silent Moonwalk: Full dynamic call stack desynchronization using ROP gadgets and synthetic unwind metadata to evade ETW stack-walking during indirect syscalls and sleep cycles.
• Advanced BYOVD Engine: Ring-0 research module for scrubbing kernel notify callbacks (Process/Thread/ObRegisterCallbacks), blinding ETW-Ti, and toggling PPL flags—complete with PatchGuard-safe kernel pointer restoration.
• In-Memory Stealth: Combining Module Stomping, Ekko/Zilean sleep encryption, Threadless Injection, and hardware-breakpoint (Dr0–Dr3) patchless AMSI/ETW blinding.
• Self-Healing & Zero-Trace Shutdown: Vectored Exception Handler (VEH) crash guards to prevent faulty BOFs from crashing the host process while auto-rerouting broken P2P links. On exit, Wraith restores all hooks, securely zeroes its own heap and image memory pages, and terminates with zero forensic footprint.
Everything is being built strictly for authorized red/purple team operations, adversary simulation, and detection engineering research.
I'd love to hear from the community: what evasion primitives, transport quirks, or AI workflows are you most interested in testing in your labs right now?
#RedTeam #AdversaryEmulation #C2 #RustLang #Golang #OffensiveSecurity #EDR #KernelResearch #AISecurity #PurpleTeam #BuildInPublic
2 reactions · 0 comments
Topics: #golang, #offensivesecurity, #edr, #adversaryemulation, #kernelresearch, #buildinpublic, #purpleteam, #redteam, #aisecurity, #c2