Decryptor for files containing Donut shellcode
Project description
donut_decryptor
A configuration and module extractor for the donut binary obfuscator
Description
donut-decryptor checks file(s) for known signatures of the donut obfuscator's loader shellcode. If located, it will parse the shellcode to locate, decrypt, and extract the DONUT_INSTANCE structure embedded in the binary, and report pertinent configuration data. If a DONUT_MODULE is present in the binary it is decrypted and dumped to disk.
Installation
You can install donut-decryptor for usage by navigating to the root directory of the project and using pip:
cd /path/to/donut-decryptor
python -m pip install .
Following installation, a command-line script is available. For usage instructions use:
donut-decryptor --help
Development
This project uses Hatch for project management, Ruff for linting and formatting, and mypy for type checking.
Setup
Install Hatch:
pip install hatch
Running Tests
hatch run test
hatch run test-cov # with coverage
Linting and Formatting
hatch run lint:style # check style
hatch run lint:fmt # format code and fix issues
hatch run lint:typing # run mypy type checking
hatch run lint:all # run all checks
Examples
The files present in the samples directory are 7z files password protected using the password `infected``, all of which contain donuts which can be decoded using this script.
TODO list
- Update detection rules and instance parsing for alternative output formats:
- Hex
- C-String/Ruby
- Python
- C#
- Powershell
- Consider moving loader/instance mapping to a YAML configuration file.
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 donut_decryptor-0.1.1.tar.gz.
File metadata
- Download URL: donut_decryptor-0.1.1.tar.gz
- Upload date:
- Size: 30.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e2cfa26febbba5a0460a148844ebcc26329b1d7dbf3d360e4261e958396500f
|
|
| MD5 |
02eda9914ffcbf244c46de6d5718933e
|
|
| BLAKE2b-256 |
95c105122a5e5e877133999aa041224317628284eef19abe45cbb0a399329f7e
|
Provenance
The following attestation bundles were made for donut_decryptor-0.1.1.tar.gz:
Publisher:
publish.yml on volexity/donut-decryptor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
donut_decryptor-0.1.1.tar.gz -
Subject digest:
5e2cfa26febbba5a0460a148844ebcc26329b1d7dbf3d360e4261e958396500f - Sigstore transparency entry: 1091468179
- Sigstore integration time:
-
Permalink:
volexity/donut-decryptor@4b2120aa9f6290051971e3b7fa520dfdef7e34c9 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/volexity
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b2120aa9f6290051971e3b7fa520dfdef7e34c9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file donut_decryptor-0.1.1-py3-none-any.whl.
File metadata
- Download URL: donut_decryptor-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3539ee7e6206b047ac91ed16f4eb35e9147b79a08f41a9d3a3d20c716a7fd85c
|
|
| MD5 |
668fa3778e01f088c56a9a82b3884365
|
|
| BLAKE2b-256 |
fe190c56c4fe302f55f7091950896560b77b4d460070c85dd220538a464c42ad
|
Provenance
The following attestation bundles were made for donut_decryptor-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on volexity/donut-decryptor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
donut_decryptor-0.1.1-py3-none-any.whl -
Subject digest:
3539ee7e6206b047ac91ed16f4eb35e9147b79a08f41a9d3a3d20c716a7fd85c - Sigstore transparency entry: 1091468196
- Sigstore integration time:
-
Permalink:
volexity/donut-decryptor@4b2120aa9f6290051971e3b7fa520dfdef7e34c9 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/volexity
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4b2120aa9f6290051971e3b7fa520dfdef7e34c9 -
Trigger Event:
push
-
Statement type: