AutoIt-Ripper
What is this
This is a short python script that allows for extraction of "compiled" AutoIt scripts from PE executables.
References
This script is heavily based on 3 resources, definitely check them out if you want to dig a bit deeper into AutoIt stuff:
- http://files.planet-dl.org/Cw2k/MyAutToExe/index.html
- https://github.com/sujuhu/autoit
- https://github.com/Cisco-Talos/clamav-devel/blob/31824a659dff37ae03e3419395bb68e659c2b165/libclamav/autoit.c
Supported AutoIt versions
Ready:
EA05AutoIt3.00EA06AutoIt3.26JB01AutoHotKey v1
Unknown:
JB01AutoIT2
Installation
python3 -m pip install autoit-ripper
or, if you'd like to install the version from sources:
git clone https://github.com/nazywam/AutoIt-Ripper.git
cd AutoIt-Ripper
pip install .
Running
From a python script:
from autoit_ripper import extract, AutoItVersion
with open("sample.exe", "rb") as f:
file_content = f.read()
# EA05 for v3.00+, EA06 for v3.26+
# Omitting `version` or passing None will try both versions
content_list = extract(data=file_content, version=AutoItVersion.EA06)
From the commandline:
autoit-ripper sample.exe out_directory
Help message:
autoit-ripper --help
usage: autoit-ripper [-h] [--verbose] [--ea {EA05,EA06,guess}] file output_dir
positional arguments:
file input binary
output_dir output directory
optional arguments:
-h, --help show this help message and exit
--verbose, -v
--ea {EA05,EA06,JB01,guess}
extract a specific version of AutoIt script (default: guess)
Format documentation
(In progress)
AU3 header
| Field | Length | encryption (EA05) | encryption (EA06) | Notes |
|---|---|---|---|---|
| "FILE" | 4 | MT(0x16FA) | LAME(0x18EE) | static string |
| flag | 4 | xor(0x29BC) | xor(0xADBC) | |
| auto_str | flag (* 2) | MT(0xA25E + flag) | LAME(0xB33F + flag) | UTF-8/UTF-16 |
| path_len | 4 | xor(0x29AC) | xor(0xF820) | |
| path | path_len (* 2) | MT(0xF25E + path_len) | LAME(0xF479 + path_len) | Path of the compiled script |
| compressed | 1 | None | None | is the script compressed |
| data_size | 4 | xor(0x45AA) | xor(0x87BC) | compressed data size |
| code_size | 4 | xor(0x45AA) | xor(0x87BC) | uncompressed data size |
| crc | 4 | xor(0xC3D2) | xor(0xA685) | compressed data crc checksum |
| creation date | 4 | None | None | file creation date (high) |
| creation date | 4 | None | None | file creation date (low) |
| last update date | 4 | None | None | last edit date (high) |
| last update date | 4 | None | None | last edit date (low) |
| data | data_size | MT(checksum + 0x22af) | LAME(0x2477) | script data |
Differences between v3.00 and v3.26+
| v3.00 | v3.26 | |
|---|---|---|
| Code storage | greped by magic | "SCRIPT" resource (/greped by magic?) |
| String encoding | UTF-8 | UTF-16 |
| Encryption | xor/custom MT19937 | xor/LAME crypt |
| Code encryption key | dynamic | static |
| Compression | yes | yes |
| Code "compilation" | no | yes |
| Magic | EA05 | EA06 |
Metadata
Release files for autoit-ripper 1.2.0
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 |
|---|---|---|---|---|
| autoit_ripper-1.2.0.tar.gz | 17.4 kB | Without provenance | Details for autoit_ripper-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autoit_ripper-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for autoit_ripper-1.2.0-py3-none-any.whl |
Total release size: 35.3 kB
Release files / autoit_ripper-1.2.0.tar.gz
| Download URL | autoit_ripper-1.2.0.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20e9c38820db143a4f976e2a165a04304fdbd2a1cf1ab26079fde40bad70a479
|
|
BLAKE2b-256 checksum How to use checksums |
fdab2da52a8ff422a6bc3c6538b45889f6c207a60c7737cc4ab1bb5fdadc02fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / autoit_ripper-1.2.0-py3-none-any.whl
| Download URL | autoit_ripper-1.2.0-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e43fddb7d8eb2e985dffb7952bd1102b77d85a9a4467c1821ecefd8f416b45ce
|
|
BLAKE2b-256 checksum How to use checksums |
65801c6111b41b00fb2bebb874c723c7aefae35b579aef42097dc62e54df9c9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for autoit-ripper 1.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.