> For the complete documentation index, see [llms.txt](https://fareedfauzi.gitbook.io/ctf-training/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fareedfauzi.gitbook.io/ctf-training/forensic/kape-triage/registry-analysis.md).

# Registry Analysis

## What is registry

Registry is a hierarchical database that serves as a central repository for&#x20;

1. Configuration settings
2. Information about the software, hardware, and user preferences

In perspective of attacker, registry can be abuse to:

* Setup persistence
* Modify config such as WDigest
* Disable WinDefender
* Privilege Escalation
* User Account Manipulation
* And many more (<https://redteamrecipe.com/Registry-Attack-Vectors/>)

## &#x20;Registry hives explained

| Registry hives        | Description                                                                                      |
| --------------------- | ------------------------------------------------------------------------------------------------ |
| HKEY\_CLASSES\_ROOT   | A symbolic link to HKLM\SOFTWARE\Classes                                                         |
| HKEY\_CURRENT\_USER   | A symbolic link to the part of HKEY\_USERS representing the currently logged in user's profile.  |
| HKEY\_LOCAL\_MACHINE  | Contains information about all the installed hardware and software.                              |
| HKEY\_USERS           | Contains preferences for each of the user profiles on the machine                                |
| HKEY\_CURRENT\_CONFIG | Symbolic link that points to the part in HKLM that applies to the current hardware configuration |

## Registry structure

<figure><img src="https://lh7-us.googleusercontent.com/UVYC-adHpD7uhe9v2FUiS7ioBAbPTRA2rll2ZBFLvEqXCOvMw3jpCPMiXHgpsBZmcfZ39WYyiWNYGlnAnQwF4yBAuPhx_OdBp0SbbpUJLJc3l9uJAFT-dAECzg6VzEU6oXRbKu4jmnjTnPSAB3TzXvRfAA=s2048" alt=""><figcaption></figcaption></figure>

## Registry artifact location

| System registry                                                                              | Current user registry                                                                                                                      |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| <ul><li>%WinDir%\System32\Config\*</li><li>%WinDir%\appcompat\Programs\AMCACHE.hve</li></ul> | <p></p><ul><li>C:\Users\&#x3C;username>\NTUSER.dat</li><li>C:\Users\&#x3C;username>\AppData\Local\Microsoft\Windows\USRCLASS.DAT</li></ul> |

## Using Registry Explorer

<figure><img src="/files/rsMzCUdk2c1rgt2Y0M9n" alt=""><figcaption></figcaption></figure>

Please refer:  <https://fareedfauzi.github.io/2023/12/22/Windows-Forensics-checklist-cheatsheet.html#triage-artifacts-parsing-and-analysis>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://fareedfauzi.gitbook.io/ctf-training/forensic/kape-triage/registry-analysis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
