Crates.io | x86reducer |
lib.rs | x86reducer |
version | 0.1.0 |
source | src |
created_at | 2022-05-14 18:21:26.426601 |
updated_at | 2022-05-14 18:21:26.426601 |
description | a rudimentary x86 disassembler in Rust, for JHU's REVA class |
homepage | |
repository | |
max_upload_size | |
id | 586736 |
size | 148,347 |
A Rust program for disassembling raw x86 assembly, written for JHU's Reverse Engineering and Vulnerability Analysis course.
The primary mode, returns the disassembled output of a target binary. Note that the binary must only contain x86 assembly instructions, with the code beginning at offset 0.
❯ printf >tmp.asm "[BITS 32]\n\nstart:\n\txchg eax, eax\n"
❯ nasm tmp.asm
❯ cargo run -- -i tmp
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/reducer -i tmp`
0x00000000: 90 nop
You can also manually specify a MODR/M byte or MODR/M byte plus SIB byte,
and reducer
will decode it for you.
❯ cargo run -- --modrm 4d --sib 00
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/reducer --modrm 4d --sib 00`
Decoding: 4D
ModRM { md: RmByte, reg: ECX, rm: EBP }
Decoding: 00
SIB { scale: None, index: EAX, base: EAX }
There are several known issues which are entirely cosmetic.
reducer
will output call [ + esp + 0x00000033 ]
instead of call [esp + 0x33]
.esp
will not render correctly. E.g., they include a
"blank" esp
followed by the scale, such as [*2 0x11223344]
.There is one known issue which is not entirely cosmetic.