Bad-Character Analysis and Encoding (Concept)
- Bad-char analysis: determine which byte values the input path corrupts or drops, then ensure the payload contains none of them.
- Method: send all 256 byte values through the target and observe which survive intact in memory.
- Encoding: transform the payload so it avoids bad bytes, then prepend a small decoder stub that restores the original at runtime.
- Trade-off: the decoder must itself be free of bad bytes and needs a writable+executable region — so encoding does not beat NX.
Key Takeaway
Encoding solves the bad-byte problem, not the NX problem. It reshapes bytes; it does not create executable memory.