From c2109af80e651aa6ea91004927f81028cf367dd1 Mon Sep 17 00:00:00 2001 From: midipix Date: Fri, 15 May 2020 23:41:48 +0000 Subject: __ntapi_init_adjust_privileges(): also enable the debug and audit privileges. --- src/internal/ntapi.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/internal/ntapi.c b/src/internal/ntapi.c index 817a21f..3af78c9 100644 --- a/src/internal/ntapi.c +++ b/src/internal/ntapi.c @@ -96,7 +96,7 @@ static void __ntapi_init_adjust_privileges(void) /* token privileges */ tokprivs = (nt_token_privileges *)buffer; - tokprivs->privilege_count = 4; + tokprivs->privilege_count = 6; tokprivs->privileges[0].attributes = NT_SE_ENABLE_PRIVILEGE; tokprivs->privileges[0].luid.low = NT_SE_CREATE_SYMBOLIC_LINK_PRIVILEGE; @@ -114,6 +114,14 @@ static void __ntapi_init_adjust_privileges(void) tokprivs->privileges[3].luid.low = NT_SE_RESTORE_PRIVILEGE; tokprivs->privileges[3].luid.high = 0; + tokprivs->privileges[4].attributes = NT_SE_ENABLE_PRIVILEGE; + tokprivs->privileges[4].luid.low = NT_SE_AUDIT_PRIVILEGE; + tokprivs->privileges[4].luid.high = 0; + + tokprivs->privileges[5].attributes = NT_SE_ENABLE_PRIVILEGE; + tokprivs->privileges[5].luid.low = NT_SE_DEBUG_PRIVILEGE; + tokprivs->privileges[5].luid.high = 0; + /* (attempt to) set any or all */ __ntapi->zw_adjust_privileges_token( internals->htoken,0,tokprivs, -- cgit v1.2.3