Himanshu Khokhar's Blog

A journey to pwn rip

Category: Exploit Development

Exploiting CVE–2019-1132: Another NULL Pointer Dereference in Windows Kernel

NULL Pointer Dereferences should have died few years ago but they are still being found and used in malware attacks. This post explores the internal details of CVE-2019-1132, which was used by Buhtrap group to target victims in Eastern Europe.

Introduction

The vulnerability we are discussing in this post, NULL pointer dereference, resides in win32k.sys driver which leads to successful escalation of privileges (EoP) on Windows 7 and Windows Server 2008 OSes.

Microsoft addressed this vulnerability in July patch and the vulnerability was discussed previously by ESET in their blog as this vulnerability was used in targeted attacks in Eastern Europe.

Read More

Windows Kernel Exploitation Part 3: Integer Overflow

Introduction

Welcome to the third part of Windows Kernel Exploitation series. In this part, we are going to exploit integer overflow in the HackSysExtremeVulnerableDriver.

What exactly is an integer overflow?

For those who do not know about integer overflows, you might be thinking how an integer can overflow?

Well, the actual integer does not overflow. CPU stores integers in fixed size memory allocations (we are not talking about heap or alike here). If you are familiar with C/C++ programming language or similar languages, you might recall data types and how each data type has specific fixed size.

Read More

Windows Kernel Exploitation Part 2: Type Confusion

Introduction

Welcome to the second part of Windows Kernel Exploitation series. In the second part, we are taking a detour from usual memory corruption vulnerabilities (which are a majority in case of the driver we are exploiting). I was quite confused whether to make it the first part because how easy it is to exploit, but here we are, once we have tasted blood in kernel land.

What is Type Confusion?

Type confusion is a vulnerability where the application doesn’t verify the type of an object (function, data type, etc.) and then processes it as it expects but the passed object is some other object.

Read More

Windows Kernel Exploitation Part 1: Stack Buffer Overflows

Introduction

Welcome to the first part of Windows Kernel Exploitation series. In the first part, we are starting with a vanilla stack buffer overflow in the HackSysExtremeVulnerableDriver.

When a buffer present on stack gets more data than it can store (for e.g. Copying 20 bytes on a 16-byte buffer, which can be a character array or similar object), the remaining data gets written in nearby location, effectively overwriting or corrupting the stack.

The core idea is to control this overflow so that we can overwrite saved return address on the stack and after execution of current (vulnerable) function, it will return to our overwritten value, which contains our shellcode.

Read More

Powered by WordPress & Theme by Anders Norén