(4) NtSetInformationThread
ntdll!NtSetInformationThread is a wrapper around the
ZwSetInformationThread syscall. Its prototype is the following:
NTSYSAPI NTSTATUS NTAPI NtSetInformationThread(
IN HANDLE ThreadHandle,
IN THREAD_INFORMATION_CLASS ThreadInformationClass,
IN PVOID ThreadInformation,
IN ULONG ThreadInformationLength
);
When called with ThreadInformationClass set to 0x11
(ThreadHideFromDebugger constant), the thread will be detached from
the debugger.
Similarly to ZwQueryInformationProcess, circumventing this anti-debug
requires either modifying ZwSetInformationThread parameters before
it's called, or hooking the syscall directly with the use of a kernel
driver.