awesome-kaitai icon indicating copy to clipboard operation
awesome-kaitai copied to clipboard

A curated list of Kaitai Struct tools and resources

Awesome Kaitai Link Status

A curated list of Kaitai Struct tools and resources

Compiler

  • Kaitai Struct: compiler to translate .ksy => .cpp / .cs / .dot / .java / .js / .php / .pm / .py / .rb (Repository, Releases)
  • kaitaigo: alternative compiler to translate .ksy => .go, written in Golang
  • nimitai: The compiler implemented as macro in Nimlang (.ksy => Nim AST)

Visualizers, IDEs, hex editors

Arbitrary file formats

These tools allow to develop your own Kaitai Struct specifications in iterative fashion by visualizing data locations in hex dump as one develops .ksy.

Fixed set of file formats

These visualizers / hex editors allow only fixed set of precompiled file format specifications to be used.

Tools

  • kaitaiStructCompile.py - Automate ksy compilation into python files (Repository)
  • ksylint - A linter for .ksy files
  • ksy-dl - Downloads .ksy files and their dependencies straight from the official kaitai-struct format gallery.

CI

Docker images

Converter

  • Convert C to ksy file (Snippet)
  • Convert Synalyze It! Grammars to ksy files (Repository)
  • Converting Kaitai structs to wireshark LUA plugins (Repository) - deprecated

Formats

Help, Documentation & Community

Runtimes

Testing

Misc

  • KaitaiFS: mount any filesystem specified with a .ksy as a real file system (Repository, Issues)
  • Compression processing libraries (Repository)

Other Resources

  • https://kaitai.io/workshop/
  • https://avatao.com/blog-kaitai/
  • https://archive.fosdem.org/2017/schedule/event/om_kaitai/ - Presentation on Kaitai from Mikhail Yakshin (GreyCat)
  • https://vaughanhilts.me/blog/2016/11/16/reverse-engineering-trails-in-the-sky-ed-6-game-engine.html - Blog post on game reverse engineering
  • https://pythonistac.wordpress.com/2017/03/09/python-network-packet-dissection-frameworks-shootout-scapy-vs-construct-vs-hachoir-vs-kaitai-struct/ - Blog post comparing different network packet dissection frameworks
  • https://medium.com/@MorteNoir/database-reverse-engineering-part-2-main-approaches-ae9355b2d429 - A blog post about reverse-engineering unknown file formats with a proprietary car parts database as an example.

Similar projects / tools

  • 3D Model Researcher - Studying binary files of 3D models
  • BeeSchema - Binary Schema Library for C#
  • bindata - Binary data parsing for Ruby
  • construct - Python library to create declarative parsers
  • dtfabric
  • vstruct2 - Python structure definition and parsing library
  • https://github.com/0xdabbad00/icebuddha
  • https://github.com/fox-it/dissect.cstruct
  • https://github.com/frodef/binary-types - Read and write binary records for Common Lisp
  • https://github.com/j3pic/lisp-binary - A library to easily read and write complex binary formats (Common Lisp)
  • https://github.com/padsproj/pads
  • https://github.com/renyxa/re-lab/tree/master/oletoy

Hex Editors

File Grammars