|
[原创]闲来无事--写了一个QQ美女找茬辅助器
呃,以前很早有人发过QQ找茬、QQ美女找茬的不同点的关键内存位,自己也写过瞬过的DLL。 估计现在那些地址已经变化了,没关系了,放出代码。
|
|
[求助]一个关于清空PE文件头的问题,请各位大侠指点一下。
使用MDL比较安全。 另外,如果你的代码不是由目标进程驱动,那么环境不对,你在操作前需要先Attach目标进程,这样,所谓的ImageBase才能被正确映射。 操作MDL如下所示: inline bool Crackit(void* mem,unsigned char* crackcode,size_t len) { #ifdef _RING0 PMDL pMDL = MmCreateMdl(NULL,mem,len); if (pMDL == NULL) return false; MmBuildMdlForNonPagedPool(pMDL); pMDL->MdlFlags = pMDL->MdlFlags | MDL_MAPPED_TO_SYSTEM_VA | MDL_WRITE_OPERATION; void* Mem = MmMapLockedPages(pMDL,KernelMode); if (Mem == NULL) return false; bool rets = true; __try { RtlCopyMemory(Mem,crackcode,len); } __except(EXCEPTION_EXECUTE_HANDLER) { rets = false; } MmUnmapLockedPages(Mem,pMDL); IoFreeMdl(pMDL); #else bool rets = true; if(!WriteProcessMemory((HANDLE)-1,(LPVOID)mem,(LPCVOID)crackcode,len,0)) return false; #endif return rets; } |
|
[求助]......转“求助问答区”了
你改变了数据长度,当然破坏了文件。 用Ultraedit,替换 75 6E 63 6F 75 6E 74 65 64 00 00 00 25 64 00 00 with 31 00 63 6F 75 6E 74 65 64 00 00 00 25 64 00 00 应该这样做。 或者,你可以用PE工具改 |
|
|
|
求助修改汇编代码的困惑!在线等!
如果你的意思是比较dword ptr [8C93F4] == -1的话,那就把FF写成-1好了。如果是比较0xFF,那只能采取楼上几位的方案了。 |
|
[求助]程序一拖到OD马上OD就消失了
是旧版的dbghelp.dll解析Export名缓冲区溢出漏洞,好像论坛不少人问过了。请善用搜索引擎。 解决方法,删除OD目录下的dbghelp.dll。由于现在系统自带的dbghelp已经比OD自带的高级,不再存在此漏洞。 |
|
[求助]干掉DXF保护后OD启动会被结束大家给个思路
我来爆个料:两个字节,一个回调。就可以搞定的事,不至于搞得那么复杂。 但是别问为什么。因为只要方法一公开,很快就会失效。这本身就是件很纠结的事。所以,小圈子研究学习就好了,不要搞得公开化,弄得大家都难做。 |
|
[原创]ring3 inline 钩子库
以下是我的实验结果。也许是对楼主的LIB理解上有点问题。HOOK效果不尽人意。 实验代码: void thistest() { cout<<"in this test..."<<endl; } void mytest() { cout<<"in my test"<<endl; } int _tmain(int argc, _TCHAR* argv[]) { thistest(); HOOK_INFO Info={0}; InstallInlineByAddress((void*)thistest,mytest,&Info); thistest(); } 情景分析: thistest被HOOK之前: 00403BD0 /$ 56 push esi 00403BD1 |. 57 push edi 00403BD2 |. 68 DCF54100 push 封装测试.0041F5DC ; in this test... 00403BD7 |. 68 F0414200 push 封装测试.004241F0 HOOK之后: 00403BD0 /$- E9 2BC4FBFF jmp 003C0000 003C0000 58 pop eax 003C0001 68 0D003C00 push 3C000D ; ASCII "VWh荃A" 003C0006 50 push eax 003C0007 - E9 A41E0400 jmp 封装测试.00401EB0 003C000C 90 nop 003C000D 56 push esi 003C000E 57 push edi 003C000F 68 DCF54100 push 41F5DC ; ASCII "in this test..." 003C0014 - E9 BE3B0400 jmp 封装测试.00403BD7 我想,原来HOOK_BUF的意图可能是要先执行钩子函数,再回来执行原来的函数体。 但是事实情况是没有。而且堆栈还因为多了一个push造成不平衡 我想,楼主把push RETS与push eax的位置放反了吧?? InstallInlineForFastCall的情况类似。 作为一个hooklib,当HOOK一段内存代码X时,应该让用户自由选择这段X先于钩子函数执行或后于钩子函数执行。 另外我再提一下我之前说过的问题,标志位。 如果这时我的钩子函数如下: 0100739D notepad.<ModuleEntryPoint> 8B45 08 mov eax, dword ptr [ebp+8] ; notepad.<ModuleEntryPoint> 010073A0 40 inc eax 010073A1 40 inc eax 010073A2 C3 retn 且不管我提供的HOOK函数有多诡异,它改变了寄存器EAX,用户提供多么诡异的钩子HOOKLIB都得接受,不是吗,呵呵。 而HOOK的原始地址代码片断如下: 010073A4 85D2 test edx, edx 010073A6 8B4D 08 mov ecx, dword ptr [ebp+8] 010073A9 74 10 je short notepad.010073BB 再假设这时线程环境,edx==0,eax==0 这时候,按照你生成的jmp,成功jmp进入钩子函数。 进入前Z标志位被置位,接下来的程序流程应该进入010073BB的。 但是由于钩子函数内部改变了Z标志。 所以,当钩子回来以后,程序流程变了。 编译器不会像你所说的,保护所有环境,至少,eax,ecx,edx都是自由的。编译器对它们并无明确保证。 |
|
[原创]ring3 inline 钩子库
寄存器保没保护暂且不说。标志寄存器可是有点关键。 试想,如HOOK以下代码: cmp eax,edx mov ecx,edx mov edx,eax jcc XXXXX 此时HOOK回调一旦影响标志寄存器,可能改变程序流程哦。呵呵。 |
|
关于windbg的使用问题
奇怪,都对啊。 那你试下正常开启windbg,用ctrl+K的com Baud Rate:115200 Port:\\.\pipe\com_1 这样都不行,我也不懂了,虽然以前我也遇到这样的问题,后来不知不觉又好了,都不知道是怎么弄好的。。。 期待牛人来作答。 |
|
|
|
如此 inline hook SSDT
你不能靠68C4000000来确定NtOpenProcess。0xC4这个值对NtOpenProcess来说,不属于它的特征码。 另外,既然你使用inline hook的话,NtOpenProcess是导出的。你只需要直接使用这个地址就可以了。 当然,在编译的时候需要把链接器增量连接去掉(/INCREMENTAL:NO),这样NtOpenProcess的地址才会正确。 所以你根本不需要去SSDT表中找NtOpenProcess地址,转一大圈,无用功。 如楼上所说,你的CALL地址竟然是0x78XXXXXXX,这是一个用户地址,无论你OFFSET是否计算正确,都是错误的。内核代码竟然CALL回用户层代码,实在是要雷倒一帮人。 你inline hook取的位置很悬,把hook下在一个有相对偏移的地址,真是算你狠。这种下法,背后所要做的工作比在其它地址下hook要复杂很多。一个细节没做好,就要蓝。 NtOpenProcess还有很多可以做inline hook的地方,何苦挑这个位置呢。。。 |
|
关于windbg的使用问题
一:确认host的COM1端口设置是否符合要求。(我的电脑--属性--硬件--设备管理器--端口--COM1--端口设置) 二:确认VM启动系统以后,Serial Port是否开启。(VM的右下角,Serial Port点亮了没有) 三:确认你的系统启动项是否选择了debug模式启动。(就是VM系统的boot.ini要改对,并且选择启动系统。只有在VM的操作系统以debug模式启动之后,注意是之后。你再开windbg才有效) |
|
[原创]DNF 驱动对内存读取的过滤分析
楼主分析得好细哦。 暴露太多东西了,小心TesSafe.sys又改版,TesSafe.sys的更新频度与看雪里相关文章的出现频度完全重合。 由此见得,TX早就盯上这里了。 |
|
已经hook了NtQuerySystemInformation,禁止程序例用这个函数获取任何信息,hook函数里要如何做?
STATUS_UNSUCESSFULL 建议你最好回调的内部判断调用者,不要全都返回这个值,否则会出问题。 |
|
|
|
堆栈数据如何修改
你的描述算清楚了吧。只是好像多了一点,大家懒得看这么多而已啦。 白赚了你100Kx,很不好意思。我再把解决方法说细一点吧。 你说inet_addr不可跳过,怎么不能跳过了,我只是说跳过0040E1DB这里的inet_addr一次调用而已。 其实这样的话,你完全可以不用写程序,直接手术PE就得了。因为看你这个程序代码状态,应该是没有加壳的。所以你只需要找到PE文件里的相对位置,做个patch,可以完全搞定的。 当然,如果你非想用runtime patch不可。以下改过你代码,你试试吧。(很久没写完全的ASM了,而且现在手里也没有编译器,所以也不能保证能成。。。) .586 .model flat,stdcall option casemap:none ;====Include文件================= include include\windows.inc include include\kernel32.inc include include\user32.inc ;====Lib文件===================== includelib lib\kernel32.lib includelib lib\user32.lib ;===========EQU数据====================================== M_BaseAddress equ 0040E1D6h ;要读写的地址(从push edx开始) ;===========已初始化的数据=============================== .data ;===========未初始化的数据=============================== .data? stStartUp STARTUPINFO <> ;启动结构体 stProcInfo PROCESS_INFORMATION <> ;接收进程启动后的信息 szBuffer db 5 dup (?) ;目的地址 dwTemp dd ? ;接收临里数据 lphMemory dd ? ;内存句柄 ;===========常量定义===================================== .const szExecFileName db 'xyza.exe',0 szErrExec db 'Sory The File Name is Bad',0 szAppname db 'Memory',0 szMemoryError db 'Alloc Memory Failed',0 dbPatched db 90h,66h,89h,44h,24h,0Ah,0B8h ;要写入目标的内容 dd 0101A8C0h ;192.168.1.1(根据需要改IP地址,注意网络顺序) szIP db '192.168.1.200',0 ;定义IP地址 ;===========代码段======================================= .code start: invoke GetStartupInfo,addr stStartUp invoke CreateProcess,offset szExecFileName,NULL,NULL,NULL,NULL,\ NORMAL_PRIORITY_CLASS or CREATE_SUSPENDED,NULL,NULL,offset stStartUp,offset stProcInfo ;参数说明 ;lpApplicationName 要创建的应用程序名 ;lpCommandLine 通过命令行获取 ;pProcessAttributes 指向一个SECURITY_ATTRIBUTES结构体 ;lpThreadAttributes 同上 ;bInheritHandles 指示新进程是否从调用进程处继承了句柄 ;dwCreationFlags 创建标志 ;lpEnvironment 是否需要指向新的环境 ;lpCurrentDirectory 指向一个路径 ;lpStartupInfo 启动结构体 ;lpProcessInformation 接收进程序信息 .if eax ;判断eax==1(是否创建成功) invoke WriteProcessMemory,stProcInfo.hProcess,M_BaseAddress,offset dbPatched,11,offset dwTemp ;参数说明 ;hProcess 目标进程的句柄 ;lpBaseAddress 要写入目标进程的起始地址Target ;lpBuffer 存放要写入数据的地址 ;nSize 要读取数据的大小 ;lpNumberOfBytesRead 实际读取的大小 ;-------------------------------------------- invoke ResumeThread,stProcInfo.hThread .else invoke CloseHandle,stProcInfo.hProcess invoke CloseHandle,stProcInfo.hThread invoke MessageBox,NULL,addr szErrExec,addr szAppname,MB_OK .endif invoke ExitProcess,NULL end start |
|
[讨论]od自动退出,请大家给我点思路
它就是进程快照黑名单,窗口枚举黑名单。也没啥太先进的技巧,你走弯路了。 |
|
堆栈数据如何修改
楼主写的程序也很蛋疼啊,不知道是故意掩饰什么,还是本身就是一个纯粹的半成品。 虽然你没有100Kx,但还是说说你的代码的错误吧: ㈠ mov lphMemory,eax ;保存内存句柄 lea eax,szIP mov lphMemory,eax 你这是想搞什么?你的意思是想把本进程中的IP拷到目标进程你申请的内存里吧?老大,好歹你也用memcpy才靠谱。你这个操作,鬼才知道干了什么。而且,进程间你要数据写入,还得使用WriteProcessMemory好不好! mov lphMemory,eax ;保存内存句柄 WriteProcessMemory,stProcInfo.hProcess,lphMemory,offset dbPatched,5,offset dwTemp ㈡ .const dbPatched db 68h,00h,00h,14h,00h ;要写入目标的内容(push 00140000) 补丁是个硬编码,还是个const。。。 老大,申请到的内存位置不是你说了算的。好歹把它移到.data段,得到lphMemory以后,把你的硬编码改掉好不好! .data dbPatched db 68h dbPatched_IP dd ? .code mov lphMemory,eax ;保存内存句柄 mov eax,lphMemory mov dbPatched_IP,eax 看着有100Kx又得不到,郁闷啊郁闷 另,OD已经告诉你了,这是一个inet_addr,其实你完全可以跳过它。 0040E1D2 |. 8B5424 1C mov edx, dword ptr [esp+1C] 0040E1D6 |. 90 nop ; nop 0040E1D7 |. 66:894424 0A mov word ptr [esp+A], ax 0040E1DC |. B8 C0A801C8 mov eax,0C801A8C0 ;192.168.1.200 这样只需要一次修改,无需申请内存。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值