Khuzdul is an educational, two-pass x86-64 assembler written in pure Python.
It translates x86-64 assembly source into raw flat machine-code binaries
(.bin) — no ELF, no PE, just bytes.
Mainstream assemblers like NASM and GAS focus on producing object files for
the system linker. Khuzdul is built for security research, reverse
engineering, and shellcode development. Currently the IR layer carries
shellcode-aware metadata (bad-character filtering, PIC verification, encoding
preferences) as first-class concerns rather than afterthoughts.
There is nothing particularly novel here. The parser, lexer, and IR layer use
established techniques. The parser uses LL(1) Recursive Descent Parsing.
In future, the shellcode engine may be explored further.
This project is in Alpha stage and under active development.
Current Limitations:
- No JMP shortening
- No floating-point operations
- No math expressions
- No semantic validations
[EOF]