Skip to content

static-analysis-engineering/CodeHawk-Binary-Decompilation-Tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CodeHawk-Binary-Decompilation-Tests

Test cases for decompilation of IoT binaries of open-source code by the CodeHawk Binary Analyzer.

Repository Structure

The repository is organized by software package and binary, with the binary identified by the first 8 characters of its MD5 hash:

<package>/
  <hash>/
    README.md       - binary identity and provenance
    shareddata/     - header files and shared userdata derived from the source code
    liftings/       - decompilation test cases, one directory per source file

Currently available:

Package Hash Description
openssl 6f891f26 OpenSSL 1.0.1g libcrypto, ARM 32-bit ELF

Prerequisites

Running the tests requires the CodeHawk Binary Analyzer (chkx). Installation instructions are provided in the following repositories:

Obtaining Binaries

The test binaries are not included in this repository. They can be obtained from iot-binary-dataset, a repository of IoT binaries of open-source code, organized by the same hash used here. See the README.md in each binary's directory for the exact location and setup instructions.

Running Tests

Each directory under liftings/ corresponds to a source file and contains numbered test scripts to be run in sequence from within that directory. The scripts must be run in order, as each depends on the output of the previous:

Script Description
test.00.ch-analyze.notime.pass.sh Analyze the selected functions in the binary
test.01.ch-produce-pir.notime.pass.sh Produce PIR (decompiled output) for the functions
test.02.ch-check-liftings.notime.pass.sh Compare the output against the expected liftings

About

Test cases for decompilation of IoT binaries of open-sournce code by the CodeHawk Binary Analyzer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors