Skip to content

Registry hives

Parse offline Windows Registry hive files into SQL rows for forensics, with transaction-log replay and deleted-key recovery

Connector software
Free and open source
Service credentials
Not needed
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/reghive/index.md to help me query Registry hives with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Scan a collected hive and pull the Run-key persistence value it plants.

Example output · captured
Connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
SELECT key_path, value_name, value_data
FROM reghive.main.read_hive(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB)
WHERE value_name = 'Updater'
Result
key_path value_name value_data
Software\Microsoft\Windows\CurrentVersion\Run Updater C:\Windows\evil.exe

Quick start

Choose where to run Registry hives, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach the release directly

Downloads the latest release for your platform and caches it locally.

ATTACH 'reghive' AS reghive (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-reghive'
);

3. Run a query

query.sql
SELECT key_path, value_name, value_data
FROM reghive.main.read_hive(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB)
WHERE value_name = 'Updater'
More example queries →
Technical details
Verified connector release
v0.5.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach the release directly

Uses the verified release each time you attach the connector.

ATTACH 'reghive' AS reghive (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/[email protected]'
);

Overview

Parse Windows Registry hive files (regf) into typed key/value rows for DFIR — transaction-log replay and deleted-cell recovery.

Catalog

Everything reghive exposes once attached — read straight from the worker's released build.

reghive 1 schema
main 1 view · 8 functions

Registry-hive parsing functions for DFIR triage: bulk directory scans, scoped subtree and single key/value lookups, header and validity probes, and transaction-log replay reporting.

Schema examples (3)
Examples (3)

Scan a collected hive and pull the Run-key persistence value it plants.

SELECT key_path, value_name, value_data
FROM reghive.main.read_hive(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB)
WHERE value_name = 'Updater';
Result
key_path value_name value_data
Software\Microsoft\Windows\CurrentVersion\Run Updater C:\Windows\evil.exe

Browse the well-known persistence keys to triage first, with their ATT&CK technique.

SELECT key_path, mitre_technique
FROM reghive.main.forensic_keys
WHERE category = 'Persistence'
ORDER BY key_path;

Join a hive scan to the forensic_keys reference to label every live value sitting under a well-known forensic key with its ATT&CK technique (here: the five Run-key values, T1547.001).

SELECT f.mitre_technique, r.key_path, r.value_name, r.value_type,
  r.value_data
FROM reghive.main.read_hive(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB) AS r
JOIN reghive.main.forensic_keys AS f ON r.key_path = f.key_path
WHERE NOT r.is_deleted
ORDER BY r.value_name;
Views
forensic_keys 3 examples5 cols

Curated reference of well-known Windows Registry forensic locations (persistence, execution, configuration) with their hive, category, description, and MITRE ATT&CK technique; key_path matches the form read_hive/hive_subtree use.

Columns
key_path VARCHAR
Root-stripped registry key path, exactly the form read_hive/hive_subtree emit and accept (backslash-separated, no synthetic HKLM mount).
hive VARCHAR
The hive file this key lives in: SOFTWARE / SYSTEM / NTUSER / SAM / SECURITY / AMCACHE / USRCLASS.
category VARCHAR
Triage category: Persistence, Execution, or Configuration.
description VARCHAR
Why this key matters in a DFIR investigation and what it holds.
mitre_technique VARCHAR
MITRE ATT&CK technique id this location maps to (e.g. T1547.001), or NULL when the key is purely informational.
Examples (3)

List the persistence-related registry keys to triage first, with their ATT&CK technique.

SELECT key_path, description, mitre_technique
FROM reghive.main.forensic_keys
WHERE category = 'Persistence'
ORDER BY key_path;

Count the well-known forensic keys grouped by triage category.

SELECT category, count(*) AS n
FROM reghive.main.forensic_keys
GROUP BY category
ORDER BY n DESC, category;

Join a hive scan to the forensic_keys reference to label every live value sitting under a well-known forensic key with its ATT&CK technique (here: the five Run-key values, T1547.001).

SELECT f.mitre_technique, r.key_path, r.value_name, r.value_type,
  r.value_data
FROM reghive.main.read_hive(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB) AS r
JOIN reghive.main.forensic_keys AS f ON r.key_path = f.key_path
WHERE NOT r.is_deleted
ORDER BY r.value_name;
Link
Scalar functions
hive_info (blob BLOB) 2 examples

Summarize a hive's base block: type, version, sequence numbers, dirty flag, and last-written time

Arguments
blob BLOB
The raw contents of a registry hive file, e.g. from read_blob('NTUSER.DAT'). NULL or a non-hive input yields a NULL struct.
ReturnsSTRUCT of 8 fields
STRUCT 8 fields
  • hive_typeVARCHAR
  • majorUSMALLINT
  • minorUSMALLINT
  • root_pathVARCHAR
  • primary_seqUINTEGER
  • secondary_seqUINTEGER
  • is_dirtyBOOLEAN
  • last_writtenTIMESTAMP WITH TIME ZONE
Examples (2)

Probe a hive's base-block summary (returns NULL on a non-hive blob).

SELECT reghive.main.hive_info('\x72656766'::BLOB);

Header triage in one pass: validate a hive with well_formed, then read its type and dirty flag from hive_info to decide whether it needs transaction-log replay (the demo SOFTWARE hive is valid and clean).

WITH h AS (SELECT unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB AS b) SELECT (reghive.main.well_formed(b)).ok AS ok, (reghive.main.well_formed(b)).kind AS kind, (reghive.main.hive_info(b)).hive_type AS hive_type, (reghive.main.hive_info(b)).is_dirty AS needs_log_replay
FROM h
ORDER BY hive_type;
Link
hive_key (blob BLOB, key_path VARCHAR) 1 example

Return one registry key as a struct with its values inlined

Arguments
blob BLOB
The raw contents of a registry hive file, e.g. from read_blob('NTUSER.DAT').
key_path VARCHAR
The key path from the hive root (root name omitted), e.g. 'ControlSet001\Services\Schedule'.
ReturnsSTRUCT of 7 fields
STRUCT 7 fields
  • key_pathVARCHAR
  • last_writeTIMESTAMP WITH TIME ZONE
  • class_nameVARCHAR
  • subkey_countUINTEGER
  • value_countUINTEGER
  • is_deletedBOOLEAN
  • valuesSTRUCT[]
    STRUCT[] 4 fields
    • value_nameVARCHAR
    • value_typeVARCHAR
    • value_dataVARCHAR
    • value_rawBLOB
Example

Look up a key as a struct (NULL struct for a non-hive blob).

SELECT reghive.main.hive_key('regf'::BLOB, 'ControlSet001\Services');
Link
hive_value (blob BLOB, key_path VARCHAR, value_name VARCHAR) 1 example

Return a single named registry value as a struct (value_type, value_data, value_raw)

Arguments
blob BLOB
The raw contents of a registry hive file, e.g. from read_blob('NTUSER.DAT').
key_path VARCHAR
The key path from the hive root (root name omitted).
value_name VARCHAR
The value name to read; an empty string or NULL selects the key's (Default) value.
ReturnsSTRUCT of 3 fields
STRUCT 3 fields
  • value_typeVARCHAR
  • value_dataVARCHAR
  • value_rawBLOB
Example

Read one named value (NULL struct for a non-hive blob).

SELECT reghive.main.hive_value('regf'::BLOB, 'Software', 'Run');
Link
key_info (blob BLOB, key_path VARCHAR) 2 examples

Return a key's metadata (last_write, subkey_count, value_count, class_name, is_deleted) without materializing its values

Arguments
blob BLOB
The raw contents of a registry hive file, e.g. from read_blob('NTUSER.DAT').
key_path VARCHAR
The key path from the hive root (backslash-separated, root name omitted), e.g. 'Software\Microsoft\Windows'.
ReturnsSTRUCT of 5 fields
STRUCT 5 fields
  • last_writeTIMESTAMP WITH TIME ZONE
  • subkey_countUINTEGER
  • value_countUINTEGER
  • class_nameVARCHAR
  • is_deletedBOOLEAN
Examples (2)

Cheap key-metadata pivot (NULL struct for a non-hive blob).

SELECT reghive.main.key_info('regf'::BLOB, 'Software\Microsoft');

Coverage check: probe every SOFTWARE-hive key from the forensic_keys reference with key_info, reporting which ones the hive contains plus their value count and last-write time (only the Run key is present here).

SELECT k.key_path, k.info IS NOT NULL AS present,
  k.info.value_count AS value_count, k.info.last_write AS last_write
FROM (SELECT f.key_path, reghive.main.key_info(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB, f.key_path) AS info FROM reghive.main.forensic_keys AS f WHERE f.hive = 'SOFTWARE') AS k
ORDER BY k.key_path;
Link
logs_applied (blob BLOB, log1 BLOB, log2 BLOB) 1 example

Report a transaction-log replay against supplied .LOG1/.LOG2 blobs: applied, entries_replayed, dirty_pages, became_clean, log_format

Arguments
blob BLOB
The dirty primary hive contents, captured before transaction-log replay.
log1 BLOB
The first transaction log (.LOG1) bytes, or NULL if not available.
log2 BLOB
The second transaction log (.LOG2) bytes, or NULL if not available.
ReturnsSTRUCT of 5 fields
STRUCT 5 fields
  • appliedBOOLEAN
  • entries_replayedUINTEGER
  • dirty_pagesUINTEGER
  • became_cleanBOOLEAN
  • log_formatVARCHAR
Example

Inspect a transaction-log replay (NULL struct for a non-hive blob).

SELECT reghive.main.logs_applied('regf'::BLOB, NULL, NULL);
Link
well_formed (blob BLOB) 2 examples

Validate a BLOB as a primary regf hive; never panics on hostile input

Arguments
blob BLOB
The candidate hive contents to validate, e.g. from read_blob('SYSTEM'). NULL yields a NULL struct; any non-hive bytes yield ok=false with a kind tag rather than an error.
ReturnsSTRUCT of 4 fields
STRUCT 4 fields
  • okBOOLEAN
  • hive_typeVARCHAR
  • errorVARCHAR
  • kindVARCHAR
Examples (2)

Validate a blob as a regf hive (ok=false for non-hives).

SELECT reghive.main.well_formed('not a hive'::BLOB);
SELECT (reghive.main.well_formed('not a hive'::BLOB)).ok AS ok,
  (reghive.main.well_formed('not a hive'::BLOB)).kind AS kind;
Link
Table functions
hive_subtree (blob BLOB, key_path VARCHAR, apply_logs := BOOLEAN, recover_deleted := BOOLEAN) 1 example

Read one subtree of a hive BLOB (rooted at key_path) into typed rows

Positional arguments
blob BLOB
The raw contents of a registry hive file, e.g. from read_blob('SYSTEM').
key_path VARCHAR
The subtree root path from the hive root (root name omitted), e.g. 'Root\InventoryApplicationFile' or 'ControlSet001\Services'.
Named arguments
apply_logs := BOOLEAN
Replay sibling transaction logs before emitting rows (default true).
recover_deleted := BOOLEAN
Reconstruct keys/values from unallocated cells; recovered rows are flagged is_deleted (default true).
Returns columns
key_path VARCHAR
Full path from the hive root (backslash-separated; the synthetic root key name is stripped). Deleted orphans use a $Deleted\… prefix.
value_name VARCHAR
Value name; NULL for the key's (Default) value and for key-only rows.
value_type VARCHAR
REG_* type name (REG_SZ / REG_DWORD / REG_MULTI_SZ / REG_BINARY / …), or REG_<n> for an unrecognized code. NULL on key-only rows.
value_data VARCHAR
Typed/coerced rendering: UTF-16 for strings, ints stringified, MULTI_SZ newline-joined, binary as lowercase hex. Lossy for binary — see value_raw.
value_raw BLOB
Exact on-disk value bytes (lossless). The credential-bearing column for SAM/SECURITY hives — never decoded by the worker.
value_dword BIGINT
Populated for REG_DWORD / REG_QWORD (NULL otherwise) — saves a cast in the common integer case.
key_last_write TIMESTAMP WITH TIME ZONE
Parent key's last-write FILETIME as a UTC timestamp; repeated across that key's value rows. The primary registry-forensics time pivot.
is_deleted BOOLEAN
True when the row was reconstructed from unallocated space (deleted-cell recovery).
hive_type VARCHAR
Best-effort logical hive type: SYSTEM / SOFTWARE / NTUSER / SAM / SECURITY / USRCLASS / AMCACHE / UNKNOWN.
source VARCHAR
Originating file path (glob member) or '<blob>' for an in-memory hive.
recovery VARCHAR
NULL on a clean live cell; else dirty-no-logs, logs-applied, deleted-orphan, deleted-reparented, or modified-prior.
diagnostics VARCHAR
NULL on clean decode; else truncated, bad-checksum, bad-utf16, etc.
Example

Read just the Run persistence branch of a hive without materializing the whole tree.

SELECT key_path, value_name, value_data
FROM reghive.main.hive_subtree(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB, 'Software\Microsoft\Windows\CurrentVersion\Run')
ORDER BY value_name;
Link
read_hive (glob_or_blob ANY, apply_logs := BOOLEAN, recover_deleted := BOOLEAN, mode := VARCHAR) 2 examples

Read regf registry hives (glob or BLOB) into typed key/value rows

Positional arguments
glob_or_blob ANY
Either a local file glob (e.g. '/cases/*/NTUSER.DAT' — matching files are read in sorted order) or a single in-memory hive read with read_blob. For cloud hives (s3://, https://) fetch the bytes with read_blob(...) and pass those.
Named arguments
apply_logs := BOOLEAN
Replay sibling .LOG1/.LOG2 transaction logs to recover a dirty hive before emitting rows (default true). Set false to parse the primary file as-is.
recover_deleted := BOOLEAN
Reconstruct keys/values from unallocated cells; recovered rows are flagged is_deleted (default true).
mode := VARCHAR
Which rows to emit: 'values' (one row per value, default), 'keys' (one row per key), or 'all' (both).
Returns columns
key_path VARCHAR
Full path from the hive root (backslash-separated; the synthetic root key name is stripped). Deleted orphans use a $Deleted\… prefix.
value_name VARCHAR
Value name; NULL for the key's (Default) value and for key-only rows.
value_type VARCHAR
REG_* type name (REG_SZ / REG_DWORD / REG_MULTI_SZ / REG_BINARY / …), or REG_<n> for an unrecognized code. NULL on key-only rows.
value_data VARCHAR
Typed/coerced rendering: UTF-16 for strings, ints stringified, MULTI_SZ newline-joined, binary as lowercase hex. Lossy for binary — see value_raw.
value_raw BLOB
Exact on-disk value bytes (lossless). The credential-bearing column for SAM/SECURITY hives — never decoded by the worker.
value_dword BIGINT
Populated for REG_DWORD / REG_QWORD (NULL otherwise) — saves a cast in the common integer case.
key_last_write TIMESTAMP WITH TIME ZONE
Parent key's last-write FILETIME as a UTC timestamp; repeated across that key's value rows. The primary registry-forensics time pivot.
is_deleted BOOLEAN
True when the row was reconstructed from unallocated space (deleted-cell recovery).
hive_type VARCHAR
Best-effort logical hive type: SYSTEM / SOFTWARE / NTUSER / SAM / SECURITY / USRCLASS / AMCACHE / UNKNOWN.
source VARCHAR
Originating file path (glob member) or '<blob>' for an in-memory hive.
recovery VARCHAR
NULL on a clean live cell; else dirty-no-logs, logs-applied, deleted-orphan, deleted-reparented, or modified-prior.
diagnostics VARCHAR
NULL on clean decode; else truncated, bad-checksum, bad-utf16, etc.
Examples (2)

Scan a whole hive and pull the Run-key persistence value (Updater) it plants — the bread-and-butter triage query.

SELECT key_path, value_name, value_type, value_data
FROM reghive.main.read_hive(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB)
WHERE value_name = 'Updater';

Join a hive scan to the forensic_keys reference to label every live value sitting under a well-known forensic key with its ATT&CK technique (here: the five Run-key values, T1547.001).

SELECT f.mitre_technique, r.key_path, r.value_name, r.value_type,
  r.value_data
FROM reghive.main.read_hive(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB) AS r
JOIN reghive.main.forensic_keys AS f ON r.key_path = f.key_path
WHERE NOT r.is_deleted
ORDER BY r.value_name;
Link

Try these queries

Browse the well-known persistence keys to triage first, with their ATT&CK technique.

SELECT key_path, mitre_technique
FROM reghive.main.forensic_keys
WHERE category = 'Persistence'
ORDER BY key_path

Uses forensic_keys

Join a hive scan to the forensic_keys reference to label every live value sitting under a well-known forensic key with its ATT&CK technique (here: the five Run-key values, T1547.001).

SELECT f.mitre_technique, r.key_path, r.value_name, r.value_type,
  r.value_data
FROM reghive.main.read_hive(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB) AS r
JOIN reghive.main.forensic_keys AS f ON r.key_path = f.key_path
WHERE NOT r.is_deleted
ORDER BY r.value_name

Uses read_hiveforensic_keys

Read just the Run persistence branch of a hive without materializing the whole tree.

SELECT key_path, value_name, value_data
FROM reghive.main.hive_subtree(unhex('7265676601000000010000000000056936c0d501010000000300000000000000010000002000000000200000010000005c00530079007300740065006d0052006f006f0074005c00530079007300740065006d00330032005c0043006f006e006600690067005c0053004f00460054' || repeat('00', 397) || '1085c20e' || repeat('00', 3584) || '6862696e0000000000200000000000000000000000000000000000000000000090ffffff6e6b24000000056936c0d50100000000000000000100000000000000b0030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000001e000000434d492d437265617465486976652d7b534f4654574152452d475549447d0000a8ffffff6e6b20000000056936c0d50100000000200000000100000000000000a0030000ffffffff00000000ffffffffffffffffffffffff000000000000000000000000000000000000000008000000536f667477617265a0ffffff6e6b20000000056936c0d5010000000090000000010000000000000090030000ffffffff00000000ffffffffffffffffffffffff0000000000000000000000000000000000000000090000004d6963726f736f667400000000000000a8ffffff6e6b20000000056936c0d50100000000e8000000010000000000000080030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000700000057696e646f777300a0ffffff6e6b20000000056936c0d5010000000048010000010000000000000070030000ffffffff00000000ffffffffffffffffffffffff00000000000000000000000000000000000000000e00000043757272656e7456657273696f6e0000a8ffffff6e6b20000000056936c0d50100000000a0010000000000000000000000000000ffffffff0500000058030000ffffffffffffffff00000000000000000000000000000000000000000300000052756e0000000000d0ffffff43003a005c00570069006e0064006f00770073005c006500760069006c002e00650078006500000000000000e0ffffff766b0700280000005802000001000000010000005570646174657200e0ffffff766b0500040000800200000004000000010000005374617274000000f0ffffff665544332211000000000000e0ffffff766b030008000000c80200000b000000010000004269670000000000e0ffffff61006c00700068006100000062006500740061000000000000000000e0ffffff766b040018000000f802000007000000010000004c69737400000000e0ffffff766b040004000080deadbeef0300000001000000426c6f6200000000e8ffffff88020000a8020000d80200001803000038030000f0ffffff6c6601000002000052756e00f0ffffff6c660100a001000043757272f0ffffff6c6601004801000057696e64f0ffffff6c660100e80000004d696372f0ffffff6c66010090000000536f6674180000007700610073002d0068006500720065000000000020000000766b050012000000c00300000100000001000000547261636500000008000000d8030000580000006e6b20000000056936c0d5010000000000000000000000000000000000000000ffffffff01000000f8030000ffffffffffffffff00000000000000000000000000000000000000000800000047686f73744b6579a81b' || repeat('00', 7078))::BLOB, 'Software\Microsoft\Windows\CurrentVersion\Run')
ORDER BY value_name

Uses hive_subtree

Inspect a transaction-log replay (NULL struct for a non-hive blob).

SELECT reghive.main.logs_applied('regf'::BLOB, NULL, NULL);

Uses logs_applied

Read one named value (NULL struct for a non-hive blob).

SELECT reghive.main.hive_value('regf'::BLOB, 'Software', 'Run');

Uses hive_value

Look up a key as a struct (NULL struct for a non-hive blob).

SELECT reghive.main.hive_key('regf'::BLOB, 'ControlSet001\Services');

Uses hive_key

9 more examples in the Catalog, each listed under the table or function it uses.

Registry hives is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.