Skip to main content

Deal with bad characters easily during exploit writing with badchars.

Project description

badbyte

logo

Deal with bad characters easily during exploit writing with badchars.

Table of Contents

  1. Installation
  2. Usage
  3. Programatically use

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"

cyclegenerate

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

cyclesearch

Generate payload to check all characters

badbyte g --bad "3d 26 25 0d" --pre START --post STOP

generate-payloag

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:

dump-copy

remember to skip addresses and ascii representation. I use vim and column select or visual studio code and alt+shift select.

select-hexdump

Fire badbyte to analyze output:

badbyte p -c --pre START --post STOP

analyze

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

badbyte-0.1.4.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

badbyte-0.1.4-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file badbyte-0.1.4.tar.gz.

File metadata

  • Download URL: badbyte-0.1.4.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for badbyte-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3e02506ce6e6bc4be0a8803738e2f62d74cc6af3fb9e31df2177389af4255feb
MD5 ae522a7389bd0f4ae73ca5777bf2c743
BLAKE2b-256 ff4b9f9489380e2da09457d6f1ac8f68a7981b562e96f25025357165a1f58e37

See more details on using hashes here.

File details

Details for the file badbyte-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: badbyte-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for badbyte-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ba1c05d0ea22d1ed6960ba138948014696a3b7a3d96f2d6c4bf6a93899864c8a
MD5 f500c950ab35b36404f6d768d50a8f09
BLAKE2b-256 904641142e30699ba27a08a664273639a5b1eefb58df6a7f5b90a5006b56aecc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page