Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
lithium-kernel — Windows 内核模式驱动程序,带有用户模式客户端,暴露基于 IOCTL 的物理和虚拟内存读写、页表遍历、模式扫描以及用于游戏作弊的输入模拟功能。 | Kitploit
工具/GitHubGitHub/gmh5225/lithium-kernel
内存取证逆向工程反机器人二进制利用
GitHubgmh5225/lithium-kernel

lithium-kernel

Windows 内核模式驱动程序,带有用户模式客户端,暴露基于 IOCTL 的物理和虚拟内存读写、页表遍历、模式扫描以及用于游戏作弊的输入模拟功能。

查看仓库
122个月前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

██╗     ██╗████████╗██╗  ██╗██╗██╗   ██╗███╗   ███╗
██║     ██║╚══██╔══╝██║  ██║██║██║   ██║████╗ ████║
██║     ██║   ██║   ███████║██║██║   ██║██╔████╔██║
██║     ██║   ██║   ██╔══██║██║██║   ██║██║╚██╔╝██║
███████╗██║   ██║   ██║  ██║██║╚██████╔╝██║ ╚═╝ ██║
╚══════╝╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝ ╚═════╝ ╚═╝     ╚═╝

Windows 内核模式驱动框架,带用户模式客户端

Language Platform Arch Mode

[!IMPORTANT]

获取完整项目

解决方案文件可通过 Discord 服务器获取。

有兴趣购买完整源代码?请通过 Telegram 或 Discord 联系我:@tonythimself。


概述

Lithium 是一个 Windows 内核模式驱动(lithium-kernel),搭配一个用户模式客户端(lithium-usermode)。它通过自定义 IOCTL 接口进行通信,并暴露底层内存操作、页表遍历和输入设备控制原语。


功能特性

功能描述
物理内存读写通过 MmCopyMemory 直接读写物理地址
虚拟内存读写通过 MmCopyVirtualMemory 进行跨进程虚拟内存访问
DTB 解析通过 PFN 数据库枚举提取目录表基址
页表遍历线性地址转换,带 PML4/PDPT/PD/PT 层级缓存
模式扫描跨进程内存的 IDA 风格签名扫描
内存分配在目标进程上下文中执行 ZwAllocateVirtualMemory
内存保护在目标进程上下文中执行 ZwProtectVirtualMemory
鼠标模拟通过 MouClass 服务回调钩子实现内核级鼠标输入
线程隐藏ETHREAD 字段伪造(起始地址、CID、创建时间等)
NMI 回调禁用用于调试器规避的 NMI 回调抑制
池清理从内核池跟踪器中移除大池表项

项目结构

lithium/
├── lithium-kernel/              # Kernel-mode driver (KMDF)
│   ├── entry.cpp                # DriverEntry entry point
│   ├── core/
│   │   ├── dispatch/            # IOCTL dispatch and request routing
│   │   ├── requests/
│   │   │   ├── directory-table-base/  # DTB resolution & page table walk
│   │   │   ├── image-base/           # Process module base retrieval
│   │   │   ├── mouse/                # Mouse input emulation via MouClass
│   │   │   ├── read-write/           # Physical and virtual memory R/W
│   │   │   └── virtual-memory/       # Allocate, protect, query, pattern scan
│   │   └── utilities/
│   │       ├── kernel/          # Module enumeration, NMI, thread ops
│   │       └── ...              # Pool cleaner, CRT shim
│   └── dependencies/
│       ├── additional/
│       │   ├── crt/             # Minimal CRT implementation
│       │   ├── security/        # skCrypter string encryption, oxorany
│       │   └── structures/      # Shared invoke data structures
│       └── includes.hpp         # Master include header
│
└── lithium-usermode/            # User-mode client
    ├── entry.cpp                # Client entry point
    ├── core/
    │   └── driver/              # IOCTL communication layer
    └── dependencies/
        ├── additional/
        │   └── structs.hpp      # Page table entry unions & helpers
        └── includes.hpp

IOCTL 接口

通信通过挂钩现有驱动(ProcObsrvesx.sys)的 IOCTL 分发例程来建立。加载时,内核模块定位目标驱动,扫描其 IRP 分发处理程序,并用跳板覆盖它,跳转到 lithium 自己的 hooked_ioctl。用户模式客户端打开 \\.\ProcObsrvesx,所有 IOCTL 都通过该钩子透明重定向。

代码输入结构体操作
invoke_basebase_invoke { pid, handle }获取进程映像基址
invoke_dtbdtb_invoke { pid, dtb }解析目录表基址
invoke_readread_invoke { pid, directory_table, address, buffer, size }读取物理内存
invoke_writewrite_invoke { pid, directory_table, address, buffer, size }写入物理内存
invoke_read_virtualread_virtual_invoke { pid, address, buffer, size }读取虚拟内存
invoke_write_virtualwrite_virtual_invoke { pid, address, buffer, size }写入虚拟内存
invoke_allocateallocate_invoke { pid, type, protection, address, size }分配虚拟内存
invoke_protectprotect_invoke { pid, protection, address, size }更改内存保护
invoke_virtual_queryquery_virtual_invoke { pid, address, mbi }查询虚拟内存信息
invoke_pattern_scanpattern_invoke { pid, signature, address, pattern_address }模式扫描内存
invoke_move_mousemouse_invoke { x, y, flags, button_flags }模拟鼠标输入

内部实现

DTB 解析

驱动遍历 MmGetPhysicalMemoryRanges 返回的物理内存范围,遍历 PFN 数据库以定位自引用 PML4 表项,并验证每个页表层,以确认给定进程的正确目录表基址。

页表遍历

线性到物理地址转换遍历四级 x64 页表层次结构(PML4 → PDPT → PD → PT),并带有逐级缓存。大页(2MB / 1GB)支持以尽力而为的方式包含在内。

鼠标模拟

驱动定位 MouClass 和 MouHID 驱动对象,从 HID 设备扩展中解析 MouseClassServiceCallback,并将 MOUSE_INPUT_DATA 数据包直接注入回调链。

线程隐藏

关键的 ETHREAD 字段——创建时间、起始地址、Win32 起始地址、内核栈、CID 和退出状态——被保存并替换为无害或空值。在拆除时,在线程终止前恢复原始值。


环境要求

  • Windows 10/11 x64
  • Visual Studio 2022 或更高版本,带 Windows Driver Kit (WDK) 10.0.26100.0
  • 一种内核驱动加载方法(测试签名、内核映射器等)

构建

  1. 在 Visual Studio 中打开 lithium.sln
  2. 将配置设置为 Release / x64
  3. 构建 lithium-kernel → lithium-kernel.sys
  4. 构建 lithium-usermode → lithium-usermode.exe

或通过 MSBuild:

msbuild lithium.sln /p:Configuration=Release /p:Platform=x64

用法

#include <core/driver/driver.hpp>

g_driver->initialize_handle();
DWORD pid = g_driver->get_process_id(L"target.exe");
g_driver->attach(pid);

g_driver->image_base = g_driver->get_image_base(0);
g_driver->dtb = g_driver->resolve_directory_table_base();

auto value = g_driver->read<uintptr_t>(g_driver->image_base + 0xOFFSET);
g_driver->mouse_event(-10, -10, 0, 0);

依赖项

  • skCrypter — 编译期字符串加密
  • oxorany — 编译期常量混淆

免责声明

本项目仅供教育和研究目的使用。
仅可在您拥有或获得明确测试许可的系统上使用。
作者不对本软件造成的任何误用或损害负责。


built for research · not for production
下载工具