13.6. Examining Existing

Access Tokens and Security Descriptors You can learn quite a bit about access tokens and security descriptors by writing and running code that dumps the contents of existing tokens and descriptors. This section contains two different dumping programs. The first dumps an existing process's security descriptor. The second examines the access token of any existing process.

Processes (along with files and registry keys) are one of the few Windows 2000 objects that you can access without creating the code that creates the object. The process viewer (pview.exe) will give you a list of processes, along with their IDs.

13.6.1. Dumping a Process's Security Descriptor

The code in Listing 13.4 requests a process ID and then ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.