流沙团
win驱动开发(一)
2018-11-1 流沙团


0x01 说明



测试驱动开发HelloWorld







0x02文件准备



hello.c










#include <ntddk.h>

VOID DriverUnload(PDRIVER_OBJECT pDriverObject)
{
DbgPrint("Goodbye Gyarmy\n");
}

NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegPath)
{
pDriverObject->DriverUnload = DriverUnload;
DbgPrint("Hello Gyarmy!\n");
return STATUS_SUCCESS;
}






makefile










!IF 0

Copyright (C) Microsoft Corporation, 1999 - 2002

Module Name:

makefile.

Notes:

DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
file to this component. This file merely indirects to the real make file
that is shared by all the components of Windows NT (DDK)

!ENDIF

!INCLUDE $(NTMAKEENV)\makefile.def


















SOURCES






TARGETNAME=TestNew
TARGETPATH=Debug
TARGETTYPE=DRIVER

SOURCES=hello.c










0x03 执行



选择winddk的编译环境



定位到目录: bld 直接编译







0x04 监测运行



使用dbgview进行输出监测



使用驱动加载工具V1.3 进行运行



微信截图_20181101123129.png













评论:
流沙
2019-07-22 20:59 回复
@crack主动脉:梦无极的驱动开发
crack主动脉
2019-07-19 18:27 回复
博主,你看的哪套教程
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容