Deal with bad characters easily during exploit writing with badchars.
Project description
badbyte
Deal with bad characters easily during exploit writing with badchars.
Table of Contents
↑Instalation
using pip:
pip3 install badbyte
or from repo:
git clone git@github.com:C3l1n/badbyte.git
cd badbyte
pip3 install .
↑Usage
You can always use:
badbyte --help
↑Cyclic pattern generate
It is useful to search for offset at which you should put your sniper shot constants. For example return address: you generate pattern with this function, trigger vulnerability with generated payload. EIP value (remember about little ending in x86) has uniq part of pattern and offset of that part could be calculated with badbyte parse (see next chapter).
badbyte c -u 4 -l 100 --bad "61 62"
↑Search for offset in cyclic pattern
Search for offset of provided part in --pattern argument.
badbyte o -u 4 -l 100 --bad "61 62" -p cocc
↑Generate payload to check all characters
badbyte g --bad "3d 26 25 0d" --pre START --post STOP
use:
- --bad to supply hexascii values of bad characters
- --pre to set string for marking start point (or leave default)
- --post to set string for marking stop point (or leave default)
Then use payload in your exploit and fire it.
↑Analyze memory dumped after trigger
Copy hexascii from memory dump of your favourite debugger i.e. windbg:
remember to skip addresses and ascii representation. I use vim and column select or visual studio code and alt+shift select.
Fire badbyte to analyze output:
badbyte p -c --pre START --post STOP
↑Programatically use
Documentation not made (feel free to read code) but you can find in example/programatically_generate_payload.py example of payload generation in exploit.
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 Distribution
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 badbyte-0.1.11.tar.gz.
File metadata
- Download URL: badbyte-0.1.11.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f5ead494cd0b77bdeff92a48bb489031c1c0daf40c877727e06b1daef9d7203
|
|
| MD5 |
5369719465df3bf063e49878739e06db
|
|
| BLAKE2b-256 |
e8000bf07ac5ddea3116755bd8341d0ad54e88d157fa60293aa83a469ffd43c9
|
Provenance
The following attestation bundles were made for badbyte-0.1.11.tar.gz:
Publisher:
python-publish.yml on C3l1n/badbyte
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
badbyte-0.1.11.tar.gz -
Subject digest:
2f5ead494cd0b77bdeff92a48bb489031c1c0daf40c877727e06b1daef9d7203 - Sigstore transparency entry: 149188342
- Sigstore integration time:
-
Permalink:
C3l1n/badbyte@942c91c389aa29e7d0c9bdcba5bd013b516585ac -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/C3l1n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@942c91c389aa29e7d0c9bdcba5bd013b516585ac -
Trigger Event:
create
-
Statement type:
File details
Details for the file badbyte-0.1.11-py3-none-any.whl.
File metadata
- Download URL: badbyte-0.1.11-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c64de5cfb22e3c73585ea0c982504ecc5f21e126a67f4130cde5939fcb835d8e
|
|
| MD5 |
c681eee9495b03b5e1667a5427a6023f
|
|
| BLAKE2b-256 |
abc67a4e80d42d45c4b048f8b6bd643296248723d2b6d64f9d078376de9e30ff
|
Provenance
The following attestation bundles were made for badbyte-0.1.11-py3-none-any.whl:
Publisher:
python-publish.yml on C3l1n/badbyte
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
badbyte-0.1.11-py3-none-any.whl -
Subject digest:
c64de5cfb22e3c73585ea0c982504ecc5f21e126a67f4130cde5939fcb835d8e - Sigstore transparency entry: 149188343
- Sigstore integration time:
-
Permalink:
C3l1n/badbyte@942c91c389aa29e7d0c9bdcba5bd013b516585ac -
Branch / Tag:
refs/tags/v0.1.11 - Owner: https://github.com/C3l1n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@942c91c389aa29e7d0c9bdcba5bd013b516585ac -
Trigger Event:
create
-
Statement type: