No project description provided
Project description
crackers: A Tool for Synthesizing Code-Reuse Attacks from p-code Programs
This package contains the Python bindings for crackers, a tool for synthesizing
code-reuse attacks (e.g., ROP) built around the Z3 SMT Solver and Ghidra's SLEIGH code translator.
For more details, please refer to the GitHub project.
Usage
The easiest way to use crackers is through the PyPI package. For every release, we provide wheels for [MacOS, Windows, Linux] x [3.10, 3.11, 3.12, 3.13].
A simple usage looks like the following:
import logging
logging.basicConfig(level=logging.INFO)
from z3 import BoolRef, BoolVal
from crackers import State, ModeledBlock
from crackers.config import MetaConfig, LibraryConfig, SleighConfig,
ReferenceProgramConfig, SynthesisConfig, ConstraintConfig, CrackersConfig
from crackers.config.constraint import RegisterValuation,
RegisterStringValuation, MemoryValuation, PointerRange,
CustomStateConstraint, CustomTransitionConstraint, PointerRangeRole
from crackers.config.log_level import LogLevel
from crackers.config.synthesis import SynthesisStrategy
# Custom state constraint example
def my_constraint(s: State, _addr: int) -> BoolRef:
rdi = s.read_register("RDI")
rcx = s.read_register("RCX")
return rdi == (rcx ^ 0x5a5a5a5a5a5a5a5a)
# Custom transition constraint example
def my_transition_constraint(block: ModeledBlock) -> BoolRef:
# Dummy: always true
return BoolVal(True)
meta = MetaConfig(log_level=LogLevel.INFO, seed=42)
library = LibraryConfig(max_gadget_length=8, path="libz.so.1", sample_size=None,
base_address=None)
sleigh = SleighConfig(ghidra_path="/Applications/ghidra")
reference_program = ReferenceProgramConfig(path="sample.o", max_instructions=8, base_address=library.base_address)
synthesis = SynthesisConfig(strategy=SynthesisStrategy.SAT, max_candidates_per_slot=200, parallel=8, combine_instructions=True)
constraint = ConstraintConfig(
precondition=[
RegisterValuation(name="rdi", value=0xdeadbeef),
MemoryValuation(space="ram", address=0x1000, size=4, value=0x41),
RegisterStringValuation(reg="rsi", value="/bin/sh"),
CustomStateConstraint(code=my_constraint)
],
postcondition=[
RegisterValuation(name="rax", value=0x1337),
CustomStateConstraint(code=my_constraint)
],
transition=[
PointerRange(role=PointerRangeRole.READ, min=0x2000, max=0x3000),
CustomTransitionConstraint(code=my_transition_constraint)
]
)
config = CrackersConfig(meta=meta, library=library, sleigh=sleigh, specification=reference_program, synthesis=synthesis, constraint=constraint)
config.run()
Research Paper
crackers was initially developed in support of our research paper, Synthesis of Code-Reuse Attacks from p-code Programs,
presented at Usenix Security 2025.
If you found the paper or the implementation useful, you can cite it with the following BibTeX:
@inproceedings{denhoed2025synthesis,
title={Synthesis of ${Code-Reuse}$ Attacks from p-code Programs},
author={DenHoed, Mark and Melham, Tom},
booktitle={34th USENIX Security Symposium (USENIX Security 25)},
pages={395--411},
year={2025}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crackers-0.6.0.tar.gz.
File metadata
- Download URL: crackers-0.6.0.tar.gz
- Upload date:
- Size: 77.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b5dd8ff1e7d918deabde63bed570c225949b5369c292a88c9fa79d39e74fc1a
|
|
| MD5 |
53ace21879e55b20b3b68e0ba77dc076
|
|
| BLAKE2b-256 |
cb6bf326b3fcb56b33f865de16ed70f4cc7900559e2d54feb8370ad77de2080c
|
File details
Details for the file crackers-0.6.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: crackers-0.6.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: PyPy, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e3cd8dcf64fe005a3db9db4e5d9caea6d193c196046555881f3d17eeb9db1cd
|
|
| MD5 |
f92237104569242baf7be5e0e2a25dcd
|
|
| BLAKE2b-256 |
3f17f5abac1d32d1192642998aa73200b48a1b35cf0df6cf372409f71c457bb0
|
File details
Details for the file crackers-0.6.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: crackers-0.6.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: PyPy, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06e9cd7c9a6820f9ab1c15dd9934e049bb54e5e4438d738f495a80caee9e75b7
|
|
| MD5 |
5eb60fae75b3f73862551a9fd6b94e7d
|
|
| BLAKE2b-256 |
6e93f9a049cd6af300426fe593d429fa1cbae2edb9b95c78c585b9b5a59b5493
|
File details
Details for the file crackers-0.6.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: crackers-0.6.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: PyPy, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1984e90432e264669fffd5a3b589cd7999fe5c03d83090e823ba6a3cbe182a3c
|
|
| MD5 |
5cd2df083926f96c2627462648615920
|
|
| BLAKE2b-256 |
aee5f3c9f27dfc1c89428052b2687df8fcd458d27e6b8769816a9f43cf9c5d33
|
File details
Details for the file crackers-0.6.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: crackers-0.6.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: PyPy, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5821c16fa9812999a89ec7fdb4587e75983027ada50ebbcf1df5497abb8cd6c2
|
|
| MD5 |
66b68f0221218d50c8ca9b5a5bab003e
|
|
| BLAKE2b-256 |
18f0cee330791ebccd0d2ae5999560f10a84f23d5a2169546115fab99bb96c5d
|
File details
Details for the file crackers-0.6.0-cp313-cp313t-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: crackers-0.6.0-cp313-cp313t-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.13t, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70db92346d947c3bfe712d63e0d6c6703f313cf2bfbdb82625d8da7a442adacd
|
|
| MD5 |
86d894337fb925db7e88d3a58fcc61db
|
|
| BLAKE2b-256 |
a8c074b5120a045217912c4ffb16d954a254e7657837ccc4e8a19249dcb7e6f6
|
File details
Details for the file crackers-0.6.0-cp313-cp313t-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: crackers-0.6.0-cp313-cp313t-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.13t, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce757435177e7ab6d6f45145c7fc84e92de3084b353de798f5f88367d5146c85
|
|
| MD5 |
0ac24278c91ccd4f1c0294b0bd789d7f
|
|
| BLAKE2b-256 |
e711a39029810c814bdf0cf6fefbc4915a0358fa1eb23a45117cfbb143670956
|
File details
Details for the file crackers-0.6.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: crackers-0.6.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c25a79a712d6da38ef53fedf3fea8dc74c27830761ccdadbf51c3a9fbf3a91
|
|
| MD5 |
2c27d94373354158221061e04a0cdd8e
|
|
| BLAKE2b-256 |
92447d327d0db652641755f9b05db94605da6991e479df1936e7f28f9a4a593e
|
File details
Details for the file crackers-0.6.0-cp313-cp313-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: crackers-0.6.0-cp313-cp313-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f86131a6654ede0617f1d548cbf62a4f8b8699d2310f5290f6bd2bff9f45f5e7
|
|
| MD5 |
aa4c28a2eb2039247f2fcc40e48eaaab
|
|
| BLAKE2b-256 |
44c90de2eb4d7a864facd51ea87e5fcb7485d9ff4463a6fff90341ffb6ba991f
|
File details
Details for the file crackers-0.6.0-cp313-cp313-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: crackers-0.6.0-cp313-cp313-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.13, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf166aa3e31110e4f761fa83bbb0d0f9636733d78f8a52b8ad4785a6d795bf23
|
|
| MD5 |
3219bcb31d50950065e9b9aaf7e645b8
|
|
| BLAKE2b-256 |
92fdda1f6ee5a7f1df49cfd665cedaa28f9da5559ec5f5fb72d06c7520550d7a
|
File details
Details for the file crackers-0.6.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: crackers-0.6.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2331bd5d0fff2760febebdefa2e81c1aa7e0f31af440d61ea30e5f744a90d592
|
|
| MD5 |
ec08b261e9b5095dc98dbbf02dfc4998
|
|
| BLAKE2b-256 |
8b04e2575194f58de1b7b474f4fa7b1e75ee6247c34e5c0bc50d2e45d97e65c7
|
File details
Details for the file crackers-0.6.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: crackers-0.6.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfac836b733d9c6d44f0093f6ae8abec4d7f9edaf40b2076ab917ea4a28a367f
|
|
| MD5 |
41db8ba89c47e2337cbac9b68e4d3bd8
|
|
| BLAKE2b-256 |
5fda9158c893069a70ff6dd83b4be3c42d7181c3a75964121ece87367ae779b9
|
File details
Details for the file crackers-0.6.0-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: crackers-0.6.0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bf4ed2766312b54418735dd6c0feada4d58d9777c6008b17c914f7bca7c32b7
|
|
| MD5 |
0f493656c4a71c79e0f6fa103c2649a4
|
|
| BLAKE2b-256 |
b097173c96c66ed000ddf08babfbbb64df406d121abaf5268fc82f4de755ae21
|
File details
Details for the file crackers-0.6.0-cp312-cp312-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: crackers-0.6.0-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7137928c28fb64edcc5a4a66e4ccd6f79d6d6b38f1fa421751ff429bee5caf3f
|
|
| MD5 |
9f978a43bf1c45a7a813952e49e56315
|
|
| BLAKE2b-256 |
e9b84d17d0ecc1e599a50a816d1fa4d2b7bd797ec65f37596ecff723a995832a
|
File details
Details for the file crackers-0.6.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: crackers-0.6.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a38cf92b2c77d036db26c0cafecc8699e98f391642d50f8b7fbda16a319f681
|
|
| MD5 |
7c2936fe6f8b3cecbbf9c6029ebc4007
|
|
| BLAKE2b-256 |
a58ed80e125097d8f8fec14271a7516f9e5cff4ccd03822ae5576016ed8e69e1
|
File details
Details for the file crackers-0.6.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: crackers-0.6.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b19bf822d2bdecef01d8b719082f17b3fb5b0f69cd718cbb2f51e3f9ba4b930c
|
|
| MD5 |
26a993953a31cb20f2eea997502fa930
|
|
| BLAKE2b-256 |
bf4f1b7faeae6d4db91ac1d5642a3d30570f8b2eb4dbeba061705aba2b2a5434
|
File details
Details for the file crackers-0.6.0-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: crackers-0.6.0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f1196193084895237a3c76f23b2baa0120fee57671c8eb1150370fd72959033
|
|
| MD5 |
5df967c590ce8c31d37f59cdbfb8631c
|
|
| BLAKE2b-256 |
b8b01e9f339c2e13f015e9c6dae06fd1a739bdd39cd4cfe193660da88916ac4a
|
File details
Details for the file crackers-0.6.0-cp311-cp311-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: crackers-0.6.0-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e259b1cade1253243aadffdf1cc9a72dff12b49e95918a1a242fafc1dbb009c9
|
|
| MD5 |
182b780583b906ca3185720a0cee1d36
|
|
| BLAKE2b-256 |
7ce18c857bfc90857a0ab5a286f0e9215c0563c18b6a051752b5afb9542cc59d
|
File details
Details for the file crackers-0.6.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: crackers-0.6.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5500581ce976e086c9806dfb0a6d006117052973c91aad78dda939b8091e0a07
|
|
| MD5 |
50730f0a8207d76d755f0df0a71f549d
|
|
| BLAKE2b-256 |
34955bce76b76bb406c9828307a1a21f8623dc7a2d61b1b3526d490478522348
|
File details
Details for the file crackers-0.6.0-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: crackers-0.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d1e1adace85cc3da35d1cd8cbcff1e125dc2131fff945e3e2d9a21058f81f4f
|
|
| MD5 |
b8cfbb8a196a613aff4cd1b661fddd74
|
|
| BLAKE2b-256 |
16360aef08b3e4788a5de14a60a618e600ab6e287e7a85714ddd48dafcda001c
|
File details
Details for the file crackers-0.6.0-cp310-cp310-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: crackers-0.6.0-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
416e39393dd8ccac60b3a73bf71ff3b2701d276a9474481173b57ba5949149c7
|
|
| MD5 |
93f39e250413cc02b89136144ebfe37d
|
|
| BLAKE2b-256 |
c919c6bb264d0d55184c404fdd7cbef1b8828affdfedd628dd809b67e47c4656
|