All Projects → blitz → Baresifter

blitz / Baresifter

Licence: agpl-3.0
A bare-metal x86 instruction set fuzzer a la Sandsifter

Projects that are alternatives of or similar to Baresifter

Plasma
Plasma is an interactive disassembler for x86/ARM/MIPS. It can generates indented pseudo-code with colored syntax.
Stars: ✭ 2,956 (+8857.58%)
Mutual labels:  capstone, x86, reverse-engineering
Edb Debugger
edb is a cross-platform AArch32/x86/x86-64 debugger.
Stars: ✭ 2,019 (+6018.18%)
Mutual labels:  capstone, x86, reverse-engineering
Boomerang
Boomerang Decompiler - Fighting the code-rot :)
Stars: ✭ 265 (+703.03%)
Mutual labels:  x86, reverse-engineering
X86 Bare Metal Examples
Dozens of minimal operating systems to learn x86 system programming. Tested on Ubuntu 17.10 host in QEMU 2.10 and real hardware. Userland cheat at: https://github.com/cirosantilli/linux-kernel-module-cheat#userland-assembly ARM baremetal setup at: https://github.com/cirosantilli/linux-kernel-module-cheat#baremetal-setup 学习x86系统编程的数十个最小操作系统。 已在QE…
Stars: ✭ 3,985 (+11975.76%)
Mutual labels:  bare-metal, x86
Unicorn
Unicorn CPU emulator framework (ARM, AArch64, M68K, Mips, Sparc, PowerPC, RiscV, X86)
Stars: ✭ 4,934 (+14851.52%)
Mutual labels:  x86, reverse-engineering
Aros
Main AROS repository for active development. Contains the main Operating System components and Build System.
Stars: ✭ 146 (+342.42%)
Mutual labels:  bare-metal, x86
Capstone.NET
.NET Core and .NET Framework binding for the Capstone Disassembly Framework
Stars: ✭ 108 (+227.27%)
Mutual labels:  capstone, x86
Reverse Engineering Tutorial
A FREE comprehensive reverse engineering tutorial covering x86, x64, 32-bit ARM & 64-bit ARM architectures.
Stars: ✭ 5,763 (+17363.64%)
Mutual labels:  x86, reverse-engineering
The holy book of x86
A simple guide to x86 architecture, assembly, memory management, paging, segmentation, SMM, BIOS....
Stars: ✭ 577 (+1648.48%)
Mutual labels:  x86, reverse-engineering
Netzob
Netzob: Protocol Reverse Engineering, Modeling and Fuzzing
Stars: ✭ 584 (+1669.7%)
Mutual labels:  reverse-engineering, fuzzing
Makin
makin - reveal anti-debugging and anti-VM tricks [This project is not maintained anymore]
Stars: ✭ 645 (+1854.55%)
Mutual labels:  capstone, reverse-engineering
Reko
Reko is a binary decompiler.
Stars: ✭ 942 (+2754.55%)
Mutual labels:  x86, reverse-engineering
Fhex
A Full-Featured HexEditor compatible with Linux/Windows/MacOS
Stars: ✭ 225 (+581.82%)
Mutual labels:  capstone, reverse-engineering
sandsifter
The x86 processor fuzzer
Stars: ✭ 21 (-36.36%)
Mutual labels:  x86, fuzzing
Keypatch
Multi-architecture assembler for IDA Pro. Powered by Keystone Engine.
Stars: ✭ 939 (+2745.45%)
Mutual labels:  x86, reverse-engineering
Pwnshop
Exploit Development, Reverse Engineering & Cryptography
Stars: ✭ 167 (+406.06%)
Mutual labels:  x86, reverse-engineering
X64dbg
An open-source x64/x32 debugger for windows.
Stars: ✭ 37,825 (+114521.21%)
Mutual labels:  x86, reverse-engineering
Keystone
Keystone assembler framework: Core (Arm, Arm64, Hexagon, Mips, PowerPC, Sparc, SystemZ & X86) + bindings
Stars: ✭ 1,654 (+4912.12%)
Mutual labels:  x86, reverse-engineering
Capstone
Capstone disassembly/disassembler framework: Core (Arm, Arm64, BPF, EVM, M68K, M680X, MOS65xx, Mips, PPC, RISCV, Sparc, SystemZ, TMS320C64x, Web Assembly, X86, X86_64, XCore) + bindings.
Stars: ✭ 5,374 (+16184.85%)
Mutual labels:  x86, reverse-engineering
Pbtk
A toolset for reverse engineering and fuzzing Protobuf-based apps
Stars: ✭ 791 (+2296.97%)
Mutual labels:  reverse-engineering, fuzzing

Baresifter

Build Status

Baresifter is a 64-bit x86 instruction set fuzzer modeled after Sandsifter. In contrast to Sandsifter, Baresifter is intended to run bare-metal without any operating system.

When loaded, the main fuzzing logic runs in ring0 as a tiny kernel. To safely execute arbitrary instructions, baresifter creates a single executable page in ring3 user space. For every instruction candidate, baresifter writes the instruction bytes to this user space page and attempts to execute it by exiting to user space. It follows the same algorithm as outlined in the original Sandsifter paper to find interesting instructions and guess instruction length.

Building and running

The build is currently tested on Fedora 29. The build requirements are

  • clang++ 5.0 or later,
  • scons, and
  • qemu with KVM support (for easy testing).

To start the build execute scons.

Baresifter can be run in KVM with ./run.sh and will output its results to the console.

To run baresifter bare-metal, use either grub or syslinux and boot baresifter.elf32 as multiboot kernel. It will dump instruction traces on the serial port. The serial port is hardcoded, so you might need to change that: git grep serial_output.

Interpreting results

Baresifter outputs data in a tabular format that looks like:

E <exc> O <capstone-instruction-id> <status> | <instruction hex bytes>

exc is the CPU exception that was triggered, when baresifter tried to execute the instruction. Exception 1 (#DB) indicates that an instruction was successfully executed. The capstone-instruction-id is an integer that represents the instruction that Capstone decoded. A zero in this field means that Capstone could not decode the instruction. status is currently one of BUG (indicating a capstone bug), UNKN (indicating an undocumented instruction), or OK (nothing interesting was found).

A concrete example looks like this:

E 0E O 0008 OK   | 00 14 6D 00 00 00 00
E 01 O 0000 UNKN | 0F 0D 3E
E 01 O 010A BUG  | 66 E9 00 00 00 00

The first line is an instruction that decoded successfully and generated a page fault when executing (exception 0xE). Capstone knows this instruction.

The second line is an undocumented instruction, i.e. the CPU executed it successfully (or at least didn't throw an undefined opcode exception), but Capstone has no idea what it is.

The third line is a Capstone bug. Here both the CPU and Capstone both decoded an instruction, the CPU was able to execute it, but Capstone and the CPU disagree on the length of that instruction.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].