Fix: system-design-doc#100
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the architecture overview section of the README to refine the system design diagram, clarify stages/layers, and improve categorization of the obfuscation pipeline.
Changes:
- Reworked the ASCII architecture diagram to describe a multi-stage obfuscation pipeline (pre-compilation, IR-level, compilation hardening, and post-compilation packing).
- Clarified descriptions of symbol obfuscation, string encryption, LLVM passes, and binary packing, including toolchain hardening options.
- Adjusted wording and ordering to emphasize pipeline stages and packed-binary output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ┌──────────────────────────────────────────────────────────────┐ | ||
| │ LLVM Obfuscator │ | ||
| ├──────────────────────────────────────────────────────────────┤ | ||
| │ │ | ||
| │ Input: source.c → [Pipeline] → Output: packed binary │ | ||
| │ │ | ||
| │ ───────────────────────────────────────────────────────── │ | ||
| │ Stage 1: Pre-compilation Obfuscation │ | ||
| │ ───────────────────────────────────────────────────────── │ | ||
| │ Layer 1: Symbol Obfuscation │ | ||
| │ ├─ Cryptographic hashing (SHA256 / BLAKE2b) │ | ||
| │ ├─ Function & variable renaming │ | ||
| │ ├─ String table anonymization │ | ||
| │ └─ Optional mapping file (debug / recovery) │ | ||
| │ │ | ||
| │ Layer 2: String Encryption │ | ||
| │ ├─ XOR / AES-based string encryption │ | ||
| │ ├─ Compile-time encryption │ | ||
| │ ├─ Runtime decryption stubs │ | ||
| │ └─ Constructor-based initialization │ | ||
| │ │ | ||
| │ ───────────────────────────────────────────────────────── │ | ||
| │ Stage 2: IR-level Obfuscation (LLVM Passes) │ | ||
| │ ───────────────────────────────────────────────────────── │ | ||
| │ Layer 3: OLLVM / Custom LLVM Passes │ | ||
| │ ├─ Control Flow Flattening │ | ||
| │ ├─ Bogus Control Flow │ | ||
| │ ├─ Instruction Substitution │ | ||
| │ ├─ Basic Block Splitting │ | ||
| │ └─ Opaque predicates │ | ||
| │ │ | ||
| │ ───────────────────────────────────────────────────────── │ | ||
| │ Stage 3: Compilation & Toolchain Hardening │ | ||
| │ ───────────────────────────────────────────────────────── │ | ||
| │ Layer 4: Compiler & Linker Hardening │ | ||
| │ ├─ Link-Time Optimization (-flto) │ | ||
| │ ├─ Symbol visibility hiding (-fvisibility=hidden) │ | ||
| │ ├─ Frame pointer omission (-fomit-frame-pointer) │ | ||
| │ ├─ Stack protections (-fstack-protector-strong) │ | ||
| │ └─ Speculative execution hardening │ | ||
| │ (-mspeculative-load-hardening) │ | ||
| │ │ | ||
| │ ───────────────────────────────────────────────────────── │ | ||
| │ Stage 4: Post-compilation Binary Protection │ | ||
| │ ───────────────────────────────────────────────────────── │ | ||
| │ Layer 5: Binary Packing & Compression │ | ||
| │ ├─ UPX packing (LZMA / NRV) │ | ||
| │ ├─ 50–70% size reduction │ | ||
| │ ├─ Additional static-analysis resistance │ | ||
| │ └─ Transparent runtime decompression │ | ||
| │ │ | ||
| └──────────────────────────────────────────────────────────────┘ |
There was a problem hiding this comment.
The updated architecture diagram is no longer wrapped in a fenced code block, whereas the previous version was. Without a code block, the ASCII diagram will render in a proportional font and may misalign across different Markdown viewers. Please wrap this diagram in a fenced code block again to preserve its monospace layout and readability.
|
@rahulk789 Please update the PR by documenting all the layers, you can refer https://oaas.pointblank.club |
Fixes indents and numbering along with basic categorization