2014-04-06 18:31:53 +00:00
|
|
|
/* Benjamin DELPY `gentilkiwi`
|
|
|
|
http://blog.gentilkiwi.com
|
|
|
|
benjamin@gentilkiwi.com
|
2015-08-25 09:19:01 +00:00
|
|
|
Licence : https://creativecommons.org/licenses/by/4.0/
|
2014-04-06 18:31:53 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "globals.h"
|
|
|
|
#include "kull_m_handle.h"
|
|
|
|
#include <sddl.h>
|
|
|
|
|
2017-03-28 01:22:57 +00:00
|
|
|
extern NTSTATUS NTAPI NtCompareTokens(IN HANDLE FirstTokenHandle, IN HANDLE SecondTokenHandle, OUT PBOOLEAN Equal);
|
|
|
|
|
2014-04-06 18:31:53 +00:00
|
|
|
typedef BOOL (CALLBACK * PKULL_M_TOKEN_ENUM_CALLBACK) (HANDLE hToken, DWORD ptid, PVOID pvArg);
|
|
|
|
|
|
|
|
typedef struct _KULL_M_TOKEN_ENUM_DATA {
|
|
|
|
PKULL_M_TOKEN_ENUM_CALLBACK callback;
|
|
|
|
PVOID pvArg;
|
|
|
|
BOOL mustContinue;
|
|
|
|
} KULL_M_TOKEN_ENUM_DATA, *PKULL_M_TOKEN_ENUM_DATA;
|
|
|
|
|
2017-03-28 01:22:57 +00:00
|
|
|
typedef struct _KULL_M_TOKEN_LIST {
|
|
|
|
HANDLE hToken;
|
|
|
|
DWORD ptid;
|
|
|
|
struct _KULL_M_TOKEN_LIST *next;
|
|
|
|
} KULL_M_TOKEN_LIST, *PKULL_M_TOKEN_LIST;
|
|
|
|
|
2014-04-06 18:31:53 +00:00
|
|
|
BOOL kull_m_token_getTokens(PKULL_M_TOKEN_ENUM_CALLBACK callBack, PVOID pvArg);
|
2017-03-28 01:22:57 +00:00
|
|
|
BOOL kull_m_token_getTokensUnique(PKULL_M_TOKEN_ENUM_CALLBACK callBack, PVOID pvArg);
|
|
|
|
BOOL CALLBACK kull_m_token_getTokensUnique_callback(HANDLE hToken, DWORD ptid, PVOID pvArg);
|
2014-04-06 18:31:53 +00:00
|
|
|
BOOL CALLBACK kull_m_token_getTokens_process_callback(PSYSTEM_PROCESS_INFORMATION pSystemProcessInformation, PVOID pvArg);
|
|
|
|
BOOL CALLBACK kull_m_token_getTokens_handles_callback(HANDLE handle, PSYSTEM_HANDLE pSystemHandle, PVOID pvArg);
|
|
|
|
|
|
|
|
BOOL kull_m_token_getNameDomainFromToken(HANDLE hToken, PWSTR * pName, PWSTR * pDomain, PWSTR * pSid, PSID_NAME_USE pSidNameUse);
|
2017-03-26 00:35:32 +00:00
|
|
|
BOOL kull_m_token_CheckTokenMembership(__in_opt HANDLE TokenHandle, __in PSID SidToCheck, __out PBOOL IsMember);
|
2016-05-05 23:31:04 +00:00
|
|
|
PCWCHAR kull_m_token_getSidNameUse(SID_NAME_USE SidNameUse);
|
2016-06-03 23:35:35 +00:00
|
|
|
BOOL kull_m_token_getNameDomainFromSID(PSID pSid, PWSTR * pName, PWSTR * pDomain, PSID_NAME_USE pSidNameUse, LPCWSTR system);
|
2017-03-28 01:22:57 +00:00
|
|
|
BOOL kull_m_token_getSidDomainFromName(PCWSTR pName, PSID * pSid, PWSTR * pDomain, PSID_NAME_USE pSidNameUse, LPCWSTR system);
|
|
|
|
|
|
|
|
BOOL kull_m_token_equal(IN HANDLE First, IN HANDLE Second);
|