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

Vermilion : Mastering Linux Post-Exploitation For Red Team Success

Vermilion is a simple and lightweight CLI tool designed for rapid collection, and optional exfiltration…

1 day ago

AD-CS-Forest-Exploiter : Mastering Security Through PowerShell For AD CS Misconfiguration

ADCFFS is a PowerShell script that can be used to exploit the AD CS container…

1 day ago

Usage Of Tartufo – A Comprehensive Guide To Securing Your Git Repositories

Tartufo will, by default, scan the entire history of a git repository for any text…

1 day ago

Loco : A Rails-Inspired Framework For Rust Developers

Loco is strongly inspired by Rails. If you know Rails and Rust, you'll feel at…

2 days ago

Monolith : The Ultimate Tool For Storing Entire Web Pages As Single HTML Files

A data hoarder’s dream come true: bundle any web page into a single HTML file.…

2 days ago