| 285 | } |
| 286 | |
| 287 | VOID DbgkpMarkProcessPeb( |
| 288 | _In_ PEPROCESS Process |
| 289 | ) { |
| 290 | KAPC_STATE ApcState; |
| 291 | PEPROCESS process = Process; |
| 292 | //if (ExAcquireRundownProtection(&process->RundownProtect)) { |
| 293 | // /*if (process->Peb != nullptr) { |
| 294 | // KeStackAttachProcess(Process, &ApcState); |
| 295 | // ExAcquireFastMutex(&DbgkpProcessDebugPortMutex); |
| 296 | // __try { |
| 297 | // auto peb = (PPEB_S)process->Peb; |
| 298 | // peb->BeingDebugged = (BOOLEAN)(process->DebugPort != nullptr ? TRUE : FALSE); |
| 299 | // } |
| 300 | // __except (EXCEPTION_EXECUTE_HANDLER) { |
| 301 | |
| 302 | // } |
| 303 | // ExReleaseFastMutex(&DbgkpProcessDebugPortMutex); |
| 304 | |
| 305 | // KeUnstackDetachProcess(&ApcState); |
| 306 | // }*/ |
| 307 | // |
| 308 | // //ExReleaseRundownProtection(&process->RundownProtect); |
| 309 | //} |
| 310 | } |
| 311 | |
| 312 | NTSTATUS |
| 313 | DbgkpSetProcessDebugObject( |
no outgoing calls
no test coverage detected