|
[原创]Windows CE 必备开发工具总结(献给想进入Windows CE底层研发的朋友们)
lz很专业,很佩服,向你学习。。。 |
|
|
|
|
|
[原创]创建流氓的快捷方式[带源码]
...... |
|
|
|
|
|
|
|
[求助]ring3 中hook的问题
貌似得进r0把copy-on-write搞掉才可以 |
|
[推荐]100个病毒源码
这玩意太黄太暴力了 |
|
[求助]HOOK API的同步问题
其实可以利用EVENT对象来通知的。 g_hEvent = ::CreateEvent(NULL, TRUE, //手动设置EVENT的状态,这里选择手动设置,因为只有手动设置的时候,当线程函数得到信号量通知时,所有 //等待在该EVENT对象的线程才会运行起来。拿到你的例子中就是 //当你运行完真实的api(被hook前的)后,然后运行那段替换入口点函数的代 //码(这时hook掉原函数,用你的假函数替换之),然后调用SetEvent,这时所有 //等待在这个对象上的线程才可以运行 FALSE, //未受信的(nonsignaled) NULL); ============== 大体代码: g_hEvent 全局变量 g_hEvent = ::CreateEvent(NULL,TRUE, FALSE, NULL); //此时由于信号量是没有信号的状态,其他等待该信号的线程不会运行的,也就是不会运行真实的api了。这里你就可以想运行真实的api多少次就多少次。 ...........//调用真实api的处理过程 然后是hook api的过程。。。 完了以后记得设置::SetEvent(g_hEvent); 将信号设置为有信号状态,这时等待的线程由于得到了运行的提示,所有等待的线程才可以运行 其他 线程的入口点必须加上如下代码: VOID ThreadProc() { ::WaitForSingleObject(g_hEvent, INFINITE); 。。。。。//这里是原先线程处理函数的代码 } =================== 写完了回复才发现,这段代码只是适合你自己写的线程处理函数 。如果其他的线程(比如记事本的主线程)调用你的api的时候,线程函数的执行代码前必须加上 WaitForSingleObject(g_hEvent, INFINITE); 这是比较难做到的。毕竟你不知道是哪个线程要调用。 仅提供思路,高手继续跟帖,自己也跟着学习一下。。。 |
|
[讨论]这个dll居然没法被加载,神也,奇也,神奇是也
DWORD *thisaddr; while(thunk_data->u1.Function) //遍历每个函数的地址 { thisaddr=(DWORD*)&(thunk_data->u1.Function); if ((DWORD)thisaddr==(DWORD)oldapi) //终于找到我们要的函数了 { 貌似应该是 *thisaddr吧 |
|
[求助]关于定位IAT的一个函式的疑问
我晓得了,多谢虾哥指点 |
|
[求助]关于定位IAT的一个函式的疑问
你说的我理解了,还有几点不理解: 1.具体的PE装载器将PE文件装入内存没有改变PE文件的结构是指什么,是pe结构的各个成员大小没有改变(这是肯定的了),还包括什么?比如成员之间的间距之类的。。。 2.假如我的pe文件大于4k(不妨设为5k),文件映射是以4k(x86结构的内存页文件大小)为基本单位的,这个时候,pe文件是怎么 映射到内存中的呢?是文件的前4k映射到第一个页文件,文件的后1k映射到第二个页文件的前1k(也就是说映射的时候和pe文件的结构是一样的)吗?(我们暂且假设系统把整个pe文件全部映射到内存中) 3.比如我自己写一个pe分析工具,我在操作的时候,是用文件映射的方式读取的吧,但是这时候我怎么还能够看出来某些结构的RVA呢?(这时候pe装载器还没有装载pe文件,应该还不知道imagebase那,毕竟imagebase可以自己指定) 既然windows pe装载器没有载入,那么我怎么能够确定某一结构的RVA呢? 希望给以指点,谢谢 |
|
[原创]对sizeof()操作符的理解
c++ primer 4th上面介绍的应该是最详细的了 |
|
[求助]关于变量在缓冲区的存储问题
真的是如楼主所说的会编译不过吗? 我在vc下没有问题 顺便再附上反汇编的代码,说明一下: #include <stdio.h> 2: #include <string.h> 3: //char a[]="aaaabbbbccccddddeeeeffffgggghhhh"; 4: int main() 5: { 0040D6F0 push ebp 0040D6F1 mov ebp,esp 0040D6F3 sub esp,68h ;debug模式下会预留出一部分的空间分配局部变量 0040D6F6 push ebx 0040D6F7 push esi 0040D6F8 push edi 0040D6F9 lea edi,[ebp-68h] ;默认会以cccc填充这一部分预留空间 0040D6FC mov ecx,1Ah 0040D701 mov eax,0CCCCCCCCh 0040D706 rep stos dword ptr [edi] 6: char a[]="aaaabbbbccccddddeeeeffffgggghhhh"; 0040D708 mov ecx,8 0040D70D mov esi,offset string "aaaabbbbccccddddeeeeffffgggghhhh"... (00422fa8) 0040D712 lea edi,[ebp-24h] ;此时还有预留空间哦。。。 0040D715 rep movs dword ptr [edi],dword ptr [esi] 0040D717 movs byte ptr [edi],byte ptr [esi] 7: char b[4]; 8: 9: strcpy(b,a); 0040D718 lea eax,[ebp-24h] 0040D71B push eax 0040D71C lea ecx,[ebp-28h] 0040D71F push ecx 0040D720 call strcpy (00401060) 0040D725 add esp,8 10: printf("b:%s\na:%s",b,a); 0040D728 lea edx,[ebp-24h] 0040D72B push edx 0040D72C lea eax,[ebp-28h] 0040D72F push eax 0040D730 push offset string "b:%s\na:%s" (00422f9c) 0040D735 call printf (0040d670) 0040D73A add esp,0Ch 11: 12: return 0; |
|
[求助]请问:怎样设置鼠标指针为自定义图片?
用setclasslong设置鼠标的样式。 |
|
[求助],在VC6.0中如何设置,可以在OD中有源码显示呢.
你用IDA反汇编,基本上就是源码了。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值