首页
社区
课程
招聘
请教:碰到sysenter怎么办?
2004-11-29 13:46 5243

请教:碰到sysenter怎么办?

2004-11-29 13:46
5243
走着走着走过了SEH处理,又到CALL zwContinue,接着到了sysenter,然后飞了,怎么办?

//////////////////////////////////////////////////////////
发生异常后按按shift+f7到了这里

77FB4DB3   8B1C24           MOV EBX,DWORD PTR SS:[ESP]
77FB4DB6   51               PUSH ECX
77FB4DB7   53               PUSH EBX
77FB4DB8   E8 ACBDFAFF      CALL ntdll.77F60B69///进去后可以到处理异常的地方,
77FB4DBD   0AC0             OR AL,AL
77FB4DBF   74 0C            JE SHORT ntdll.77FB4DCD
77FB4DC1   5B               POP EBX
77FB4DC2   59               POP ECX
77FB4DC3   6A 00            PUSH 0
77FB4DC5   51               PUSH ECX
77FB4DC6   E8 480BFCFF      CALL ntdll.ZwContinue////进去碰到SYSENTER,飞了。
77FB4DCB   EB 0B            JMP SHORT ntdll.77FB4DD8
77FB4DCD   5B               POP EBX
77FB4DCE   59               POP ECX
77FB4DCF   6A 00            PUSH 0
77FB4DD1   51               PUSH ECX
77FB4DD2   53               PUSH EBX
77FB4DD3   E8 F213FCFF      CALL ntdll.ZwRaiseException

////////////////////////////////////////////////////////////

-----------------------------------------------------------------
01年,知道有软件破解这回事,无奈人太笨,
到现在还没学会:-(

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 1
打赏
分享
最新回复 (3)
雪    币: 213
活跃值: (16)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
d1y2j3 2004-11-29 21:35
2
0
http://www.codeguru.com/Cpp/W-P/system/devicedriverdevelopment/article.php/c8223__1/

System Call Optimization with the SYSENTER Instruction

有些看不懂,/////////////////////////////////////////////////
If you have paid close attention so far, you might have noticed that there is no "SYSEXIT_EIP_MSR" or "SYSEXIT_ESP_MSR" register. So, how does the SYSEXIT instruction know where to return to in the user-mode code that initially called SYSENTER? When you think about it, such information could not be fixed in an MSR because each system call can potentially originate from completely different locations in user-mode. Therefore, it is the responsibility of the caller (the code that calls SYSENTER) to place the address the CPU is to return to after the system call has returned in the EDX register. The caller must also place the current stack pointer (the value of ESP) in the ECX register. The SYSEXIT instruction will then restore the original value in the EIP and ESP by copying the content from EDX and ECX respectively. This will cause the execution to continue at the instruction after the original SYSENTER instruction.

////////////////////////////////////////////////////////////

-----------------------------------------------------------------
01年,知道有软件破解这回事,无奈人太笨,
到现在还没学会:-(
雪    币: 2319
活跃值: (565)
能力值: (RANK:300 )
在线值:
发帖
回帖
粉丝
riijj 7 2004-11-29 23:11
3
0
楼主,为甚么你要跟进 system call 里 ?   
雪    币: 213
活跃值: (16)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
d1y2j3 2004-11-29 23:40
4
0
最初由 riijj 发布
楼主,为甚么你要跟进 system call 里 ?


想看看从那里出来.

/////////////////////////////////////////////

在sysenter指令处的看ECX+B8的值,通常是产生异常的地方,
异常处理完后,返回的地方也在这里

/////////////////////////////////////////////

-----------------------------------------------------------------
01年,知道有软件破解这回事,无奈人太笨,
到现在还没学会:-(
游客
登录 | 注册 方可回帖
返回