$ account EgeBalci
SGN is a Rust-based polymorphic binary encoder for x86/x64 shellcode, designed for offensive security purposes such as generating statically undetectable payloads. It encodes raw binary instructions using an additive feedback loop (ADFL) cipher, producing self-decoding shellcode that appears statistically random. The tool also supports optional schema cipher obfuscation of the decoder stub, garbage instruction insertion, register preservation, and brute-force avoidance of bad characters or ASCII-only output. The architecture is a monolithic CLI tool and library, with key entry points in `main.rs` (CLI) and `lib.rs` (Encoder struct). The codebase is well-structured, with clear separation of concerns across modules for cipher, decoder stub construction, garbage generation, and register management. It demonstrates high craftsmanship in areas such as loop-free decoder stub generation, value-preserving garbage instruction generation, and efficient bad-character detection. The project is actively maintained, with a recent port to Rust from Go, and includes comprehensive tests including real execution tests for both x64 and x86 architectures.