Kraken

Kraken collects forensic data from a running Windows system: volatile data such as network connections and processes first, then persistent traces such as auto-start entries, execution artifacts, event logs and the USN journal. It runs as a single executable without installation and saves the results as an SQLite database or as JSON, for analysis in your own tools.

Highlights

Requirements and editions

EditionFileUse
Consolecysirt.kraken.console.exeCommand line, scripts, remote shells
UIcysirt.kraken.ui.exeConfiguring and running a collection with an user interface

Console edition

Usage

Examples

Everything as database for the analysis and as JSON file for the archive, compressed, with a log file:

.\cysirt.kraken.console.exe collect --all --output-directory [drive]:\[directory] --output-format sqlite json compressed --log-file [drive]:\[directory]\kraken.log
A quick first look at the volatile data:

.\cysirt.kraken.console.exe collect --tcp-connection --udp-connection --process --dns-cache --output-directory [drive]:\[directory] --output-format sqlite
Everything, but only the last 7 days of events and file changes, without the file data of the changed files:

.\cysirt.kraken.console.exe collect --all --event-log days=7 --usn-journal no-file-object days=7 --output-directory [drive]:\[directory] --output-format sqlite
On a busy server, with the lowest process priority, one JSON file per data set:

.\cysirt.kraken.console.exe collect --all --process-priority idle --output-directory \\[fileserver]\[directory] --output-format json-split

Data sets

In the order of the collection. Administrator rights shows what is missing without them. --all collects all data sets. Information about the collection itself is always saved.

Data set Content Administrator rights
TCP connections
--tcp-connection
TCP connections with their processes For the processes of the system
UDP endpoints
--udp-connection
UDP endpoints with their processes For the processes of the system
Processes
--process
Running processes and their loaded modules For the processes of the system
DNS cache
--dns-cache
Recently resolved host names of the DNS client Required
Services
--service
Windows services, their executables and service DLLs For the service processes
Drivers
--driver
Kernel drivers and their files Not required
User accounts
--user-account
Local user accounts and their groups Not required
Auto-start entries
--auto-start
Run keys, Winlogon, startup folders, scheduled tasks, WMI subscriptions and further auto-start locations Not required
Application Compatibility Cache
--application-compatibility-cache
ShimCache entries of programs Not required
AmCache
--am-cache
Installed and executed programs Required
Prefetch --prefetch Program runs and the files the programs loaded Required
Browser history
--browser-history
Visited URLs, visits and downloads of Chrome, Edge, Brave, Vivaldi, Opera and Firefox for all user profiles For the profiles of other users
Event log
--event-log
Forensically relevant events of the live and archived event logs, including all Sysmon events and high volume events such as firewall connections and object access, with the period each log covers and the logging configuration (audit policy, PowerShell logging, Sysmon) For the Security and Sysmon event logs
USN journal
--usn-journal
File listing of the NTFS volumes and the change records of their journals Required

Arguments of data sets

Without arguments, Kraken collects the whole available period, with the file data of all referenced files.

Argument Data sets Effect
no-file-object All data sets with file references Without the file data (hashes, signature) of the referenced files; their paths stay. Faster, smaller output.
days=<days> Prefetch, browser history, event log, USN journal Only the last number of days, from 1 to 36500. Prefetch: files with a run in the period. USN journal: only the changes, the file listing stays complete.
include-message Event log Adds the message text of the events, in the language of the system.
resolve-hosts TCP connections, UDP endpoints Resolves the host names of the addresses by reverse DNS lookups. This causes network traffic, and the operator of the DNS server responsible for an address may notice the lookup.

Further options

Option Effect
--output-directory <folder> Output folder, created if it doesn’t exist. Required.
--output-format <formats> Output formats, several at once: sqlite, json or json-split (not both JSON formats together), and compressed to zip the files. Required.
--data <data> include-portable-executable-function-export and include-portable-executable-function-import add the exported and imported functions to the data of all collected executables and DLLs. This makes the output considerably larger.
--log-level <levels> Log levels to show: information, warning, error, notice, section, debug. Default: all except debug.
--log-file <file> Writes the log to a file as well; entries are added to an existing file.
--process-priority <priority> idle, normal (default) or high. Idle keeps the system responsive, high finishes sooner.
--no-progress Hides the status line below the log (spinner, current data set, elapsed time).

Exit codes

Meaning
0 All data sets were collected.
1 Invalid command line or fatal error, nothing was collected.
2 At least one data set failed or returned no data. The log names the reason.
3 Cancelled with Ctrl+C. The output and the log file of the run are removed.

UI edition

Usage

Output

Kraken saves the data in the formats you choose with --output-format, several at once. All formats contain the same data, with the same names and values.
Format Files Use
sqlite kraken.sqlite All data sets in one SQLite database, for queries and analysis tools
json kraken.json All data sets in one JSON file, each data set under its name
json-split meta.json, process.json, … One JSON file per data set, named after the data set
compressed kraken.sqlite.zip, kraken.json.zip, process.json.zip, … Each file of the chosen formats in its own ZIP file
[Drive]:\[Directory]
├── kraken.sqlite
├── kraken.json
└── kraken.log

SQLite database

An example: modules without a valid signature in processes with network connections.

SELECT DISTINCT p.name, f.fileName, f.authenticode_state
FROM tcp_connection t
JOIN process p ON p.id = t.process_id
JOIN process_modules m ON m._parentId = p._id
JOIN file_object f ON f._id = m.fileObject
WHERE f.authenticode_state <> 'Valid';

Data

Tips for practice