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
- Query Farm hosting
- Available · $10/month organization minimum
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'
| 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.
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;
INSTALL vgi FROM community;
LOAD vgi;
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'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'reghive' AS reghive (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-reghive:0.5.0'
);
3. Run a query
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'
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connector’s deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
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;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'reghive' AS reghive
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
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'
Query Farm operates Registry hives for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
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;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use reghive as the catalog alias for the query below.
4. Run a query
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'
Technical details
- Verified connector release
- v0.5.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
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]'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'reghive' AS reghive (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-reghive:0.5.0'
);
Overview
Parse Windows Registry hive files (regf) into typed key/value rows for DFIR — transaction-log replay and deleted-cell recovery.
Parse Windows Registry hive files (the on-disk regf format) directly in DuckDB SQL — SYSTEM, SOFTWARE, NTUSER.DAT, SAM, SECURITY, UsrClass.dat, and AmCache.hve — into typed key/value rows for digital forensics and incident response. ATTACH a directory of thousands of collected hives and run one query that joins registry evidence (Run-key persistence, Services, installed software, AmCache program-execution) to the rest of your detection surface — IOC feeds, CVE data, YARA, Sigma — with no per-host RegRipper invocation and no result-wrangling.
The differentiators over export-only tools are transaction-log (.LOG1/.LOG2) replay of dirty hives captured mid-write and deleted-cell recovery of keys/values from unallocated space (flagged is_deleted), both powered by the Apache-2.0 notatin parser. Every value is surfaced both as a coerced value_data string and the lossless value_raw bytes; per-key last-write timestamps are a first-class column.
Sensitivity note. SAM/SECURITY hives contain password-hash material. This worker exposes hive structure faithfully (so those bytes appear in value_raw) but never decodes credentials — pair it with vgi-mask/vgi-pii to redact before results leave the analyst's session.
How you work with it. Point it at a directory glob of collected hives for bulk triage, or hand it a single in-memory hive to drill into one subtree, key, or value; header and validity probes tell you up front whether a hive is dirty and needs transaction-log recovery. The worker opens no socket and makes no outbound calls — zero egress, safe for air-gapped evidence stores.
Format references: the msuhanov regf specification and Google Project Zero's "Windows Registry Adventure #5: regf".
Catalog
Everything reghive exposes once attached — read straight from the worker's
released build.
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)
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';
| 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;
forensic_keys
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.
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;
hive_info (blob BLOB)
Summarize a hive's base block: type, version, sequence numbers, dirty flag, and last-written time
-
hive_typeVARCHAR
-
majorUSMALLINT
-
minorUSMALLINT
-
root_pathVARCHAR
-
primary_seqUINTEGER
-
secondary_seqUINTEGER
-
is_dirtyBOOLEAN
-
last_writtenTIMESTAMP WITH TIME ZONE
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;
hive_key (blob BLOB, key_path VARCHAR)
Return one registry key as a struct with its values inlined
-
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
-
Look up a key as a struct (NULL struct for a non-hive blob).
SELECT reghive.main.hive_key('regf'::BLOB, 'ControlSet001\Services');
hive_value (blob BLOB, key_path VARCHAR, value_name VARCHAR)
Return a single named registry value as a struct (value_type, value_data, value_raw)
-
value_typeVARCHAR
-
value_dataVARCHAR
-
value_rawBLOB
Read one named value (NULL struct for a non-hive blob).
SELECT reghive.main.hive_value('regf'::BLOB, 'Software', 'Run');
key_info (blob BLOB, key_path VARCHAR)
Return a key's metadata (last_write, subkey_count, value_count, class_name, is_deleted) without materializing its values
-
last_writeTIMESTAMP WITH TIME ZONE
-
subkey_countUINTEGER
-
value_countUINTEGER
-
class_nameVARCHAR
-
is_deletedBOOLEAN
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;
logs_applied (blob BLOB, log1 BLOB, log2 BLOB)
Report a transaction-log replay against supplied .LOG1/.LOG2 blobs: applied, entries_replayed, dirty_pages, became_clean, log_format
-
appliedBOOLEAN
-
entries_replayedUINTEGER
-
dirty_pagesUINTEGER
-
became_cleanBOOLEAN
-
log_formatVARCHAR
Inspect a transaction-log replay (NULL struct for a non-hive blob).
SELECT reghive.main.logs_applied('regf'::BLOB, NULL, NULL);
well_formed (blob BLOB)
Validate a BLOB as a primary regf hive; never panics on hostile input
-
okBOOLEAN
-
hive_typeVARCHAR
-
errorVARCHAR
-
kindVARCHAR
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;
hive_subtree (blob BLOB, key_path VARCHAR, apply_logs := BOOLEAN, recover_deleted := BOOLEAN)
Read one subtree of a hive BLOB (rooted at key_path) into typed rows
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;
read_hive (glob_or_blob ANY, apply_logs := BOOLEAN, recover_deleted := BOOLEAN, mode := VARCHAR)
Read regf registry hives (glob or BLOB) into typed key/value rows
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;
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
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.
Related workers
NTFS MFT
Security & forensics
Turn a collected NTFS $MFT into a SQL forensic timeline with full paths, timestomp flags, deleted records, and data streams
Windows event logs (EVTX)
Security & forensics
Parse Windows .evtx event-log files into queryable SQL rows for forensics and incident response
CVE
Security & forensics
Look up CVE records, flag known-exploited CVEs, score exploit likelihood, find open-source package advisories, and compute CVSS v3.1 scores