Skip to content
TrackPodcasts
educationFeb 26, 202616:39pending

Course 25 - API Python Hacking | Episode 5: Managing and Verifying Process Privileges

About this episode

In this lesson, you’ll learn about:
  • Fundamentals of Windows Access Tokens
    • Tokens define a process's privileges, such as shutting down the system or debugging memory
    • Tokens are static: you can enable/disable existing privileges but cannot add new ones
    • Difference between default tokens (limited rights, e.g., SeChangeNotify) and administrative tokens (powerful rights, e.g., SeDebugPrivilege)
  • Programmatic Access to Tokens
    • Using Python’s ctypes to interface with kernel32.dll and advapi32.dll
    • Obtaining a privileged handle with OpenProcess
    • Accessing a process token via OpenProcessToken with TOKEN_ALL_ACCESS
    • Administrative elevation is required to manipulate high-privilege tokens
  • Verifying Privilege Status
    • Defining C-compatible structures in Python: LUID, LUID_AND_ATTRIBUTES, PRIVILEGE_SET
    • Using LookupPrivilegeValue to convert a privilege name (e.g., SeDebugPrivilege) to a Locally Unique Identifier (LUID)
    • Checking if a privilege is enabled with the PrivilegeCheck API
  • Key Outcome
    • Understanding how to inspect, enable, or disable privileges for a process
    • Lays the groundwork for advanced topics like token impersonation and privilege removal


You can listen and download our episodes for free on more than 10 different platforms:
https://linktr.ee/cybercode_academy

Get every episode summarized

Each time CyberCode Academy publishes, we email you a written briefing from the transcript — the topics, who appeared, and any specific claims, with the ad reads skipped.

Email me new episodes

Free for 3 shows. No card needed.

Hosts & guests

No transcript yet

This episode has not been transcribed. Request it and it moves to the front of the queue.

Course 25 - API Python Hacking | Episode 5: Managing and Verifying Process Privileges

CyberCode Academy

0:00
16:39

More episodes

More from CyberCode Academy

View all episodes →