|
驱动编程中如何由已知的进程PID获得进程名,不用路径
楼上两位大侠的我在网上也找到过了,仍没有解决 就是关于这个偏移量的问题, //--------------------------------------转载部分------------------------------------------------------ 检查一下EProcess + 0x1FC里这个0x1FC这个偏移量是否和你的系统相同 不要随便拷贝来就用 另外,EPROCESS中的进程名好像是16个字节长度的字符串,它通常是文件名的前16个字符 刚刚学习驱动编程,实现一个hook ssdt中对ntopenrocess这个函数的hook,通过进程名判断是否ntopenprocess是否是对一个特定进程(以notepad.exe为例)进行打开操作,如果是,那么就返回null,不是就正常执行 在网上也查了一下,找到2种方法实现这种转换 1.通过PsLookupProcessByProcessId NTSTATUS status=PsLookupProcessByProcessId((ULONG)pClientId,&EProcess); LPTSTR ProcessName = (LPTSTR)EProcess + 0x1FC; strlwr(ProcessName);//转换成小写 if(memcmp(ProcessName,L"notepad.exe",22)==0) { pProcessHandle=NULL; rc=STATUS_Access_DENIED; } 编译通过了,但是一start就蓝,调试中发现是在PsLookupProcessByProcessId一直循环 请教一下是为什么? 2.通过ZwQueryInformationProcess函数 这个不知怎么实现,希望高手能给出用这个函数实现由进程句柄得到进程名的源代码 //--------------------------------------转载部分------------------------------------------------------ 谢了 |
|
[分享]Delphi驱动开发研究 电子书
强烈支持上面几位大大们的意见,我也是一路VB,VC++,C#然后一心一意DELPHI的,呵呵呵 |
|
|
|
[原创]斗胆也发一个按钮激活程序,附汇编源码
EnumeWindows EnableWindow |
|
[原创]delphi编写驱动
退出的时候仍然会有BUG |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值