Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
SysWhispers — AV/EDR evasion via direct system calls. | Kitploit
工具/GitHubGitHub/jthuraisamy/syswhispers
漏洞利用IDS/IPS规避Shellcode渗透测试红队Payload 开发
GitHubjthuraisamy/syswhispers

SysWhispers

AV/EDR evasion via direct system calls.

查看仓库
2.0k2775年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

SysWhispers

SysWhispers 通过生成头文件/汇编文件来帮助实现规避,这些文件可供植入体用于直接发起系统调用。

支持从 Windows XP 到 Windows 10 19042 (20H2) 的所有核心系统调用。示例生成文件位于 example-output/ 文件夹中。

简介

各类安全产品会在用户态 API 中放置钩子,从而能够将执行流程重定向到其引擎并检测可疑行为。ntdll.dll 中执行系统调用的函数仅由若干汇编指令组成,因此在自己的植入体中重新实现这些函数可以绕过那些安全产品钩子的触发。此技术由 @Cn33liz 推广,他的博客文章提供了更详细的技术细节,值得一读。

SysWhispers 为红队人员提供了为任何从 Windows XP 开始的核心内核镜像 (ntoskrnl.exe) 系统调用生成头文件/汇编文件对的能力,并支持跨任何 Windows 版本。头文件中还会包含必要的类型定义。

本工具与 Dumpert POC 的主要实现差异在于,它不调用 RtlGetVersion 来查询操作系统版本,而是在汇编中通过直接查询 PEB 来完成。这样做的好处是可以调用一个支持多个 Windows 版本的函数,而不是为每个版本调用多个函数。

安装

root@kitploit:~
> git clone https://github.com/jthuraisamy/SysWhispers.git
> cd SysWhispers
> pip3 install -r .\requirements.txt
> py .\syswhispers.py --help

使用和示例

命令行

root@kitploit:~
# 导出所有函数,兼容所有支持的 Windows 版本(参见 example-output/)。
py .\syswhispers.py --preset all -o syscalls_all

# 仅导出常用函数,兼容 Windows 7、8 和 10。
py .\syswhispers.py --preset common -o syscalls_common

# 导出 NtProtectVirtualMemory 和 NtWriteVirtualMemory,兼容所有版本。
py .\syswhispers.py --functions NtProtectVirtualMemory,NtWriteVirtualMemory -o syscalls_mem

# 导出所有函数,兼容 Windows 7、8 和 10。
py .\syswhispers.py --versions 7,8,10 -o syscalls_78X

脚本输出

root@kitploit:~
PS C:\Projects\SysWhispers> py .\syswhispers.py --preset common --out-file syscom

  ,         ,       ,_ /_   .  ,   ,_    _   ,_   ,
_/_)__(_/__/_)__/_/_/ / (__/__/_)__/_)__(/__/ (__/_)__
      _/_                         /
     (/                          /   @Jackson_T, 2019

SysWhispers: 为何调用内核,当你本可以低语?

已选择常用函数。

完成!文件已写入:
        syscom.asm
        syscom.h

经典 CreateRemoteThread DLL 注入改造前后对比

root@kitploit:~
py .\syswhispers.py -f NtAllocateVirtualMemory,NtWriteVirtualMemory,NtCreateThreadEx -o syscalls
root@kitploit:~
#include <Windows.h>

void InjectDll(const HANDLE hProcess, const char* dllPath)
{
    LPVOID lpBaseAddress = VirtualAllocEx(hProcess, NULL, strlen(dllPath), MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
    LPVOID lpStartAddress = GetProcAddress(GetModuleHandle(L"kernel32.dll"), "LoadLibraryA");
	
    WriteProcessMemory(hProcess, lpBaseAddress, dllPath, strlen(dllPath), nullptr);
    CreateRemoteThread(hProcess, nullptr, 0, (LPTHREAD_START_ROUTINE)lpStartAddress, lpBaseAddress, 0, nullptr);
}
root@kitploit:~
#include <Windows.h>
#include "syscalls.h" // 导入生成的头文件。

void InjectDll(const HANDLE hProcess, const char* dllPath)
{
    HANDLE hThread = NULL;
    LPVOID lpAllocationStart = nullptr;
    SIZE_T szAllocationSize = strlen(dllPath);
    LPVOID lpStartAddress = GetProcAddress(GetModuleHandle(L"kernel32.dll"), "LoadLibraryA");
	
    NtAllocateVirtualMemory(hProcess, &lpAllocationStart, 0, (PULONG)&szAllocationSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
    NtWriteVirtualMemory(hProcess, lpAllocationStart, (PVOID)dllPath, strlen(dllPath), nullptr);
    NtCreateThreadEx(&hThread, GENERIC_EXECUTE, NULL, hProcess, lpStartAddress, lpAllocationStart, FALSE, 0, 0, 0, nullptr);
}

常用函数

使用 --preset common 开关将生成包含以下函数的头文件/汇编文件对:

点击展开函数列表。
  • NtCreateProcess (CreateProcess)
  • NtCreateThreadEx (CreateRemoteThread)
  • NtOpenProcess (OpenProcess)
  • NtOpenThread (OpenThread)
  • NtSuspendProcess
  • NtSuspendThread (SuspendThread)
  • NtResumeProcess
  • NtResumeThread (ResumeThread)
  • NtGetContextThread (GetThreadContext)
  • NtSetContextThread (SetThreadContext)
  • NtClose (CloseHandle)
  • NtReadVirtualMemory (ReadProcessMemory)
  • NtWriteVirtualMemory (WriteProcessMemory)
  • NtAllocateVirtualMemory (VirtualAllocEx)
  • NtProtectVirtualMemory (VirtualProtectEx)
  • NtFreeVirtualMemory (VirtualFreeEx)
  • NtQuerySystemInformation (GetSystemInfo)
  • NtQueryDirectoryFile
  • NtQueryInformationFile
  • NtQueryInformationProcess
  • NtQueryInformationThread
  • NtCreateSection (CreateFileMapping)
  • NtOpenSection
  • NtMapViewOfSection
  • NtUnmapViewOfSection
  • NtAdjustPrivilegesToken (AdjustTokenPrivileges)
  • NtDeviceIoControlFile (DeviceIoControl)
  • NtQueueApcThread (QueueUserAPC)
  • NtWaitForMultipleObjects (WaitForMultipleObjectsEx)

导入到 Visual Studio

  1. 将生成的 H/ASM 文件复制到项目文件夹中。
  2. 在 Visual Studio 中,转到 项目 → 生成自定义... 并启用 MASM。
  3. 在 解决方案资源管理器 中,将 .h 和 .asm 文件分别作为头文件和源文件添加到项目中。
  4. 转到 ASM 文件的属性,将 项类型 设置为 Microsoft Macro Assembler。
  5. 确保项目平台设置为 x64。目前不支持 32 位项目。

注意事项与限制

  • 目前仅支持 64 位 Windows。
  • 不支持图形子系统 (win32k.sys) 的系统调用。
  • 已在 Visual Studio 2019 (v142) 和 Windows 10 SDK 上测试。

故障排除

  • Python 脚本中出现 ModuleNotFoundError。
    • 请确保使用 pip3 install -r requirements.txt 安装了所需的模块。
  • 类型重定义错误:如果 syscalls.h 中的 typedef 已在其他地方定义,项目可能无法编译。
    • 确保只包含必要的函数(即很少需要 --preset all)。
    • 如果某个 typedef 已在另一个使用的头文件中定义,则可以从 syscalls.h 中移除它。

致谢

本脚本由 @Jackson_T 开发,但建立在许多其他人的工作基础之上:

  • @j00ru 维护机器可读格式的系统调用号。
  • @FoxHex0ne 以机器可读格式编录了许多函数原型和 typedef。
  • @PetrBenes、NTInternals.net 团队 和 MSDN 提供了额外的原型和 typedef。
  • @Cn33liz 提供了最初的 Dumpert POC 实现。

特别感谢 @Dcept905 的测试和建议。

相关文章和项目

  • @0x00dtm: 用户态 API 监控与代码注入检测
  • @0x00dtm: 击败用户态钩子 (以 Bitdefender 为例) (代码)
  • @Cn33liz: 结合直接系统调用和 sRDI 绕过 AV/EDR (代码)
  • @mrgretzky: 从内部击败杀毒软件实时保护
  • @SpecialHoang: 绕过 EDR 的内存保护,钩子入门 (代码)
  • @xpn 和 @domchell: 让 Cylance 沉默:现代 EDR 案例研究
  • @mrjefftang: 通用反钩子:致盲安全软件 (代码)
  • @spotheplanet: 使用 C++ 完全卸载 DLL 钩子
  • @hasherezade: Floki 僵尸网络与隐蔽的加载器
  • @hodg87:

许可证

本项目采用 Apache License 2.0 许可证。

下载工具
最新 Trickbot 变种有了新伎俩
  • @hodg87: 使用直接系统调用时的恶意软件缓解措施