Skip to content

Instantly share code, notes, and snippets.

View makelariss's full-sized avatar
🏴

makelaris makelariss

🏴
View GitHub Profile
@makelariss
makelariss / popshellslikeitsatuesday.py
Last active January 13, 2023 09:41
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)