TLDR InfoSec · STRATEGIES & TACTICS
DECLARATIVE BINARY PARSING FOR SECURITY RESEARCH WITH KAITAI STRUCT
Summary from the TLDR InfoSec newsletter
Kaitai Struct enables describing binary file formats in a declarative YAML-based language and automatically generating parsers in many languages, which is very useful for reverse engineering, malware analysis, and protocol or firmware research. This example walks through designing a dummy KAISTDE binary format, manually serializing and parsing it in C and Python, then expressing the same structure in a .ksy spec so the Kaitai compiler can emit a robust parser and visualizations.