CodeHawk-Binary
CodeHawk Binary Analyzer for malware analysis and general reverse engineering
This repository contains the command-line interface (in python) to run the CodeHawk Binary Analyzer and report its results. The command-line interface can be invoked as follows (adjust paths for actual location):
> export PYTHONPATH=$HOME/CodeHawk-Binary
> export PATH=$HOME/CodeHawk-Binary/chb/cmdline:$PATH
> chkx
This will show an overview of the commands available.
Installing the python API
The python API is published on PyPI, so a script that imports chb needs no
PYTHONPATH:
> pip install codehawk-binary
> python -c "import chb; print(chb.__file__)"
The distribution contains the python API only. Running an analysis additionally needs the CodeHawk Binary Analyzer (see Requirements section).
At present the analyzer supports x86 (32-bits), both ELF and PE32, mips32, and arm32 (both ARM and Thumb-2) binaries (ELF only); arm32 is stil under active development and thus somewhat experimental.
Requirements
Ensure you have zip installed.
The command-line interface requires python 3.9 or higher.
Build instructions for the CodeHawk Binary Analyzer are available
here.
Upon completion copy the analyzer, chx86_analyze, from the CodeHawk/_build/install/default/bin/
directory to the appropriate directory in chb/bin/binaries, or point the Config.py
(or ConfigLocal.py) in chb/util/ to its location.
You can check the configuration with
> chkx info
Analyzer configuration:
-----------------------
analyzer : /home/myname/codehawk/CodeHawk/_build/install/default/bin/chx86_analyze (found)
summaries: /home/myname/codehawk/CodeHawk/CHB/bchsummaries/bchsummaries.jar (found)
and check whether it works correctly by running some tests:
> chkx test runall
--ok-- arm32 elf suite_001 test_001
--ok-- x86 elf suite_001 test_001
--ok-- x86 elf suite_001 test_002
--ok-- x86 elf suite_001 test_003
--ok-- x86 elf suite_001 test_004
--ok-- x86 elf suite_001 test_005
--ok-- x86 pe suite_001 test_001.exe
--ok-- x86 pe suite_001 test_002.exe
--ok-- x86 pe suite_001 test_003.exe
--ok-- x86 pe suite_001 test_004.exe
--ok-- x86 pe suite_001 test_005.exe
All 11 tests passed.
Quick Start
> cd
> git clone https://github.com/static-analyis-engineering/CodeHawk-Binary.git
> export PYTHONPATH=$HOME/CodeHawk-Binary
> export PATH=$HOME/CodeHawk-Binary/chb/cmdline:$PATH
>
To disassmble an x86, arm32, or mips32 executable:
> chkx analyze -d mybinary
...
This will show some statistics on the disassembly, but will not perform any analysis. It usually is a good first step, especially if the the binary is large, to check if disassembly succeeded. If this looks okay, analysis can be performed with (use --reset to remove any previous intermediate results):
> chkx analyze mybinary --reset
....
> chkx results stats mybinary
The following commands are available to see more detailed results:
results stats <xname> output a summary of results with one line per function
results functions <xname> ... output a listing of annotated assembly functions
results function <xname> <fn> output a listing of a single annotated assembly function
results cfg <xname> <fn> ... produce a control flow graph for a function (in pdf)
results cfgpaths <xname> <fn> ... find paths throug a cfg with a given target
results appcalls <xname> output a listing of application calls
results dllcalls <xname> output a listing of dll calls (PE32 only)
results stringargs <xname> output a listing of calls with string arguments
results iocs <xname> output a listing of indicators of compromise encountered
Finally, it is usually a good idea to reset the analysis results when re-analyzing a binary that was analyzed before:
> chkx analyze mybinary --reset
to avoid inconsistent intermediate results.
Metadata
Release files for codehawk-binary 0.3.20261020
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codehawk_binary-0.3.20261020.tar.gz | 3.6 MB | With provenance | Details for codehawk_binary-0.3.20261020.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codehawk_binary-0.3.20261020-py3-none-any.whl | Python 3 | none | any | Details for codehawk_binary-0.3.20261020-py3-none-any.whl |
Total release size: 8.1 MB
Release files / codehawk_binary-0.3.20261020.tar.gz
| Download URL | codehawk_binary-0.3.20261020.tar.gz |
|---|---|
| Size | 3.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98ae8b4df56e45e8793a5380b4dc833b8a6ebb153df100a3584fd5df733d0b45
|
|
BLAKE2b-256 checksum How to use checksums |
3429b072cb2e93214650ddff7f2f62f5d8e0d8dd6303437b5c222b88c5c5fe17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logRelease files / codehawk_binary-0.3.20261020-py3-none-any.whl
| Download URL | codehawk_binary-0.3.20261020-py3-none-any.whl |
|---|---|
| Size | 4.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a3b798ff44771d43c99f9719592060c49cac81d175365c49fb863eb4b54570b
|
|
BLAKE2b-256 checksum How to use checksums |
7875896d1be60be91ab07d6b32c2175af94df7144c58102a58fbf581e2309e37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logSecurity for codehawk-binary 0.3.20261020
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for codehawk_binary-0.3.20261020.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.