Skip to content
Karak Studio icon

Desktop · Windows

Karak Studio

How triage works

triage::build runs once when a file is opened.

  • Hashes. MD5 and SHA-256 are computed over the file as it is on disk.
  • Abilities. A table of rules maps function names to abilities. A name matches a rule exactly, or with the endings A, W, Ex, ExA or ExW. A rule ending in * matches any name starting that way. “Captures the screen” needs BitBlt or PrintWindow, since the other functions in that group are too common alone.
  • Text worth a look. classify tests each piece of text against the kinds in order: web address, command, registry key, IP address, file or folder, email address, keyword. Imported DLL and function names are skipped. Up to 600 are kept.
  • Stack-built text. Each function is scanned for runs of mov [stack], value, where the value is a number or a register just loaded with a number. The stored bytes are sorted by position, joined where they touch, and searched for readable text of five or more characters with some variety.
  • XOR-scrambled text. XOR with one fixed value does not change the difference between neighbouring bytes. So for each known word, the list of differences between its letters is searched for in the data. A match reveals the value, and the text around it is decoded up to the nearest zero byte or unprintable character. Values 0x00 (not hidden) and 0x20 (only swaps upper and lower case) are ignored.