Cyber security

CreateToken: Exploiting ZwCreateToken() for SYSTEM Token

In the realm of cybersecurity, understanding and exploiting Windows APIs is pivotal for both defenders and attackers. In this article, we delve into the intricacies of the ZwCreateToken() API and explore how it can be exploited to obtain a coveted SYSTEM token with full privileges.

Through a step-by-step walkthrough, we will uncover the techniques and tools used in this exploit, shedding light on the potential risks it poses and the importance of safeguarding against such vulnerabilities.

PoCs to get full privileged SYSTEM token with ZwCreateToken() API.

Installation

PS C:\> sc.exe create CreateToken type= kernel binpath= C:\Dev\CreateTokenDrv_x64.sys
PS C:\> sc.exe start CreateToken

Client Program Usage

Client program performs NT AUTHORITY\SYSTEM process execution.

PS C:\Dev> .\CreateTokenClient.exe -h

CreateTokenClient - Client for CreateTokenDrv.

Usage: CreateTokenClient.exe [Options]

        -h, --help    : Displays this help message.
        -c, --command : Specifies command to execute. Default is "cmd.exe".
Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

How Web Application Firewalls (WAFs) Work

General Working of a Web Application Firewall (WAF) A Web Application Firewall (WAF) acts as…

10 hours ago

How to Send POST Requests Using curl in Linux

How to Send POST Requests Using curl in Linux If you work with APIs, servers,…

11 hours ago

What Does chmod 777 Mean in Linux

If you are a Linux user, you have probably seen commands like chmod 777 while…

11 hours ago

How to Undo and Redo in Vim or Vi

Vim and Vi are among the most powerful text editors in the Linux world. They…

11 hours ago

How to Unzip and Extract Files in Linux

Working with compressed files is a common task for any Linux user. Whether you are…

11 hours ago

Free Email Lookup Tools and Reverse Email Search Resources

In the digital era, an email address can reveal much more than just a contact…

11 hours ago