|
[求助]IDA SDK 和IDC的问题!
木人理,是不是发错地方了?大家随便说说啊! |
|
|
|
[讨论]第15章MS07-014的问题
对,只要把后来异或的那个0x92改为0x88就可以每次都成功了。我仅是从老大说的那八个字节触发后开始分析的,之前触发还真没怎么研究。不知道如何下手,请问Vxasm有什么思路或方法着手呢? |
|
[讨论]第15章MS07-014的问题
问题解决了,将虚拟机还原,重新装office2003,就可以顺利执行计算器。谢谢Vxasm的细心解答。 |
|
[讨论]第15章MS07-014的问题
实在想不出着了,使用了最笨的办法,把通过0x39322143标识定位的真正的shellcode抠出来,用书中调试shellcode的办法: unsighed char shellcode[]={} main() { unsigned char* re = (unsigned char *)shellcode; _asm{ mov edi , re; jmp edi; } } 其中shellcode中需要简单的修改几处地址。跟了一遍,计算器完全可以正常运行。 所以书中你给POC的shellcode应该没有问题的,个人理解问题出在word中,不让生成子程序?还是什么其他的问题,看在小弟调这么费劲的份上,请各位指点下吧 拜托了! |
|
[讨论]第15章MS07-014的问题
你的问题我遇到过,后来重新从网站上下了15章的代码,发现第一次正确生成wc.exe,第二次就错了。后来再运行就变成有时可以,有时不能正确生成。仔细算了下,应该是三次正确生成一次。先和0x88异或,再和0x92异或,重复两次后,就能正确一次 把0x92改成0x88,每次都可以正确生成wc.exe。 个人觉得是POC作者与我们开的玩笑! 有点抓狂了,createprocessA返回1,但是计算器就是没运行起来。跟进createprocess,水平太菜,晕了 |
|
[讨论]第15章MS07-014的问题
非常感谢vxasm的详细答复。 我确实没有注意你第1、2点的分析,看来功力和心细程度还差很多。我再仔细跟一遍看看。 但是我跟到CreateProcessA的时候(之前WC.exe已经释放到同目录下),函数调用够eax是1,应该是运行成功的。将压入栈的参数在C程序下模拟,成功运行wc.exe。但在word运行中只是闪过黑框,WC.exe就是运行不了啊。真是很奇怪。 关于第11点中与0x92异或,我觉得是word会把内存中的数据写回磁盘文件,所以要再恢复成加密状态。个人理解。 再次感谢版主的答复。 |
|
[讨论]第15章MS07-014的问题
自己顶一下,大家帮帮忙! |
|
[讨论]第15章MS07-014的问题
刚才把POC中的shellcode跟了下,笔记如下,有一段还是没搞明白,请各位指点: 1、POC是《0day》书附带光盘中,包含calc.exe,环境:win2000+office2003 2、POC中文件偏移:0xF7ED开始的八字节0x34FF0000 0x300033D4将覆盖某次调用的ebp和ret地址,由于机缘巧合,返回前执行的代码ret 14处(距离ret地址5个地址远)的地址保存的是doc文件中0xF725的代码,所以只要两次返回就可以执行到0xF725的代码。其中0x300033D4就是第二次RET。在本机调试后,改为0x300033C4,可以顺利执行到文件偏移0xF725.但是计算器没有正确执行。 3、书上说0xF725代码是shellcode,但是换成自己的shellcode,word报错,感觉不太象,或有可能有验证保护。这一段始终没有搞明白,水平太菜。。。。。。。 4、分析随后的代码,发现是文件偏移0x16734处的代码,功能是将文件偏移0x18200处的代码逐字节与0x88异或。0x18200处是已经异或过的calc.exe代码。 5、随后执行的是文件偏移0x167ee处的代码,这段代码的功能是根据传入的hash值在PE头中寻找函数地址,后面会反复用到这个函数。 6、第一个寻找的函数是CreateFileMappingA,传入的hash值是BD2BE000 7、第二个寻找的函数是WriteFileEx,传入的hash值是0xC8FF4053 8、第三个寻找的函数是CloseProfileUserMapping,传入的hash值是C8FF4053 9、然后寻找函数CloseHandle,hash值BFD87FEC 10、然后是CreateProcessA,hash值F390B59F,调用createProcess时传入的参数:lpApplicationName为NULL,lpCommandLine为“wc”,不知道没有成功运行计算器是不是这也原因。但是返回值为1,显示成功运行。奇怪了。 11、随后开始对解过码的calc.exe进行再编码,这里很奇怪,当时解码的时候是与0x88异或,但是这里编码却与0x92异或,导致只能正确释放一次计算器文件。将92改为88,解决只能正确释放一次的问题。 12、int 2E |
|
[讨论]第15章MS07-014的问题
谢谢vxasm的及时答复! 我的试验版本是:win2003 11.5604.5606 刚又跟了一段,发现calc.exe在文件偏移0x18200到文件尾,是和0x92异或过的。 顺便问一下:文件偏移:0xf725处的shellcode是啥功能啊,看了半天没分析出来。 后面跟着的shellcode是解码calc.exe,动态载入writefile,createprocess等几个函数,然后启动wc.exe。初步分析,还有很多疑点正在解决中。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值