This commit is contained in:
parent
585210423b
commit
c40fb91c1c
|
@ -34,6 +34,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
- fixed Enabling "DropAdminRights/FakeAdminRights" adds "BlockInterferePower and ForceProtectionOnMount" to the INI [#3825](https://github.com/sandboxie-plus/Sandboxie/issues/3825)
|
- fixed Enabling "DropAdminRights/FakeAdminRights" adds "BlockInterferePower and ForceProtectionOnMount" to the INI [#3825](https://github.com/sandboxie-plus/Sandboxie/issues/3825)
|
||||||
- fixed KeePass "Out of Memory" crash due to "BlockScreenCapture=y" [#3768](https://github.com/sandboxie-plus/Sandboxie/issues/3768)
|
- fixed KeePass "Out of Memory" crash due to "BlockScreenCapture=y" [#3768](https://github.com/sandboxie-plus/Sandboxie/issues/3768)
|
||||||
- fixed Sandboxie 1.13.4 with IsBlockCapture=y brakes on Windows 7 [#3769](https://github.com/sandboxie-plus/Sandboxie/issues/3769)
|
- fixed Sandboxie 1.13.4 with IsBlockCapture=y brakes on Windows 7 [#3769](https://github.com/sandboxie-plus/Sandboxie/issues/3769)
|
||||||
|
- fixed explorer.exe issue "FakeAdminRights=y" [#3638](https://github.com/sandboxie-plus/Sandboxie/issues/3638)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -200,6 +200,7 @@ typedef struct _THREAD_DATA {
|
||||||
BOOLEAN proc_create_process_capture_image;
|
BOOLEAN proc_create_process_capture_image;
|
||||||
BOOLEAN proc_create_process_force_elevate;
|
BOOLEAN proc_create_process_force_elevate;
|
||||||
BOOLEAN proc_create_process_as_invoker;
|
BOOLEAN proc_create_process_as_invoker;
|
||||||
|
BOOLEAN proc_create_process_fake_admin;
|
||||||
BOOLEAN proc_image_is_copy;
|
BOOLEAN proc_image_is_copy;
|
||||||
WCHAR *proc_image_path;
|
WCHAR *proc_image_path;
|
||||||
WCHAR *proc_command_line;
|
WCHAR *proc_command_line;
|
||||||
|
@ -310,6 +311,8 @@ extern ULONG Dll_Windows;
|
||||||
extern PSECURITY_DESCRIPTOR Secure_NormalSD;
|
extern PSECURITY_DESCRIPTOR Secure_NormalSD;
|
||||||
extern PSECURITY_DESCRIPTOR Secure_EveryoneSD;
|
extern PSECURITY_DESCRIPTOR Secure_EveryoneSD;
|
||||||
|
|
||||||
|
extern BOOLEAN Secure_FakeAdmin;
|
||||||
|
|
||||||
extern BOOLEAN Ldr_BoxedImage;
|
extern BOOLEAN Ldr_BoxedImage;
|
||||||
|
|
||||||
extern WCHAR *Ldr_ImageTruePath;
|
extern WCHAR *Ldr_ImageTruePath;
|
||||||
|
|
|
@ -1335,12 +1335,16 @@ _FX BOOL Proc_CreateProcessInternalW(
|
||||||
lpProcessAttributes = NULL;
|
lpProcessAttributes = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TlsData->proc_create_process_fake_admin = (Secure_FakeAdmin == FALSE && SbieApi_QueryConfBool(NULL, L"FakeAdminRights", FALSE));
|
||||||
|
|
||||||
ok = __sys_CreateProcessInternalW(
|
ok = __sys_CreateProcessInternalW(
|
||||||
hToken, lpApplicationName, lpCommandLine,
|
hToken, lpApplicationName, lpCommandLine,
|
||||||
lpProcessAttributes, lpThreadAttributes, bInheritHandles,
|
lpProcessAttributes, lpThreadAttributes, bInheritHandles,
|
||||||
dwCreationFlags, lpEnvironment, lpCurrentDirectory,
|
dwCreationFlags, lpEnvironment, lpCurrentDirectory,
|
||||||
lpStartupInfo, lpProcessInformation, hNewToken);
|
lpStartupInfo, lpProcessInformation, hNewToken);
|
||||||
|
|
||||||
|
TlsData->proc_create_process_fake_admin = FALSE;
|
||||||
|
|
||||||
err = GetLastError();
|
err = GetLastError();
|
||||||
|
|
||||||
goto finish;
|
goto finish;
|
||||||
|
@ -1410,6 +1414,7 @@ _FX BOOL Proc_CreateProcessInternalW(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TlsData->proc_create_process_fake_admin = (Secure_FakeAdmin == FALSE && SbieApi_QueryConfBool(NULL, L"FakeAdminRights", FALSE));
|
||||||
|
|
||||||
ok = __sys_CreateProcessInternalW(
|
ok = __sys_CreateProcessInternalW(
|
||||||
NULL, lpApplicationName, lpCommandLine,
|
NULL, lpApplicationName, lpCommandLine,
|
||||||
|
@ -1419,6 +1424,7 @@ _FX BOOL Proc_CreateProcessInternalW(
|
||||||
|
|
||||||
err = GetLastError();
|
err = GetLastError();
|
||||||
|
|
||||||
|
TlsData->proc_create_process_fake_admin = FALSE;
|
||||||
|
|
||||||
//
|
//
|
||||||
// restore the original owner pointers in the security descriptors
|
// restore the original owner pointers in the security descriptors
|
||||||
|
|
|
@ -1003,8 +1003,9 @@ _FX NTSTATUS Ldr_NtQueryInformationToken(
|
||||||
ULONG TokenInformationLength,
|
ULONG TokenInformationLength,
|
||||||
ULONG *ReturnLength)
|
ULONG *ReturnLength)
|
||||||
{
|
{
|
||||||
|
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
|
||||||
|
|
||||||
NTSTATUS status = 0;
|
NTSTATUS status = 0;
|
||||||
THREAD_DATA *TlsData = NULL;
|
|
||||||
HANDLE hTokenReal = NULL;
|
HANDLE hTokenReal = NULL;
|
||||||
BOOLEAN FakeAdmin = FALSE;
|
BOOLEAN FakeAdmin = FALSE;
|
||||||
|
|
||||||
|
@ -1019,7 +1020,7 @@ _FX NTSTATUS Ldr_NtQueryInformationToken(
|
||||||
// we also ensure that the token belongs to the current process
|
// we also ensure that the token belongs to the current process
|
||||||
//
|
//
|
||||||
|
|
||||||
if (Secure_FakeAdmin && (SbieApi_QueryProcessInfoEx(0, 'ippt', (LONG_PTR)(hTokenReal ? hTokenReal : TokenHandle))))
|
if ((Secure_FakeAdmin || TlsData->proc_create_process_fake_admin) && (SbieApi_QueryProcessInfoEx(0, 'ippt', (LONG_PTR)(hTokenReal ? hTokenReal : TokenHandle))))
|
||||||
{
|
{
|
||||||
FakeAdmin = TRUE;
|
FakeAdmin = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1039,8 +1040,6 @@ _FX NTSTATUS Ldr_NtQueryInformationToken(
|
||||||
// we are running as Administrator
|
// we are running as Administrator
|
||||||
//
|
//
|
||||||
|
|
||||||
TlsData = Dll_GetTlsData(NULL);
|
|
||||||
|
|
||||||
if (Secure_Is_IE_NtQueryInformationToken && !TlsData->proc_create_process)
|
if (Secure_Is_IE_NtQueryInformationToken && !TlsData->proc_create_process)
|
||||||
{
|
{
|
||||||
FakeAdmin = TRUE;
|
FakeAdmin = TRUE;
|
||||||
|
@ -1150,10 +1149,12 @@ NTSTATUS Ldr_NtAccessCheckByType(PSECURITY_DESCRIPTOR SecurityDescriptor, PSID P
|
||||||
|
|
||||||
_FX NTSTATUS Ldr_NtAccessCheck(PSECURITY_DESCRIPTOR SecurityDescriptor, HANDLE ClientToken, ACCESS_MASK DesiredAccess, PGENERIC_MAPPING GenericMapping, PPRIVILEGE_SET RequiredPrivilegesBuffer, PULONG BufferLength, PACCESS_MASK GrantedAccess, PNTSTATUS AccessStatus)
|
_FX NTSTATUS Ldr_NtAccessCheck(PSECURITY_DESCRIPTOR SecurityDescriptor, HANDLE ClientToken, ACCESS_MASK DesiredAccess, PGENERIC_MAPPING GenericMapping, PPRIVILEGE_SET RequiredPrivilegesBuffer, PULONG BufferLength, PACCESS_MASK GrantedAccess, PNTSTATUS AccessStatus)
|
||||||
{
|
{
|
||||||
|
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
|
||||||
|
|
||||||
NTSTATUS status = 0;
|
NTSTATUS status = 0;
|
||||||
HANDLE hTokenReal = NULL;
|
HANDLE hTokenReal = NULL;
|
||||||
|
|
||||||
if (Secure_FakeAdmin && SecurityDescriptor) {
|
if ((Secure_FakeAdmin || TlsData->proc_create_process_fake_admin) && SecurityDescriptor) {
|
||||||
BOOLEAN Fake = FALSE;
|
BOOLEAN Fake = FALSE;
|
||||||
|
|
||||||
PSID Group, Owner;
|
PSID Group, Owner;
|
||||||
|
@ -1352,7 +1353,7 @@ _FX NTSTATUS Secure_RtlQueryElevationFlags(ULONG *Flags)
|
||||||
|
|
||||||
BOOLEAN fake = FALSE;
|
BOOLEAN fake = FALSE;
|
||||||
|
|
||||||
if (Secure_FakeAdmin)
|
if (Secure_FakeAdmin || TlsData->proc_create_process_fake_admin)
|
||||||
{
|
{
|
||||||
fake = TRUE;
|
fake = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1446,7 +1447,9 @@ NTSTATUS Secure_RtlCheckTokenMembershipEx(
|
||||||
DWORD flags,
|
DWORD flags,
|
||||||
PUCHAR isMember)
|
PUCHAR isMember)
|
||||||
{
|
{
|
||||||
if (Secure_FakeAdmin && RtlEqualSid(sidToCheck, AdministratorsSid)) {
|
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
|
||||||
|
|
||||||
|
if ((Secure_FakeAdmin || TlsData->proc_create_process_fake_admin) && RtlEqualSid(sidToCheck, AdministratorsSid)) {
|
||||||
if (isMember) *isMember = TRUE;
|
if (isMember) *isMember = TRUE;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1034,6 +1034,7 @@ Tmpl.ScanService=edgeupdate
|
||||||
# SBIE fix for MS Edge WebView2
|
# SBIE fix for MS Edge WebView2
|
||||||
#ExternalManifestHack=msedgewebview2.exe,y
|
#ExternalManifestHack=msedgewebview2.exe,y
|
||||||
NormalFilePath=msedge.exe,%LocalAppData%\Microsoft\Edge\User Data\Default\Secure Preferences
|
NormalFilePath=msedge.exe,%LocalAppData%\Microsoft\Edge\User Data\Default\Secure Preferences
|
||||||
|
FakeAdminRights=msedge.exe,n
|
||||||
|
|
||||||
#
|
#
|
||||||
# Vivaldi
|
# Vivaldi
|
||||||
|
|
Loading…
Reference in New Issue