Skip to content

Commit a577a01

Browse files
authored
Update 2020-06-15-playing_with_self_reference_pml4_entry.md
Fixed typo
1 parent 9f7a6e2 commit a577a01

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

content/2020-06-15-playing_with_self_reference_pml4_entry.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -245,22 +245,18 @@ kd> dx -g @$cursession.Processes.Select( p => new { ProcessName = p.Name, Pml4Ba
245245
Across several reboots in my VM labs, only 2 matches are shown consistently
246246

247247
* Windows 2004 x64 Generation 1 (i.e. BIOS)
248-
```text
249-
========================================================
250-
= = ProcessName = Pml4Base =
251-
========================================================
252-
= [0x0] - Idle - 0x1aa000 =
253-
= [0x4] - System - 0x1aa000 =
254-
```
248+
249+
| PID | ProcessName | Pml4Base |
250+
|:--:|:--:|:--:|
251+
| 0x0 | Idle | 0x1aa000 |
252+
| 0x4 | System | 0x1aa000 |
255253

256254
* Windows 2004 x64 Generation 2 (i.e. UEFI)
257-
```text
258-
=========================================================
259-
= = ProcessName = Pml4Base =
260-
=========================================================
261-
= [0x0] - Idle - 0x6d4000 =
262-
= [0x4] - System - 0x6d4000 =
263-
```
255+
256+
| PID | ProcessName | Pml4Base |
257+
|:--:|:--:|:--:|
258+
| 0x0 | Idle | 0x6d4000 |
259+
| 0x4 | System | 0x6d4000 |
264260

265261

266262
0x1aa000 for the physical address of a Gen1 (BIOS) Hyper-V VM, and 0x6d4000 for a Gen2 (UEFI). This seems to partially coincide with what was said in [Ricerca's article](#1) about the fact that the PML4 for System is at unrandomized physical address in most cases. From my limited testing the following physical addresses were found consistently (for Windows 2004 x64 with Kd):
@@ -299,7 +295,7 @@ for index in range(system_pml4_root, system_pml4_root+size_of_page, size_of_entr
299295
print("self-reference entry is at index: %d" % index)
300296
```
301297

302-
I hope not to make it sound simple, it is not and took me quite some time to figure out, so massive props to [@hugeh0ge](https://twitter.com/hugeh0ge){:target="_blank"} and [@_N4NU_](https://twitter.com/_N4NU_){:target="_blank"} for the technique, and [@chompie1337](https://web.archive.org/web/20220619035731/twitter.com/chompie1337){:target="_blank"} for the implementation. This technique provides a somewhat reliable way to defeat KASLR, SMEP & SMAP with no other vulnerability, but by mere knowledge of Intel processors and Windows memory management inner workings, for the vulnerability CVE-2020-0796, which, due to Microsoft's effort, made it tough.
298+
I hope not to make it sound simple, it is not and took me quite some time to figure out, so massive props to [`@hugeh0ge`](https://twitter.com/hugeh0ge){:target="_blank"} and [`@_N4NU_`](https://twitter.com/_N4NU_){:target="_blank"} for the technique, and [`@chompie1337`](https://web.archive.org/web/20220619035731/twitter.com/chompie1337){:target="_blank"} for the implementation. This technique provides a somewhat reliable way to defeat KASLR, SMEP & SMAP with no other vulnerability, but by mere knowledge of Intel processors and Windows memory management inner workings, for the vulnerability CVE-2020-0796, which, due to Microsoft's effort, made it tough.
303299

304300
Thanks for reading...✌
305301

0 commit comments

Comments
 (0)