From 328e0591525fc5e17ab1fa5d7f72d98655a372b5 Mon Sep 17 00:00:00 2001 From: diversenok <30962924+diversenok@users.noreply.github.com> Date: Thu, 27 Dec 2018 21:32:49 +0300 Subject: [PATCH] Add session access rights --- Source/WinObjEx64/props/propSecurity.c | 5 +++++ Source/WinObjEx64/props/propSecurityConsts.h | 9 +++++++++ Source/WinObjEx64/props/propType.c | 5 +++++ Source/WinObjEx64/props/propTypeConsts.h | 7 +++++++ 4 files changed, 26 insertions(+) diff --git a/Source/WinObjEx64/props/propSecurity.c b/Source/WinObjEx64/props/propSecurity.c index f98f263..89f5062 100644 --- a/Source/WinObjEx64/props/propSecurity.c +++ b/Source/WinObjEx64/props/propSecurity.c @@ -130,6 +130,11 @@ PSI_ACCESS propGetAccessTable( AccessTable = (PSI_ACCESS)&JobAccessValues; break; + case ObjectTypeSession: + This->dwAccessMax = MAX_KNOWN_SESSION_ACCESS_VALUE; + AccessTable = (PSI_ACCESS)&SessionAccessValues; + break; + case ObjectTypeIoCompletion: This->dwAccessMax = MAX_KNOWN_IOCOMPLETION_ACCESS_VALUE; AccessTable = (PSI_ACCESS)&IoCompletionAccessValues; diff --git a/Source/WinObjEx64/props/propSecurityConsts.h b/Source/WinObjEx64/props/propSecurityConsts.h index 41a9536..7a48d9f 100644 --- a/Source/WinObjEx64/props/propSecurityConsts.h +++ b/Source/WinObjEx64/props/propSecurityConsts.h @@ -191,6 +191,15 @@ static SI_ACCESS PortAccessValues[MAX_KNOWN_PORT_ACCESS_VALUE] = { { &GUID_NULL, PORT_CONNECT, L"Connect", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC } }; +// +//Session Access Values +// +#define MAX_KNOWN_SESSION_ACCESS_VALUE 2 +static SI_ACCESS SessionAccessValues[MAX_KNOWN_SESSION_ACCESS_VALUE] = { + { &GUID_NULL, SESSION_QUERY_ACCESS, L"Query", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }, + { &GUID_NULL, SESSION_MODIFY_ACCESS, L"Modify", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC } +}; + // //IoCompletion Access Values // diff --git a/Source/WinObjEx64/props/propType.c b/Source/WinObjEx64/props/propType.c index 0e8c0c9..161efd1 100644 --- a/Source/WinObjEx64/props/propType.c +++ b/Source/WinObjEx64/props/propType.c @@ -119,6 +119,11 @@ VOID propSetTypeDecodeValue( Count = MAX_KNOWN_JOB_ATTRIBUTES; break; + case ObjectTypeSession: + Desc = a_SessionProp; + Count = MAX_KNOWN_SESSION_ATTRIBUTES; + break; + case ObjectTypeDesktop: Desc = a_DesktopObjectProp; Count = MAX_KNOWN_DESKTOP_ATTRIBUTES; diff --git a/Source/WinObjEx64/props/propTypeConsts.h b/Source/WinObjEx64/props/propTypeConsts.h index e92f7ce..70b31c0 100644 --- a/Source/WinObjEx64/props/propTypeConsts.h +++ b/Source/WinObjEx64/props/propTypeConsts.h @@ -240,6 +240,13 @@ static VALUE_DESC a_JobProp[MAX_KNOWN_JOB_ATTRIBUTES] = { { L"JOB_OBJECT_SET_SECURITY_ATTRIBUTES", JOB_OBJECT_SET_SECURITY_ATTRIBUTES } }; +//Known Session Access Rights +#define MAX_KNOWN_SESSION_ATTRIBUTES 2 +static VALUE_DESC a_SessionProp[MAX_KNOWN_SESSION_ATTRIBUTES] = { + { L"SESSION_QUERY_ACCESS", SESSION_QUERY_ACCESS }, + { L"SESSION_MODIFY_ACCESS", SESSION_MODIFY_ACCESS } +}; + //Known KeyedEvent Access Rights #define MAX_KNOWN_KEYEDEVENT_ATTRIBUTES 2 static VALUE_DESC a_KeyedEventProp[MAX_KNOWN_KEYEDEVENT_ATTRIBUTES] = {