百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
K

KernelSharp

> 编程语言
开源

使用 NativeAOT 的 C# 内核模式驱动示例

192 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用 NativeAOT 的 C# 内核模式驱动示例

KernelSharp

This is an example of how to use NativeAOT to compile C# code to a Windows Kernel Mode driver. This repository contains parts of https://github.com/ZeroLP/ZeroKernel.

If you want to see an example of a full memory R/W Driver using this, check out my repo https://github.com/VollRagm/KernelBypassSharp.

Compiling

Open the build.bat and fix the file paths. ILCPATH is located at C:\Users\\username\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-alpha.1.21430.2\tools, ntoskrnl.lib is located in the WDK install path. Run x64 Native Tools Command Prompt for VS 2019, cd into the project directory and run build.bat. You can load the driver or map it with kdmapper.

Creating a project

Follow the Quick start guide to create a new native project. After that simply edit the project file itself and add all properties from the project in this repository. After including WDK.cs and the Runtime folder in your project you will be able to compile it.

Features

  • Call any kernel export
  • Convert C# strings to multibyte characters
  • Reading cr3

Limitations

  • No support for variadic arguments
  • No managed multibyte character string type, conversion is required
  • The native compiler misplaces globally declared strings wrongly, causing a bluescreen when referenced

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言