mirror of
https://github.com/winterknife/EVENSTAR
synced 2026-06-21 14:13:51 +00:00
EVENSTAR - DetectProcessorMode
Version
v1.0.0
Brief
ISA: x86Mode: Protected, Compatibility, LongBitness: 32-bit, 64-bitCPL: 0, 3OS: WindowsLanguage: Python- Script that demonstrates the difference in
x86instruction decoding inIA-32andIA-32emodes to determine the execution mode of the processor at run-time
Usage
- To generate 32-bit
x86MessageBoxshellcode using theMetasploitframework
msfvenom -a x86 --platform Windows --payload windows/messagebox -f raw -o shellcode_x86.bin
- To generate 64-bit
x86MessageBoxshellcode using theMetasploitframework
msfvenom -a x64 --platform Windows --payload windows/x64/messagebox -f raw -o shellcode_x64.bin
- To create multi-bitness
x86MessageBoxshellcode
[...]>python.exe merge_shellcode.py
[-] Invalid args.
[+] Usage: python.exe merge_shellcode.py [x86-32 shellcode input filename] [x86-64 shellcode input filename] [multi-bitness x86 shellcode output filename]
[x86-32 shellcode input filename] - Path to 32-bit x86 PIC file which is to be combined into a single-shot dual-mode payload
[x86-64 shellcode input filename] - Path to 64-bit x86 PIC file which is to be combined into a single-shot dual-mode payload
[multi-bitness x86 shellcode output filename] - Path to multi-bitness x86 PIC file which will be saved to disk after merging (can be executed in both IA-32 and IA-32e mode)
Example: python.exe merge_shellcode.py shellcode_x86.bin shellcode_x64.bin shellcode_multi.bin
[...]>python.exe merge_shellcode.py shellcode_x86.bin shellcode_x64.bin shellcode_multi.bin
[+] Merged x86-32 and x86-64 shellcode into multi-bitness x86 shellcode.
Tested OS Versions
Windows 11 21H2 Build 22000 Revision 675 64-bit