首页
社区
课程
招聘
[讨论]CMD.EXE是如何访问剪切板的??
2008-12-25 21:24 6674

[讨论]CMD.EXE是如何访问剪切板的??

2008-12-25 21:24
6674
CMD.EXE是如何访问剪切板的??有谁研究过,发现他并不是通过标准剪切板函数访问的,可能是通过RPC 由CSRSS来处理.
看了下XP SP2,由CSRSS的WINSRV.DLL模块中
.text:75B8EB31                mov    edi, edi
.text:75B8EB33                push    ebp
.text:75B8EB34                mov    ebp, esp
.text:75B8EB36                sub    esp, 28h
.text:75B8EB39                push    edi
.text:75B8EB3A                mov    edi, [ebp+arg_0]
.text:75B8EB3D                test    byte ptr [edi+140h], 20h
.text:75B8EB44                jnz    loc_75B8ECBC
.text:75B8EB4A                push    dword ptr [edi+0C0h] ; hWndNewOwner
.text:75B8EB50                call    ds:OpenClipboard
.text:75B8EB56                test    eax, eax
.text:75B8EB58                jz      loc_75B8ECBC
.text:75B8EB5E                mov    eax, [edi+0B0h]
.text:75B8EB64                test    byte ptr [eax+4], 1
.text:75B8EB68                push    ebx
.text:75B8EB69                push    esi
.text:75B8EB6A                jz      short loc_75B8EBA4
.text:75B8EB6C                push    0Dh            ; uFormat
.text:75B8EB6E                call    ds:GetClipboardData
.text:75B8EB74                mov    esi, eax
.text:75B8EB76                test    esi, esi
.text:75B8EB78                jz      loc_75B8ECB4
.text:75B8EB7E                push    esi            ; hMem
.text:75B8EB7F                call    ds:GlobalLock
.text:75B8EB85                push    esi            ; hMem
.text:75B8EB86                mov    ebx, eax
.text:75B8EB88                call    ds:GlobalSize
.text:75B8EB8E                shr    eax, 1
.text:75B8EB90                push    eax
.text:75B8EB91                push    ebx
.text:75B8EB92                push    edi
.text:75B8EB93                call    sub_75B8E7E2
.text:75B8EB98                push    esi            ; hMem
.text:75B8EB99                call    ds:GlobalUnlock
.text:75B8EB9F                jmp    loc_75B8ECB4
.text:75B8EBA4 ; -----
sub_75B8E7E2中完成的数据传送 ,不过在里面迷路了。。。。。。
愣是没找到关键点,谁有兴趣研究看下?
在DEBUGMAN没人回答,到这里来碰碰运气看.

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

收藏
点赞0
打赏
分享
最新回复 (5)
雪    币: 635
活跃值: (101)
能力值: ( LV12,RANK:420 )
在线值:
发帖
回帖
粉丝
qihoocom 9 2008-12-25 21:35
2
0
楼主这个问题问了3个多月了,还没搞定啊?
雪    币: 399
活跃值: (38)
能力值: (RANK:350 )
在线值:
发帖
回帖
粉丝
stalker 8 2008-12-25 21:54
3
0
万能的杀哥也不知道么?
雪    币: 331
活跃值: (57)
能力值: ( LV7,RANK:100 )
在线值:
发帖
回帖
粉丝
better 2 2008-12-25 22:04
4
0
我认为那个黑乎乎的窗口不是cmd.exe,正真的窗体代码应该封装在user32.dll中,访问剪贴板的代码也应该不在cmd.exe中,,,,
雪    币: 405
活跃值: (1950)
能力值: ( LV4,RANK:50 )
在线值:
发帖
回帖
粉丝
wowocock 1 2008-12-26 16:31
5
0
所以到这里来碰碰运气,不过感觉运气都不则么好,郁闷......
雪    币: 182
活跃值: (50)
能力值: ( LV6,RANK:90 )
在线值:
发帖
回帖
粉丝
pathletboy 2 2008-12-26 19:40
6
0
内核调试器,断OpenClipboard你就该有答案了。
游客
登录 | 注册 方可回帖
返回