A write-up of my installation process of BINSEC
Steps:
- Install system dependencies
- Install Ocaml libraries
- Install BINSEC
On my Arch Linux box I had to install the following system packages:
- `ocaml` - OCaml compiler
- `camlp4` - Caml preprocessor and pretty-printer
- `opam` - OCaml Package Manager
First initialize `~/.opam` with `opam init`.
And following packages, with `opam install`:
- `piqi`
- `piqilib`
- `menhir`
- `ocamlgraph`
- `zarith`
- `zmq`
- `llvm`
- Download and extract [binsec-0.1](http://binsec.gforge.inria.fr/distrib/binsec-0.1-20170301.tgz)
- Build
- Install (root permissions)
$ cd src; make install
To decode single instruction, run `binsec disasm -decode 0000`.
For more information see `binsec disasm -help` or `binsec-0.1-*/README`.
Dependencies are a subset of that of BINSEC, shown above, plus `yojson` from `opam`.
Steps:
- Install system dependencies
- Install Ocaml libraries
- Install `bincoa`
- `ocaml`
- `opam`
Needed `opam` packages:
- `zarith`
- `zmq`
- `yojson`
Simply run `make` and find the binary in `build/bincoa`.
There is only one argument needed, which is the opcode, in hex.
BINSEC only supports 32-bit!
To decode opcode `0x0000` (`add [eax],al`), run `build/bincoa 0000`.