Created
January 28, 2026 09:55
-
-
Save Yousha/e71dea5e0e1888c590ee128f35382926 to your computer and use it in GitHub Desktop.
Binary payloads
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Structured binary patterns. (non-string) | |
| const unsigned char BINARY_PAYLOADS[][64] = { | |
| // 64-byte aligned NOP sled (0x90) — may trigger ROP detection or DEP. | |
| {0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, | |
| 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, | |
| 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, | |
| 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, | |
| 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, | |
| 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, | |
| 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, | |
| 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90}, | |
| // Canonical x64 return address pattern. (0x4141414141414141) | |
| {0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, 0,0,0,0,0,0,0,0, | |
| 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42, 0,0,0,0,0,0,0,0, | |
| 0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43, 0,0,0,0,0,0,0,0, | |
| 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, 0,0,0,0,0,0,0,0}, | |
| // Invalid x64 instruction stream (UD2 + HLT) | |
| {0x0f, 0x0b, 0xf4, 0x0f, 0x0b, 0xf4, 0x0f, 0x0b, | |
| 0xf4, 0x0f, 0x0b, 0xf4, 0x0f, 0x0b, 0xf4, 0x0f, | |
| 0x0b, 0xf4, 0x0f, 0x0b, 0xf4, 0x0f, 0x0b, 0xf4}, | |
| // IEEE 754 NaN / Infinity (may crash float parsers) | |
| {0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x7f, // +Inf | |
| 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0xff, // -Inf | |
| 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x7f, // NaN pattern | |
| 0x01,0x00,0x00,0x00,0x00,0x00,0xf8,0x7f}, | |
| // SEH record overwrite. (x64 uses different mechanism, but still useful for stack walkers) | |
| {0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41, // Next | |
| 0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42}, // Handler | |
| // Unaligned 64-bit values. (may trigger alignment faults on strict CPUs) | |
| {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, // 7 bytes → unaligned read. | |
| }; | |
| const size_t NUM_BINARY = sizeof(BINARY_PAYLOADS) / sizeof(BINARY_PAYLOADS[0]); | |
| const size_t BINARY_SIZES[] = { | |
| 64, 64, 24, 32, 16, 7 | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment