Project Zero
Follow
The Windows Registry Adventure #8: Practical exploitation of hive memory corruption
The blog post discusses the exploitation of hive-based memory corruption bugs in the Windows registry, which can lead to privilege escalation and arbitrary code execution. The author explains that these bugs are characteristic of the Windows registry but can be applied to other similar vulnerabilities. The post focuses on the exploitation of these bugs, which involves overwriting data within an active hive mapping in memory. The author notes that the Windows registry cell allocator lacks safeguards against memory corruption and has no element of randomness, making its behavior predictable. The exploitation of classic memory corruption bugs typically involves initial memory corruption, followed by intermediate steps, and finally, profit in the form of arbitrary code execution or privilege escalation. The author explains that hive memory corruption can be exploited by overwriting internal hive data, which can have a broader impact on the overall security of the system. The post discusses the possibility of performing hive-only attacks in privileged system hives, which can be done by exploiting vulnerabilities that can be triggered solely through API or system calls. The author notes that there are several user-writable keys in the HKLM\SOFTWARE and HKLM\SYSTEM hives that can be used to corrupt a system hive. The post provides examples of such keys, including HKLM\SOFTWARE\Microsoft\CoreShell and HKLM\SOFTWARE\Microsoft\DRM. The author concludes that exploiting hive memory corruption bugs can be a viable way to elevate privileges and execute arbitrary code, and that the techniques described in the post can be applied to other similar vulnerabilities. The post is a supplement to a previous presentation on the topic, and the author encourages readers to review the slides and recording for more information. Overall, the post provides a detailed analysis of the exploitation of hive-based memory corruption bugs and their potential impact on the security of the Windows registry.