I am writing an application in C # and C ++ / CLI and I have code that pauses processes. However, I want them not to be suspended by another process (e.g. Process Explorer). Is it possible to get an exclusive process descriptor or in some way block other applications from performing this operation? And if so, how?
this cannot be done from user mode.
any process that has SE_DEBUG_PRIVILEGE, included in the token, can open the process / thread handler with all access (only if it is not protected by the process).
SE_DEBUG_PRIVILEGE
ObRegisterCallbacks /. , deny handle open remove PROCESS_SUSPEND_RESUME, THREAD_SUSPEND_RESUME THREAD_RESUME from DesiredAccess OB_PRE_CREATE_HANDLE_INFORMATION. api PsResumeProcess.
ObRegisterCallbacks
PROCESS_SUSPEND_RESUME
THREAD_SUSPEND_RESUME
THREAD_RESUME
DesiredAccess
OB_PRE_CREATE_HANDLE_INFORMATION
PsResumeProcess
. OBJ_EXCLUSIVE OBJECT_ATTRIBUTES ( 3- / - ZwOpenProcess), , OBJ_EXCLUSIVE , . STATUS_INVALID_PARAMETER , STATUS_ACCESS_DENIED. OBJ_EXCLUSIVE - ( , csrss.exe, , )
OBJ_EXCLUSIVE
OBJECT_ATTRIBUTES
ZwOpenProcess
STATUS_INVALID_PARAMETER
STATUS_ACCESS_DENIED
csrss.exe
NtResumeProcess NtResumeThread, NTDLL. , , , , - STATUS_ACCESS_DENIED NTSTATUS, .
- . - ObRegisterCallbacks, PROCESS_SUSPEND_RESUME , .
, , . , Microsoft API-, MS Detours. ObRegisterCallbacks , , ( , ).
.
Source: https://habr.com/ru/post/1679087/More articles:Can I send code written in Swift 4 to the App Store with Xcode 8.3.2? - iosCross-platform advice Android / iOS / Windows - androidGet Percentage Code Coverage With FxCop - c #ΠΠ΅Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡΡ ΠΈΠ»ΠΈ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡΡ ΡΠ°Π·ΠΌΠ΅Ρ Amazon EBS Volume - amazon-web-servicesThe Wasm compilation exceeds internal limits in this context for the arguments provided - c: CSS hover rotation holds position on open - csshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1679089/if-i-cherry-pick-a-commit-from-a-branch-and-then-merge-the-whole-branch-later-what-happens-to-the-git-history&usg=ALkJrhibcBhuJuA1VKEznZfhm9x_0hz8aQRails 4: why is there one way to render partial so fast? - performancesphal namespace not configured for this process - androidcss: move the rotation element and save the new position - cssAll Articles