All Projects → cojocar → Bin2llvm

cojocar / Bin2llvm

Licence: apache-2.0
A binary to LLVM translator

Projects that are alternatives of or similar to Bin2llvm

Plasma
Plasma is an interactive disassembler for x86/ARM/MIPS. It can generates indented pseudo-code with colored syntax.
Stars: ✭ 2,956 (+2637.04%)
Mutual labels:  disassembler, arm, reverse-engineering
Redasm
The OpenSource Disassembler
Stars: ✭ 1,042 (+864.81%)
Mutual labels:  disassembler, arm, reverse-engineering
Bap
Binary Analysis Platform
Stars: ✭ 1,385 (+1182.41%)
Mutual labels:  disassembler, arm, reverse-engineering
Reko
Reko is a binary decompiler.
Stars: ✭ 942 (+772.22%)
Mutual labels:  disassembler, arm, 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 (+4875.93%)
Mutual labels:  disassembler, arm, reverse-engineering
Dithumb
Minimal ARM/Thumb linear sweep disassembler similar to objdump
Stars: ✭ 5 (-95.37%)
Mutual labels:  disassembler, reverse-engineering
Ret Sync
ret-sync is a set of plugins that helps to synchronize a debugging session (WinDbg/GDB/LLDB/OllyDbg2/x64dbg) with IDA/Ghidra/Binary Ninja disassemblers.
Stars: ✭ 896 (+729.63%)
Mutual labels:  disassembler, reverse-engineering
Keypatch
Multi-architecture assembler for IDA Pro. Powered by Keystone Engine.
Stars: ✭ 939 (+769.44%)
Mutual labels:  arm, reverse-engineering
Peasauce
Peasauce Interactive Disassembler
Stars: ✭ 33 (-69.44%)
Mutual labels:  disassembler, reverse-engineering
Die Engine
DIE engine
Stars: ✭ 648 (+500%)
Mutual labels:  disassembler, reverse-engineering
Medusa
An open source interactive disassembler
Stars: ✭ 946 (+775.93%)
Mutual labels:  disassembler, reverse-engineering
X64dbg
An open-source x64/x32 debugger for windows.
Stars: ✭ 37,825 (+34923.15%)
Mutual labels:  disassembler, reverse-engineering
Qbdi
A Dynamic Binary Instrumentation framework based on LLVM.
Stars: ✭ 801 (+641.67%)
Mutual labels:  llvm, reverse-engineering
Ghidra
Ghidra is a software reverse engineering (SRE) framework
Stars: ✭ 30,371 (+28021.3%)
Mutual labels:  disassembler, reverse-engineering
Vivisect
Stars: ✭ 672 (+522.22%)
Mutual labels:  disassembler, reverse-engineering
Reverse Engineering
This repository contains some of the executables that I've cracked.
Stars: ✭ 29 (-73.15%)
Mutual labels:  arm, reverse-engineering
Tinygo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
Stars: ✭ 9,068 (+8296.3%)
Mutual labels:  llvm, arm
Barf Project
BARF : A multiplatform open source Binary Analysis and Reverse engineering Framework
Stars: ✭ 1,280 (+1085.19%)
Mutual labels:  arm, reverse-engineering
Tigress protection
Playing with the Tigress binary protection. Break some of its protections and solve some of its challenges. Automatic deobfuscation using symbolic execution, taint analysis and LLVM.
Stars: ✭ 550 (+409.26%)
Mutual labels:  llvm, reverse-engineering
Pince
A reverse engineering tool that'll supply the place of Cheat Engine for linux
Stars: ✭ 987 (+813.89%)
Mutual labels:  disassembler, reverse-engineering

The bin2llvm Project Build Status

This is an S2E based binary-to-LLVM translator. It converts any binary code to LLVM code. The resulting LLVM module contains functions. Some, control flow details are recovered.

Overview

The idea is to reuse components from S2E to achieve the translation to LLVM. Rougly, qemu translates from binary to TCG and S2E translates from TCG to LLVM. Plugins were added to perform the recursive disassembly of the binary. The raw LLVM code is then fed to a set of external LLVM passes. The purpose of these step is to add more details about the extracted code, concretely, basic blocks are grouped in functions. It is mainly tested on the ARM architecture. bin2llvm is a best effort tool, it will try to translate as much as possible and then link the LLVM code in a final file.

Running the Docker image

$ docker pull docker.io/cojocar/bin2llvm
$ # run one example binary
$ docker run --rm -t docker.io/cojocar/bin2llvm /bin/bash -c "/usr/local/bin2llvm/bin/bin2llvm.py --file /usr/local/bin2llvm/bin/ls-example"
$ # run the tests
$ docker run --rm -t docker.io/cojocar/bin2llvm /bin/bash -c "cd /usr/local/bin2llvm/tests; BIN2LLVM_INSTALL_DIR=/usr/local/bin2llvm make;"

How to build, install & run from the source tree

Dependencies

Consult the Dockerfile for the list of dependencies.

Building (outside Docker)

$ ./scripts/setup.sh # this will copy some dependencies in the third_party directory
$ ./scripts/build.sh ../bin2llvm-build
$ ./scripts/install.sh ../bin2llvm-build ../bin2llvm-install

(optionally) Building the Docker image

$ ./scripts/build_docker.sh

This will result in bin2llvm-dev and in bin2llvm-release-squashed images.

Running

$ cd ../bin2llvm-install && ./bin/bin2llvm.py --file ./bin/ls-example
Press Ctrl+C
INFO:bin2llvm:Using /tmp/bin2llvm-W4yJvU as temp_dir
INFO:bin2llvm:Use entry: 0x00009a74
INFO:bin2llvm:Use entry: 0x00009fa8
INFO:bin2llvm:Use entry: 0x0000c470
INFO:bin2llvm:Use entry: 0x0000c4d0
INFO:bin2llvm:Use entry: 0x0000c514
INFO:bin2llvm:Use entry: 0x0000c560
....
INFO:bin2llvm:Use entry: 0x00000000
WARNING:bin2llvm:(passes) crashed with entry: 0x00000000
INFO:bin2llvm:FINAL output is in /tmp/bin2llvm-W4yJvU/final.bc (370 functions)

The final bit code is ${OUT_DIR}/final.bc

Testing

$ cd ./tests && BIN2LLVM_INSTALL_DIR=$(realpath ../../bin2llvm-install) make

See the test directory for more details.


bin2llvm in practice

The following works are using bin2llvm:

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].