|
[求助]windows生成dump驱动的原理
在XP上是不行的,你是不是高版本系统? 在VISTA以后,系统开始支持多种PORT DRIVER来做DUMP,你看看XP和WIN7的IoGetDumpStack的变化就知道了。 Win7上改用crashdmp.sys这个驱动来专门实现port driver加载,对于在\Device\ScsiPortX建立符号链接或设备的驱动,仍是支持的(称为Legacy Port Driver) 对于Iastor这类的port driver,则是在crashdmp!CrashDmpLoadDumpStack中调用QueryPortDriver QueryPortDriver获取dump driver的关键在于向磁盘设备发送IOCTL_SCSI_GET_DUMP_POINTERS设备控制 返回结果中就指明了要加载的dump driver的设备驱动,这是除ScsiPort这种legacy方式外另一种dump port driver的加载方式,也就是你的问题的答案。 分析一下iastor.sys就知道该驱动是实现了对IOCTL_SCSI_GET_DUMP_POINTERS的支持的,当然光实现这个还不行的。 所以就你的问题来说,还是用scsiport来解决比较方便,不过我看你的原始问题其实不是dump,而是休眠?那就是另一个问题了。 关于dump port driver,搜了下有人也做过一些分析 http://hi.baidu.com/heartdbg/item/54ed1185f85e57844414cfd1 http://crashdmp.wordpress.com/crash-mechanism/overview/ |
|
[求助]windows生成dump驱动的原理
所以让你看看IopGetDumpStack啊。。。 它首先给打开启动的磁盘设备(IoArcBootDeviceName,比如\ArcName\multi(0)disk(0)rdisk(0)partition(1),这是个符号链接,通常指向启动的分区设备,如\Device\Harddisk0\Partition1 然后发送IOCTL_SCSI_GET_ADDRESS,然后取到SCSI_ADDRESS->PortNumber 接着在加载dmp_xxx.sys驱动时,这样处理,使用\Device\ScsiPort[SCSI_ADDRESS->PortNumber] 路径,打开设备(如\Device\ScsiPort0) 获取设备的 DriverObject->DriverName,然后去加载对应的驱动文件,路径拼接的方式是从 DriverName取到文件名(例如\Driver\123,则为123),然后就会加载\systemroot\system32\123.sys 123.sys在通过MmLoadSystemImage使用perfix(“dump_"),于是在load data table entry(加载模块列表)里的名字就成了dump_123.sys ,但实际上加载的PE还是123.sys 所以,如果你确定你的驱动没被加载,你要看看这么几个问题: 1. 什么系统,至少XP是这样的 2. port number是否是boot device所在的那个 3.驱动是否在driver路径下,记得加载的是123.sys,而不是dump_123.sys,只是加载列表的名字是那个。 其实调试下IopGetDumpStack有什么问题也就很清楚了。 |
|
[求助]windows生成dump驱动的原理
看SystemCrashDumpStateInformation 你的Driver(DriverObject) 创建一个\Device\ScsiPortX(X=0,1,2....) , 如果DriverObject对应的名字是123 最后就会加载dmp_123.sys 可以看看: nt!IopGetDumpStack 这个函数。 不过貌似WIN7已经没有这套机制了 |
|
[原创]水貼:關於KiFastCallEntry的新玩法---過保護的同學注意啦
过时了,新版不是这样了 |
|
|
|
[求助]监控windows系统的所有打印机
私信我说的ring3方法不比ssdt hook弱的。 |
|
[原创]记为何Attach到其他进程后不能用目标进程的句柄表
detach后就可以使用了啊。 |
|
[原创]记为何Attach到其他进程后不能用目标进程的句柄表
谁告诉你的attach process不会切换句柄表的,明明是attach process过去,就可以访问目标进程的句柄表了啊,wowocock这误人子弟呀。 为什么attach process后就能访问对方进程句柄表呢,这个说起来也简单, 因为使用句柄时通常是用ObReferenceObjectByHandle,也就是说句柄值得意义就体现在这里了,这个函数是怎么获取的当前进程句柄表呢: HandleTable = PsGetCurrentProcessByThread(Thread)->ObjectTable; 而PsGetCurrentProcessByThread得实现: #define PsGetCurrentProcessByThread(xCurrentThread) (ASSERT((xCurrentThread) == PsGetCurrentThread ()),CONTAINING_RECORD(((xCurrentThread)->Tcb.ApcState.Process),EPROCESS,Pcb)) 也就是说他是从当前线程的tcb->ApcStateProcess取的进程(然后取该进程的句柄表),而KeStackAttachProcess->KiAttachProcess则会修改Thread->ApcState.Process = Process; 通俗地解释一下, 也就是说attach 到目标进程后,当前线程使用的句柄表 就 是目标进程的,也就是说你可以直接使用目标的句柄 例如attach到目标进程后,使用对方的文件句柄read file 当然,由于当前attach时,没有进入rundown的锁中,当目标进程意外退出时,可能发生问题,所以带锁的ZwDuplicateObject是一个比较稳定的用法 但是ZwDuplicateObject也是存在一些弊端,例如,对于实现了OpenProcedure方法,且在方法中禁止打开的对象类型(例如ALPC Port对象、EtwRegistration对象),就无法进行duplicate,因为duplicate也会触发OpenProcedure和句柄增加,而attach就没这个问题。 对于vista以上的系统,可以使用PsAcquireProcessExitSynchronization/PsReleaseProcessExitSynchronization组合来申请和释放process rundown,这样就可以安心地attach进程并使用对方的句柄表了。 |
|
[求助]关于win32k.sys的疑问
跟fs没关系,是cc(Cache manager). |
|
[求助]关于win32k.sys的疑问
应用层都是同个control area,代码段共享同样的物理内存。和session没关系。 |
|
|
|
[求助]如何让程序开机自动启动,并以管理员权限运行。
其实appinit并没取消,只是要再打开一个注册表项。 |
|
[分享]抄抄改改过win7,win8,win8.1 x64的强制签名(DSE)
这个跟原文差距好大。 |
|
[讨论]那些年搞驱动的那些坑_欢迎补充
DISPATCH LEVEL就不会做线程切换了。这是由于负责线程切换,抢占的代码就是运行在 IRQL DISPATCH_LEVEL,而 IRQL 小于等于当前 IRQL 的中断不能发生。 所以当,irql 为 DISPATCH_LEVEL,根本就不会发生线程切换,线程抢占之类的事情。 |
|
[讨论] win7 USB 插拔 有系统记录吗? 进来讨论一下
lastWriteTime不是键值,是键的属性,不是给你这个链接了吗? http://msdn.microsoft.com/en-us/library/ms724902(VS.85).aspx |
|
[讨论]过数字签名病毒原理~~
过数字签名的方法是有的,可以制造出签名完全合法的(不是碰撞/购买/盗用等等,正规厂商的正规签名)EXE 这个玩法在地下已经玩了快十年了,其实最近微软把怎么用的方法都公布了,仔细留意点就能找到。不过大家慢点玩,今年6月微软就把这个技术封掉了。 |
|
[讨论]那些年搞驱动的那些坑_欢迎补充
可以看看新版的,稳定性,性能和构架都又回到领先地位。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值