|
[原创]通过DDK Driver直接写显卡内存
为什么不使用DirectX直接写,应该更方便吧。 |
|
win7 上调用 SetWindowsHookEx
你有试过用administrator运行程序嘛? |
|
[求助]这种call的作用是???
SEH的序言函数_seh_prolog之类的,应该都是些简单的指令,目的是保存原来的EBP,然后初始化新的EBP,构造函数调用帧。 prev_er dd ? ; prev _EXCEPTION_REGISTRATION_RECORD handler dd ? ; handler msEH_ptr dd ? ; scopetable disabled dd ? ; trylevel currentframe dd? ; ebp 从这段代码分析,外面call的时候会压栈返回地址,就在这个返回地址的地方保存原来的EBP,然后使用这个地址作为新函数的EBP,相当于 push ebp; mov ebp, esp; 开头的2个push分别是trylevel和scopetable,然后是handler和原来的fs:[0], 感觉少一个push,这段代码可能不完整。 不知道你的问题具体是什么? |
|
[讨论]关于FS寄存器
这是什么系统的结构? 嗯,其实用windbg看下就好了吧。 0: kd> dt nt!_kpcr 84975c00 +0x000 NtTib : _NT_TIB +0x000 Used_ExceptionList : 0xbfaa7a94 _EXCEPTION_REGISTRATION_RECORD +0x004 Used_StackBase : (null) +0x008 Spare2 : (null) +0x00c TssCopy : 0x801ed000 Void +0x010 ContextSwitches : 0x7c38e4 +0x014 SetMemberCopy : 1 +0x018 Used_Self : 0x7ffdd000 Void +0x01c SelfPcr : 0x84975c00 _KPCR +0x020 Prcb : 0x84975d20 _KPRCB ...... +0x0dc KernelReserved2 : [17] 0 +0x120 PrcbData : _KPRCB 120是PrcbData,offset 4的地方是_KPRCB中放kthread指针, 0: kd> dt _kthread ntdll!_KTHREAD +0x000 Header : _DISPATCHER_HEADER +0x010 CycleTime : Uint8B +0x018 HighCycleTime : Uint4B +0x020 QuantumTarget : Uint8B +0x028 InitialStack : Ptr32 Void +0x02c StackLimit : Ptr32 Void +0x030 KernelStack : Ptr32 Void +0x034 ThreadLock : Uint4B +0x038 WaitRegister : _KWAIT_STATUS_REGISTER +0x039 Running : UChar +0x03a Alerted : [2] UChar +0x03c KernelStackResident : Pos 0, 1 Bit +0x03c ReadyTransition : Pos 1, 1 Bit +0x03c ProcessReadyQueue : Pos 2, 1 Bit +0x03c WaitNext : Pos 3, 1 Bit +0x03c SystemAffinityActive : Pos 4, 1 Bit +0x03c Alertable : Pos 5, 1 Bit +0x03c GdiFlushActive : Pos 6, 1 Bit +0x03c UserStackWalkActive : Pos 7, 1 Bit +0x03c ApcInterruptRequest : Pos 8, 1 Bit +0x03c ForceDeferSchedule : Pos 9, 1 Bit +0x03c QuantumEndMigrate : Pos 10, 1 Bit +0x03c UmsDirectedSwitchEnable : Pos 11, 1 Bit +0x03c TimerActive : Pos 12, 1 Bit +0x03c SystemThread : Pos 13, 1 Bit +0x03c Reserved : Pos 14, 18 Bits +0x03c MiscFlags : Int4B +0x040 ApcState : _KAPC_STATE ...... offset 44其实访问了_KAPC_STATE结构中了。 0: kd> dt _kthread apcstate. 887c9030 ntdll!_KTHREAD +0x040 ApcState : +0x000 ApcListHead : [2] _LIST_ENTRY [ 0x887c9070 - 0x887c9070 ] +0x010 Process : 0x8c8e73e8 _KPROCESS +0x014 KernelApcInProgress : 0 '' +0x015 KernelApcPending : 0 '' +0x016 UserApcPending : 0 '' +0x040 ApcStateFill : [23] "p???" +0x134 ApcStateIndex : 0 '' +0x168 ApcStatePointer : [2] 最后说下,我的系统是Win 7,KProcess字段应该是offset 50才对。你的代码可能是XP的或者是更早的系统。使用IDA找了一段代码看,确实如此。 mov eax, large fs:124h ; _kthread mov eax, [eax+_KTHREAD.___u12.ApcState.Process] ; _kproces (50h) |
|
对int3断点实现的一些疑惑
相互学习,你的问题也开启了我的思路,我以前真没想过断点处理时的pushf. |
|
对int3断点实现的一些疑惑
大多数调试器对当前的断点就是这么做的啊。先恢复当前eip下的指令,然后单步,单步后再把刚才的指令修改成0xcc,然后继续执行。 pushf我觉得是个特例,作为单字节指令,也可以特殊化处理。比如把下条指令变成CC,然后内部处理掉就是。 还可以想象下,假设pushf没有特殊化处理可能的结果是什么? 原来的pushf,栈中的word没有T标志,修改后的pushf,栈中的word多了个T标志。对客户程序有什么样的影响?客户会怎么样使用这个flag?好象没有。 |
|
[求助]C++大牛进
没有什么指点的,看看<<exceptional c++ style>>,如果你能够做到上面说的,就已经毕业了。 |
|
[求助]那位大大给个SetConsoleMode 的说明地址
MSDN上有,http://msdn.microsoft.com/en-us/library/ms686033(v=vs.85).aspx,你如果使用chrome,可以翻译成中文。 |
|
[求助]关于PostThreadMessage能实现进程间通信吗?
晕,现在才看到后面的回复,原来是DispatchMessage的问题。 其实就这个问题而言,没有必要一定使用PostThreadMessage的,PostMessage也可以的。 |
|
[求助]关于PostThreadMessage能实现进程间通信吗?
这个问题有点意思,就我以前的经验,dialog也是个普通的window,创建的代码类似如下: CreateDialog(...,DefDlgProc,...) while( GetMessage() ) { ... DispatchMessage(); } DefDlgProc() { ... UserDlgProc(); } 如果UserDlgProc收不到消息,那么可能是DispatchMessage之前做了检查或者DefDlgProc里做了检查。楼主可以试下窗口子类化,使用自己的窗口过程替换缺省的Windows的,看看能不能收到消息,如果还不行,估计就是DispatchMessage之前做的检测了。那也只能使用GetMessage HooK了。 |
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值