autoit
Extract and inspect compiled AutoIt payloads from AutoIt2Exe executables,
.a3x files, and carved payload streams.
This crate is focused on information recovery, not behavioral interpretation. It should expose the facts present in the compiled payload: container details, encoding family, resource records, script bytes, decoded source text, token streams, timestamps, checksums, and embedded FileInstall artifacts.
Quick start
use ;
let data = read?;
let binary = match try_parse ;
println!;
println!;
println!;
println!;
for record in binary.records
for diagnostic in binary.record_diagnostics
for script in binary.scripts
for artifact in binary.artifacts
for found in binary.strings
# Ok::
Scope
Extraction surfaces:
- PE,
.a3x, and raw stream recognition - EA04, EA05, EA06, and JB01 (AutoHotkey-classic / AutoIt v2-era) payload records
- encrypted/decrypted/decompressed record metadata
- container summaries for signatures, version markers, stream offsets, and PE
SCRIPTresource type/name/language facts - record extraction profiles for encoding, encryption, and compression wrapper
- record parse diagnostics when later malformed data stops extraction after earlier records were recovered
- script recovery and EA06 detokenization
- token streams for functions, keywords, macros, variables, literals, and operators
- checked token table data under
data/token/with tests that keep parser lookup tables aligned - FileInstall and other embedded artifact bytes
- offsets, RVAs, timestamps, checksums, and validation diagnostics
Non-goals:
- executing AutoIt code
- emulating expressions or reconstructing runtime values
- labeling behavior as malicious, suspicious, network, persistence, or process execution
- hiding raw bytes behind normalized decoded views
Example tool
Observations and recovery
AutoItBinary::observations() exposes concrete observations such as PE resource
discovery, raw AutoIt signatures, version markers, decrypted FILE markers, and
known script subtypes. These are facts observed during extraction, not behavior
labels.
The high-level parser keeps partial recovery results. If a later record is
truncated or malformed, earlier records, scripts, artifacts, and strings remain
available, and record_diagnostics() reports the failing record index, offset,
and reason.
Common limitations
Packed or protected PE stubs may need external unpacking before their AutoIt payload is statically visible. Detokenized EA06 output is source-like reconstruction, not a promise of byte-for-byte original source text. Unsupported legacy encodings are reported explicitly instead of guessed.
Minimum Rust version
1.88 (edition 2024)
License
Copyright 2026 ATRAPS LLC. Licensed under the Apache License,
Version 2.0. See LICENSE and NOTICE.