Specific rights (e.g., SeDebugPrivilege or SeImpersonatePrivilege ). Typical Usage in Red Teaming

Using functions like SetThreadToken to make the current thread operate with the privileges of the stolen token.

Is this for a or for developing defenses ?