Open source binary analysis tools.
Go to file
2019-02-20 11:14:10 -08:00
base Update to fix build process. 2019-02-15 00:28:35 -08:00
deps [symbolic] update to latest crucible. 2019-02-19 08:24:45 -08:00
doc Documentation updates 2018-05-21 17:53:01 -07:00
macaw-arm [macaw-arm] Add test semigroup import for GHC 8.2. 2018-12-14 15:54:20 -08:00
macaw-ppc NatRepr changes 2019-02-13 14:21:48 -08:00
macaw-ppc-symbolic Added ArchInfo lookupReg and updateReg for PPC. 2019-02-08 17:28:43 -08:00
macaw-semmc NatRepr changes 2019-02-13 14:21:48 -08:00
refinement [refinement] Disabled PPC switching test. 2019-02-08 17:32:21 -08:00
scripts Fix graphmod script 2018-11-12 09:42:06 -05:00
submodules Update macaw-loader and semmc submodule versions. 2019-02-18 15:02:08 -08:00
symbolic [symbolic] update to latest crucible. 2019-02-19 08:24:45 -08:00
x86 Support ZMM, bitcasting, and fixed length vectors. 2019-02-14 11:06:45 -08:00
x86_symbolic Update to fix build process. 2019-02-15 00:28:35 -08:00
.gitignore Merge ../macaw-semmc 2019-02-18 09:44:31 -08:00
.gitmodules Eliminate duplication in submodules. 2019-02-18 11:42:24 -08:00
.travis.yml Add GHC 8.6.3 stack and switch travis to use it. 2019-02-15 00:42:53 -08:00
cabal.project.dist Update cabal.project.dist to reflect submodule de-duplication from merge. 2019-02-18 11:42:57 -08:00
LICENSE Add x86 specific code. 2017-09-27 15:54:43 -07:00
README.md Updated README.md to include macaw-semmc information. 2019-02-20 11:13:54 -08:00
stack-ghc-8.2.yaml Move stack.yaml to stack-ghc-8.2.yaml 2018-10-30 16:16:16 -07:00
stack.ghc-8.2.2.yaml Update to fix build process. 2019-02-15 00:28:35 -08:00
stack.ghc-8.6.3.yaml Updated stack build for GHC 8.6.3 to include macaw-semmc packages. 2019-02-20 11:14:10 -08:00

This is the main repository for the Macaw binary analysis framework. This framework is implemented to offer extensible support for architectures.

Overview

The main algorithm implemented so far is a code discovery procedure which will discover reachable code in the binary given one or more entry points such as _start or the current symbols.

The Macaw libraries are:

  • macaw-base -- The core architecture-independent operations and algorithms.
  • macaw-symbolic -- Library that provides symbolic simulation of Macaw programs via Crucible.
  • macaw-x86 -- Provides definitions enabling Macaw to be used on X86_64 programs.
  • macaw-x86-symbolic -- Adds Macaw-symbolic extensions needed to support x86.
  • macaw-semmc -- Contains the architecture-independent components of the translation from semmc semantics into macaw IR. This provides the shared infrastructure for all of our backends; this will include the Template Haskell function to create a state transformer function from learned semantics files provided by the semmc library.
  • macaw-arm -- Enables macaw for ARM (32-bit) binaries by reading the semantics files generated by semmc and using Template Haskell to generate a function that transforms machine states according to the learned semantics.
  • macaw-arm-symbolic -- Enables macaw/crucible symbolic simulation for ARM (32-bit) architectures.
  • macaw-ppc -- Enables macaw for PPC (32-bit and 64-bit) binaries by reading the semantics files generated by semmc and using Template Haskell to generate a function that transforms machine states according to the learned semantics..
  • macaw-ppc-symbolic -- Enables macaw/crucible symbolic simulation for PPC architectures
  • macaw-refinement -- Enables additional architecture-independent refinement of code discovery. This can enable discovery of more functionality than is revealed by the analysis in macaw-base.

The libraries that make up Macaw are released under the BSD license.

These Macaw core libraries depend on a number of different supporting libraries, including:

  • elf-edit -- loading and parsing of ELF binary files
  • galois-dwarf -- retrieval of Dwarf debugging information from binary files
  • flexdis86 -- disassembly and semantics for x86 architectures
  • dismantle -- disassembly for ARM and PPC architectures
  • semmc -- semantics definitions for ARM and PPC architectures
  • crucible -- Symbolic execution and analysis
  • what4 -- Symbolic representation for the crucible backend
  • parameterized-utils -- utilities for working with parameterized types

Building

Preparation

Dependencies for building Macaw that are not obtained from Hackage are supported via Git submodules:

$ git submodule update --init

Building with Cabal

The Macaw libraries can be individually built with Cabal v1, but as a group and more easily with Cabal v2:

$ ln -s cabal.project.dist cabal.project
$ cabal v2-configure
$ cabal v2-build all

To build a single library, either specify that library name instaed of all, or change to that library's subdirectory before building:

$ cabal v2-build macaw-refinement

or

$ cd refinement
$ cabal v2-build

Building with Stack

To build with Stack, first create a top-level stack.yaml file by symlinking to one of the provided stack-ghc-<version>.yaml files. E.g.

$ ln -s stack-ghc-8.6.3.yaml stack.yaml
$ stack build

Status

This codebase is a work in progress. Support for PowerPC support (both 32 and 64 bit) and X86_64 is reasonably robust. Support for ARM is ongoing.

License

This code is made available under the BSD3 license and without any support.