文件过滤框架 https://docs.microsoft.com/en-us/windows-hardware/drivers/ifs
Detour https://github.com/microsoft/Detours
typedef struct
{
PVOID *pTable; // Service Table Pointer
PULONG pulTableCounter; // Table Item Counter. This table is only updated in checked builds.
ULONG ulServiceCounter; // Number of services contained in this table.
PUCHAR rguchParamTable; // Table containing the number of bytes of parameters the handler function takes.
} SERVICE_TABLE;
SSSDT(System Shadow Services Descriptor Table)
防御基于 x86 架构上的监控实现,基本是以 hook(inline hook) + 注册系统回调实现的; 但在 x64 构架上,微软引入 Driver Signature Enforcement + Kernel Patch Protection(PatchGuard,简称 PG) 安全机制, 杜绝第三方驱动在系统关键“驱动”中进行的内存修改。因为 PG 的存在,无法继续使用 x86 的 hook 方式实现更多行为的监控,只能使用系统提供的标准回调; x86 hook 的方式可将 SSDT + SSSDT 里涉及到的各函数调用都进行监控,基本上涵盖了系统上所有的行为, 而系统提供的标准回调,只有进程创建 \ 退出、模块加载、注册表相关、文件、对象回调, 所以,导致了一些在 x86 上可进行防御的行为,在 x64 上无效(或实现方法与 x86 不同)。
Through the looking glass: webcam interception and protection in kernel mode
x64 自保护 通过 TLS 回调的更早执行时机,Hook 自身 PEB 内 KernelCallbackTable 表的 __ClientLoadLibrary,实现对全局钩子的拦截。
ReactOS https://github.com/reactos/reactos
双机调试 VirtualKD https://sysprogs.com/legacy/virtualkd
Source Insight https://www.sourceinsight.com
CFF Explorer https://ntcore.com/?page_id=388
ProcMon(SysinternalsSuite) https://docs.microsoft.com/zh-cn/sysinternals/downloads/sysinternals-suite
文件重启删除 读取注册表 smss.exe 删除的。
svchost.exe HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost\
%SystemRoot%\system32\svchost.exe -k RPCSS
File: %SystemRoot%\System32\RpcEpMap.dll
Registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RpcEptMapper
反汇编过程即二进制转汇编助记符,参考 intel 指令集手册。 X86 为变长指令(灵活),arm 为定长指令(高效)[ 4G 寻址问题 ]