|
[分享]Windows_API一日一练
翻了一下,这本书用来参考一下 API 函数还是不错的。 |
|
[原创]最近写的IDA脚本loadmap 1.0(方便Delphi程序分析)
多谢提供,下一个看看。有空测试一下。 |
|
|
|
[原创]用IDA SDK开发的超强Delphi对象识别插件(plugins)
嗯,Pascal string 识别不了也无所谓,用到的时候自己改一下就行了。还是多谢你的插件。 |
|
[求助]ASPack 2.12入口疑问
点右键“分析->从模块中删除分析” |
|
[原创]用IDA SDK开发的超强Delphi对象识别插件(plugins)
例如这样的: CODE:00415E94 dword_415E94 dd 61505C0Ch, 656D6172h, 73726574h, 5Ch CODE:00415E94 ; DATA XREF: Install+307o 如果在 OllyDBG 中看调用的话,会类似这样: 00885AF3 |. BA 945E8800 MOV EDX,00885E94 ; ASCII 0C,"\Parameters\" 对这个字串的识别类似这样: 00885E94 . 0C DB 0C 00885E95 . 5C 50 61 72 6>ASCII "\Parameters\" 00885EA1 00 DB 00 不过 IDA 和你的插件都无法把这个 ASCII 字串识别出来,只能手工在 IDA 中设置。这个可能要求高了一点,呵呵 |
|
[原创]用IDA SDK开发的超强Delphi对象识别插件(plugins)
是个木马资源中捆绑的 dll,完成木马主要功能的。密码是 muma |
|
[原创]用IDA SDK开发的超强Delphi对象识别插件(plugins)
嗯,等你的新版。不过你那个字串识别插件我今天在分析一个 Delphi 的木马中试了一下,有好几个字串没能识别出来。 |
|
[求助]这个壳怎么脱啊?
不要乱盖,我没写过多少脱壳教程。你这种点名是论坛禁止的,点名只能让其他想帮忙的人不愿帮你。希望下次不要再有这种情况。你这个壳是 Krypton 0.2 的主程序,02 年的东西了,现在基本上看不到了,我也当收藏。这个壳很简单的,我记了个笔记,顺便写个脱壳脚本,你自己看吧。 一、OEP: 不忽略所有异常,用异常计数器插件先第一步计数,程序运行起来后CTR+F2重新载入程序,用异常计数器选第二步:带我到 OEP,当程序暂停时,ALT+M 打开内存,在代码段上按 F2 设断点,再回到反汇编窗口,按 SHIF+F9,断下来的时候往下看一下: 004E3A58 8B95 B6BB4100 MOV EDX,DWORD PTR SS:[EBP+41BBB6] 004E3A5E FFE2 JMP EDX ; 跳到 OEP 004E3A60 51 PUSH ECX 004E3A61 836C24 04 06 SUB DWORD PTR SS:[ESP+4],6 那个 JMP EDX 就是跳到 OEP 的。在这条命令上设断,F9,再按 F8,就到 OEP 了: 00401000 6A 00 PUSH 0 ; OEP 00401002 E8 C1100000 CALL 004020C8 00401007 A3 583B4000 MOV DWORD PTR DS:[403B58],EAX -------------------------------------------------------------------------------------------------- 二、输入表: 到 OEP 后,右键选择“分析->从模块中删除分析”,随便找个 API 调用看看,可以知道输入表加密了: 004020C8 - FF25 04D14100 JMP DWORD PTR DS:[41D104] ; 输入表被加密了 004020CE - FF25 0CD14100 JMP DWORD PTR DS:[41D10C] 004020D4 - FF25 10D14100 JMP DWORD PTR DS:[41D110] 004020DA - FF25 14D14100 JMP DWORD PTR DS:[41D114] -------------------------------------------------------------------------------------------------- 现在 CTR+F2 重新载入程序,为方便调试,忽略所有异常。定位到数据窗口,CTR+G 转到我们前面看到的地址 41D104,设内存写入断点。一直按 F9,当断下来看到如下代码时就看到处理输入表的部分了: -------------------------------------------------------------------------------------------------- 004E311F 8907 MOV DWORD PTR DS:[EDI],EAX ; 获取的函数地址送到输入表中的相关位置。如果前面没NOP,这里会加密 004E3121 EB 45 JMP SHORT 004E3168 004E3123 DF69 4E FILD QWORD PTR DS:[ECX+4E] 004E3126 58 POP EAX -------------------------------------------------------------------------------------------------- 删除内存断点,一路 F8 跟跟看: 004E2812 8B95 2C784000 MOV EDX,DWORD PTR SS:[EBP+40782C] ; 处理输入表 004E2818 8B06 MOV EAX,DWORD PTR DS:[ESI] 004E281A 0BC0 OR EAX,EAX 004E281C 75 03 JNZ SHORT 004E2821 004E281E 8B46 10 MOV EAX,DWORD PTR DS:[ESI+10] 004E2821 03C2 ADD EAX,EDX ; 基址+输入表函数RVA 004E2823 0385 1C784000 ADD EAX,DWORD PTR SS:[EBP+40781C] 004E2829 8B18 MOV EBX,DWORD PTR DS:[EAX] 004E282B 8B7E 10 MOV EDI,DWORD PTR DS:[ESI+10] 004E282E 03FA ADD EDI,EDX 004E2830 03BD 1C784000 ADD EDI,DWORD PTR SS:[EBP+40781C] 004E2836 85DB TEST EBX,EBX 004E2838 0F84 B9090000 JE 004E31F7 004E283E F7C3 00000011 TEST EBX,11000000 004E2844 75 2A JNZ SHORT 004E2870 004E2846 F7C3 00000080 TEST EBX,80000000 004E284C 75 22 JNZ SHORT 004E2870 004E284E 03DA ADD EBX,EDX 004E2850 83C3 02 ADD EBX,2 004E2853 813B 46617461 CMP DWORD PTR DS:[EBX],61746146 004E2859 75 0D JNZ SHORT 004E2868 004E285B 817B 04 6C45786>CMP DWORD PTR DS:[EBX+4],6978456C 004E2862 0F84 8F090000 JE 004E31F7 004E2868 899D 6F714000 MOV DWORD PTR SS:[EBP+40716F],EBX 004E286E EB 17 JMP SHORT 004E2887 004E2870 90 NOP 004E2871 90 NOP 004E2872 81EB 00000011 SUB EBX,11000000 004E2878 C1CB 03 ROR EBX,3 004E287B C785 6F714000 0>MOV DWORD PTR SS:[EBP+40716F],0 004E2885 /EB 11 JMP SHORT 004E2898 004E2887 |90 NOP 004E2888 |90 NOP 004E2889 |C00B 02 ROR BYTE PTR DS:[EBX],2 004E288C |43 INC EBX 004E288D |803B 00 CMP BYTE PTR DS:[EBX],0 004E2890 ^|75 F5 JNZ SHORT 004E2887 004E2892 |8B9D 6F714000 MOV EBX,DWORD PTR SS:[EBP+40716F] 004E2898 \90 NOP 004E2899 81E3 FFFFFF0F AND EBX,0FFFFFFF 004E289F 53 PUSH EBX 004E28A0 FFB5 18784000 PUSH DWORD PTR SS:[EBP+407818] 004E28A6 FF95 50BE4100 CALL DWORD PTR SS:[EBP+41BE50] 004E28AC 83BD 6F714000 0>CMP DWORD PTR SS:[EBP+40716F],0 004E28B3 74 13 JE SHORT 004E28C8 004E28B5 8B8D 6F714000 MOV ECX,DWORD PTR SS:[EBP+40716F] ; 解码后的输入表函数ASCII字串 004E28BB 90 NOP 004E28BC 90 NOP 004E28BD 90 NOP 004E28BE D221 SHL BYTE PTR DS:[ECX],CL ; 继续加密原来的函数ASCII字串 004E28C0 3001 XOR BYTE PTR DS:[ECX],AL 004E28C2 41 INC ECX 004E28C3 8039 00 CMP BYTE PTR DS:[ECX],0 004E28C6 ^ 75 F3 JNZ SHORT 004E28BB 004E28C8 0BC0 OR EAX,EAX 004E28CA ^ 0F84 CADFFFFF JE 004E089A 004E28D0 EB 44 JMP SHORT 004E2916 -------------------------------------------------------------------------------------------------- 004E29AF 8985 96714000 MOV DWORD PTR SS:[EBP+407196],EAX ; 保存获取的输入表函数地址 004E29B5 EB 45 JMP SHORT 004E29FC 004E29B7 DF69 4E FILD QWORD PTR DS:[ECX+4E] 004E29BA 58 POP EAX -------------------------------------------------------------------------------------------------- 004E30D5 8B85 A6714000 MOV EAX,DWORD PTR SS:[EBP+4071A6] ; 加密输入表的,NOP掉 004E30DB EB 38 JMP SHORT 004E3115 004E30DD DF69 4E FILD QWORD PTR DS:[ECX+4E] 004E30E0 58 POP EAX -------------------------------------------------------------------------------------------------- 三、脱壳脚本: /* Script written by CCDebuger Script : Krypton 0.2 Unpack 版本 : v0.1 日期 : 17-04-2009 调试环境 : OllyDbg 1.1, ODBGScript 1.65, WINXP, WIN2000 调试选项 : 设置 OllyDbg 忽略所有异常选项 工具 : OllyDbg, ODBGScript 1.65 感谢 : Oleh Yuschuk - author of OllyDbg SHaG - author of OllyScript hnhuqiong - author of ODbgScript */ var temp cmp $VERSION, "1.65" jb errorver bc bphwcall dbh findop eip, #FFE6# mov temp, $RESULT bp temp esto bc sto find eip, #8B95????????8B060BC0# mov temp, $RESULT bp temp esto bc find eip, #8B85????????EB# mov temp, $RESULT add temp, 6 /*查找以下命令: 004E30D5 8B85 A6714000 MOV EAX,DWORD PTR SS:[EBP+4071A6] ; 加密输入表的,NOP掉 */ find temp, #8B85????????EB# mov temp, $RESULT mov [temp], #909090909090# /*查找以下命令: 004E3A5E FFE2 JMP EDX ; 跳到 OEP 004E3A60 51 PUSH ECX */ find temp, #FFE251# mov temp, $RESULT bphws temp, "x" esto bphwc sto cmt eip, "已到 OEP,请用 ImportREC 重建输入表" ret errorver: msg "运行此脚本需要 ODbgScript 1.65 或更高的版本,您的版本过低,请更新 ODbgScript 后再试。" |
|
[原创]用IDA SDK开发的Delphi字符串(string类型)识别插件(plugins
多谢提供。下载试用一下。楼主前面发的 Delphi 对象识别插件不错。 |
|
[原创]用IDA SDK开发的超强Delphi对象识别插件(plugins)
这里可不可以改成按快捷键“Ctrl-Alt-S”直接读取 log 文件的数据后自动解析?手工解析太慢。 |
|
[求助]Armadillo 3.78 - 4.xx 找不到Magic Jump
你这叫 CrackMe?明明是 U-Mail 的注册程序。 |
|
[求助]Armadillo 3.78 - 4.xx疑问??
前段时间专门写过一个脚本脱HyperSnap的。用OD载入程序后运行下面的脚本,等脚本运行完,用 ArmInline 修复 Code Splicing 及 Import Elimination 即可。 /* Script written by CCDebuger Script : Armadillo 4.xx 6.x.x Standard Protect Unpack 版本 : v0.1 日期 : 15-2-2009 调试环境 : OllyDbg 1.1, ODBGScript 1.65, WINXP, WIN2000 调试选项 : 设置 OllyDbg 忽略所有异常选项 工具 : OllyDbg, ODBGScript 1.65 感谢 : Oleh Yuschuk - author of OllyDbg SHaG - author of OllyScript hnhuqiong - author of ODbgScript 某位提供双进程转单进程脚本的朋友。若有谁知道作者,请告知 */ var temp var GetModuleHandleA var GetTickCount var CreateThread var MagicJump var IATThunk var CountJump var FunctionChar var oep msg "请忽略所有异常,并添加忽略C000001E异常,然后运行本脚本!" cmp $VERSION, "1.65" jb errorver bc bphwcall dbh gpa "OpenMutexA","kernel32.dll" bp $RESULT esto exec pushad pushfd push edx xor eax,eax push eax push eax call kernel32.CreateMutexA popfd popad jmp kernel32.OpenMutexA ende bc eip gpa "GetModuleHandleA", "kernel32.dll" mov GetModuleHandleA, $RESULT + 5 bp GetModuleHandleA esto findFree: esto mov temp, [esp + 0C] add temp, 7 cmp [temp], #46726565# ;VirtualFree 中的字串 Free jne findFree esto rtu bc arm5: /*查找以下内容: 012B74AA /EB 03 JMP SHORT 012B74AF 012B74AC |D6 SALC 012B74AD |D6 SALC */ find eip, #EB03D6D6# bp $RESULT find eip, #833C90007505# mov MagicJump, $RESULT cmp MagicJump, 0 je arm4 add MagicJump, 4 mov [MagicJump], 9090, 2 ;改成 nop esto bc mov [MagicJump], 0575, 2 jmp Count arm4: /*查找以下内容: 01235FF7 391C06 CMP DWORD PTR DS:[ESI+EAX],EBX 01235FFA 0F84 2F010000 JE 0123612F ; magic jump,改成JMP */ find eip, #391C060F84# mov MagicJump, $RESULT cmp MagicJump, 0 je exit add MagicJump, 3 mov [MagicJump], E990, 2 esto bc mov [MagicJump], 840F, 2 Count: bc gpa "GetTickCount", "kernel32.dll" mov GetTickCount, $RESULT + 5 bp GetTickCount Count_Next: esto mov temp, [esp] /*查找以下命令: 0124C6B5 8B8D 68CAFFFF MOV ECX,DWORD PTR SS:[EBP-3598] 0124C6BB 8908 MOV DWORD PTR DS:[EAX],ECX ; 这里写入 API 函数。这里设个断,可以看见输入表函数的开始地址是013ACB20。数据窗口中跟随这个地址查看 0124C6BD 8B85 10D9FFFF MOV EAX,DWORD PTR SS:[EBP-26F0] 0124C6C3 83C0 04 ADD EAX,4 */ find temp, #8B8D????????89088B??????????83??04# mov IATThunk, $RESULT cmp IATThunk, 0 je Count_Next /*查找以下命令: 018DBE3A 81C1 D0070000 ADD ECX,7D0 018DBE40 3BC1 CMP EAX,ECX 018DBE42 76 07 JBE SHORT 018DBE4B ; 重点,这里改成 JMP,然后把代码往下拉,到刚出这段红色代码下的那个JMP处设硬件执行断点 */ find IATThunk, #81C1D00700003BC17607# mov CountJump, $RESULT cmp CountJump, 0 je Count_Next bc add IATThunk, 6 bphws IATThunk, "x" lc find IATThunk, #EB03D6D6# bp $RESULT add CountJump, 8 mov [CountJump], 0EB, 1 esto log eax, "输入表中某函数的 VA = " bphwcall esto mov [CountJump], 76, 1 bc gpa "CreateThread", "kernel32.dll" mov CreateThread, $RESULT bp CreateThread esto bc rtu rtr sto /*查找以下命令: 018E0475 FFD2 CALL EDX ; 关键,这里就是到 OEP 的。在这设个硬件执行断点,SHIFT+F9 断下后再 F7 就到 OEP 了。 018E0477 8945 FC MOV DWORD PTR SS:[EBP-4],EAX 018E047A 8B45 FC MOV EAX,DWORD PTR SS:[EBP-4] */ find eip, #FF??8945??8B45??# mov oep, $RESULT cmp oep, 0 je exit bp oep sub oep, eip find eip, #FF??8945#, oep mov temp, $RESULT cmp temp, 0 je arm4oep jmp SetOherbp arm4oep: find eip, #FF??EB??83#, oep mov temp, $RESULT cmp temp, 0 je RuntoOep SetOherbp: bp temp RuntoOep: esto bc sti mov oep, eip log oep, "OEP VA = " cmt eip, "这就是 OEP 了" exit: ret errorver: msg "运行此脚本需要 ODbgScript 1.65 或更高的版本,您的版本过低,请更新 ODbgScript 后再试。" ret |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值