Restrict access to devices

This commit is contained in:
momo5502
2024-10-23 20:44:01 +02:00
parent 3d6f962e4c
commit ec3861f595
2 changed files with 12 additions and 0 deletions

View File

@@ -1758,6 +1758,17 @@ namespace
return STATUS_SUCCESS;
}
if (filename == L"\\Device\\KsecDD")
{
file_handle.write(KSEC_DD.bits);
return STATUS_SUCCESS;
}
if (filename.starts_with(L"\\Device\\"))
{
return STATUS_NOT_SUPPORTED;
}
handle root_handle{};
root_handle.bits = reinterpret_cast<uint64_t>(attributes.RootDirectory);
if (root_handle.value.is_pseudo && (filename == L"\\Reference" || filename == L"\\Connect"))