avatar
Articles
210
Tags
95
Categories
22

Theqiqi_blog
Search

Theqiqi_blog

windows驱动开发9.关于打印函数的几种使用方式
Created2025-03-13|Drvier|C•Drvier•WindowsDriver
1.驱动输出函数1. KdPrint函数1234567891011121314151617#include<ntifs.h>void DriverUnload(PDRIVER_OBJECT DriverObject){ KdPrint("qi:进入卸载例程DriverObject=%p");}NTSTATUS DriverEntry( _In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath){ DriverObject; RegistryPath; KdPrint("qi;进入 DriverEntry入口点DriverObject=%p\n"); return 0;} 2. DbgPrintEx函数123456789101112131415161718#include <ntifs.h>#pragma warning (disable : 4100)NTS ...
windows驱动开发8.HelloWorld驱动程序是如何一步步完整的
Created2025-03-13|Drvier|C•Drvier•WindowsDriver
1.使用vs2022创建KMDF空项目 选择Kernel Mode Driver, Empty(KMDF) 源文件夹添加entry.c entry.c添加驱动入口函数 1234int DriverEntry(){ return 0;} 编译成功,但是没什么用。 如果出现Inf2Cat错误,关闭Inf2Cat或者在Inf2Cat选项中使用本地时间。 如果出现spectre缓解错误,下载缓解库版本SKD或者在项目中关闭spectre缓解。 如果之后的驱动程序加载失败试着在项目属性->Driver Settings中设置Target Platform为Desktop。 2.使用标准入口函数 修改代码 12345678910#include <ntifs.h>NTSTATUSDriverEntry( _In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath){ return 0;} 解决报错 问题: 123Error C2 ...
windows驱动开发7.通过网络配置Windbg远程调试环境
Created2025-03-13|Drvier|C•Drvier•WindowsDriver
1. 在被调试的机器中开启调试模式并在命令行设置远程端口 查看信息 1bcdedit 开启调试模式 12345bcdedit -debug onbcdedit /debug on#在设备管理器中查看busparams的值#Location PCI Slot 160 (PCI bus 3, device 0, function 0)bcdedit /set "{dbgsettings}" busparams 3.0.0 开启网络调试,ip设置为主机地址而非被调试的ip 1bcdedit /dbgsettings net hostip:192.168.1.16 port:50005 key:2steg4fzbj2sz.23418vzkd4ko3.1g34ou07z4pev.1sp3yo9yz874p 显示信息确认 1bcdedit /dbgsettings 重启命令 1shutdown -r -t 0 如果需要windows10打开测试模式 12bcdedit /set nointegritychecks onbcdedit /set t ...
windows驱动开发6.Debuview查看Windows驱动的打印内容
Created2025-03-13|Drvier|C•Drvier•WindowsDriver
Debuview查看Windows驱动的打印内容 下载DebugView.exe DebugView下载链接 运行DriverMonitor.exe。 运行DebugView.exe。 DebugView中选中Cpature Kernel, Enable Verbose Kernel Output, Capture Events。 在DriverMonitor中点击open打开HelloWorld.sys驱动,点击go运行。 在DebugView中观察输出。
windows驱动开发5.怎么在Widows11中加载驱动程序
Created2025-03-13|Drvier|C•Drvier•WindowsDriver•DriverMonitor
怎么在Widows11中加载驱动程序方法一:使用微软提供的DriverMonitor.exe加载 [DriverMonitor下载链接](http ://www.rsdown.cn/down/165643.html) DriverMonitor中点击open加载驱动, 点击go运行驱动 方法二:使用命令行创建服务加载1234#1.创建服务#2.启动驱动#3.关闭驱动#4.卸载驱动 管理员打开cmd加载驱动 1sc create guidehacking type= kernel binpath="D:\Desktop\test\visual\studio\Hacking\Hacking\x64\Release\Hacking.sys" 使用debugView并勾选Caputure kernel 开始运行驱动 1sc start guidedhacking cmd停止驱动 1sc stop guidedhacking 方法三:使用C语言程序调用系统命令加载✅ 使用 popen() 调用 sc 命令并获取输出的完整 C 程序 1234567 ...
windows驱动开发4.怎么对windows驱动程序签名
Created2025-03-13|Drvier|C•Drvier•WindowsDriver
1.准备证书从微软处购买证书找到泄漏的过期签名证书2.签名方法一: 使用签名软件签名方法二:使用微软签名软件签名打开x64 Native Tools Command Prompt for VS 2022->切换到驱动程序路径 1signtool sign /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 /f cert.pfx /p password driver.sys 测试签名方法一:使用Signer 64Signer(驱动数字签名工具) V1.2 绿色安装版 方法二:使用微软自带工具与测试证书签名 安装wdk后导出测试证书,存储位置:个人(Personal) → 证书。导出到驱动程序路径。 打开x64 Native Tools Command Prompt for VS 2022->切换到驱动程序路径 1signtool sign /f WDK.pfx /p 123 /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 HelloWorld.s ...
windows驱动开发3.怎么在vs2022中将C语言代码编译为Windows驱动程序
Created2025-03-13|Drvier|C•Drvier•WindowsDriver
怎么在vs2022中将C语言代码编译为Windows驱动程序 在VS2022中新建KMDF空项目起名为HelloWorld. VS2022中选择realease与x64. 添加源文件entry.c并输入源码 12345678910111213141516171819202122232425#include <ntddk.h>//卸载驱动函数VOID DriverUnload(PDRIVER_OBJECT pDriver){ pDriver; //打印函数 KdPrint(("驱动卸载成功\r\n"));}//加载驱动函数NTSTATUS DriverEntry(PDRIVER_OBJECT pDriver, PUNICODE_STRING pReg){ pDriver; pReg; //打印函数 KdPrint(("驱动加载成功\r\n")); KdPrint(("我的第一个驱动程序\r\n")); //指定卸载驱动函数 ...
windows驱动开发2.怎么在VS2022中配置windows驱动编译环境
Created2025-03-13|Drvier|C•Drvier•WindowsDriver
怎么在VS2022中配置windows驱动编译环境? 下载安装Visual Studio2022 通过Visual Studio Installer安装SDK22621 组件中安装”Windows Driver Kit” 下载安装对应的WDK 例如windows11 22621 其他 WDK 下载
windows驱动开发1.windows驱动打印helloworld
Created2025-03-13|Drvier|C•Drvier•WindowsDriver
1.HelloWorld驱动程序 加载时的入口 卸载时的函数 12345678910111213141516171819202122232425#include <ntddk.h>//卸载驱动函数VOID DriverUnload(PDRIVER_OBJECT pDriver){ pDriver; //打印函数 KdPrint(("驱动卸载成功\r\n"));}//加载驱动函数NTSTATUS DriverEntry(PDRIVER_OBJECT pDriver, PUNICODE_STRING pReg){ pDriver; pReg; //打印函数 KdPrint(("驱动加载成功\r\n")); KdPrint(("我的第一个驱动程序\r\n")); //指定卸载驱动函数 pDriver->DriverUnload = DriverUnload; //返回值 STATUS_SUCCESS 代表成功 r ...
4. 使用网卡抓包
Created2025-02-06|C语言在Windows中实现抓包|C•WinSock•TCP•Capture•Ethernet•Npcap•Ipv6
网卡抓包1.安装npcap程序与sdk2.抓包并打印长度 创建项目 在项目中包含头文件与库文件 编写代码 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879#include <stdio.h>#include <stdlib.h>#include "pcap.h"#pragma comment(lib,"wpcap.lib")#pragma comment(lib,"packet.lib")// 回调函数,处理捕获到的每个数据包void packet_handler(u_char* param, const struct pcap_pkthdr* header, const u_char* pkt_data) { printf("P ...
1…567…21
avatar
Theqiqi
Articles
210
Tags
95
Categories
22
Follow Me
Announcement
This is my Blog
Recent Post
101.使用Grop网站提供的api2026-01-03
9.压测2025-03-27
8.Linux Socket并发模型http服务器2025-03-27
7.web服务器中收发REST接口2025-03-27
6使用c语言与linux系统写一个web服务器,解析并响应get与post请求2025-03-27
Categories
  • C with Socks16
  • C_Sound10
  • C_Windows_Graphi9
  • Cpp5
  • Cpp_Socket4
  • C语言在Windows中实现抓包4
  • C语言的万种用法9
  • Debian1
Tags
C++ Websocket Socks5 REST API rufus ISO cmake c_windows_driver OpenGl Debian MySql mysql Drvier x86汇编程序 System qemu Http http AI first pragram Direct2D TCP 64位汇编程序 Linux Desktop make WindowsDriver link nasm Socks html ipv6 Cmake Python windows driver Ipv6 sql UltraISO Capture Socket
Archives
  • January 20261
  • March 202558
  • February 202523
  • September 20242
  • August 202471
  • June 20242
  • March 20245
  • February 20248
Info
Article :
210
UV :
PV :
Last Update :
©2020 - 2026 By Theqiqi
Framework Hexo|Theme Butterfly
Search
Loading the Database