|
[求助]-------------------------------求汇编高手翻译一小段代码,最好能用编程语言写出来,很难,胆小别进
BOOL __cdecl StackInject(HANDLE hProcess, HANDLE hThread, DWORD DestCallAddress, void *Src, size_t Size) { //代码效果应该与原程序等价,略做优化。 BOOL returnValue=0; DWORD oldProtect=0; DWORD numBytesWritten=0; BYTE StackAsmBuffer[0x80]; BYTE Dst[0x400]; CONTEXT context; LPVOID lpBaseAddress; SuspendThread(hThread); memset(&context,0,sizeof(CONTEXT)); context.ContextFlags=CONTEXT_FULL; if (GetThreadContext(hThread,&context)) { if (Src) memcpy(Dst,Src,Size); //原始程序这里使用detour库宏汇编了这一块,不过我没有detour库,我就等价直接汇编了。 /* 生成的汇编代码如下: push imm32;当前Esp call DestCallAddress mov eax,OrgEax mov ebx,OrgEbx mov ecx,OrgEcx mov edx,OrgEdx mov esi,OrgEsi mov edi,OrgEdi mov ebp,OrgEbp mov esp,OrgEsp jmp OrgEip */ __asm { push ecx push ebx lea ebx,StackAsmBuffer mov byte ptr [ebx],0x68//push Imm32 inc ebx mov eax,context.Esp sub eax,0x480 and eax,0xFFFFFFE0 mov lpBaseAddress,eax mov ecx,eax //ecx use as current eip in target process mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xE8//call Imm32 inc ebx mov eax,DestCallAddress add ecx,5 sub eax,ecx mov dword ptr [ebx],eax add ebx,4 mov byte ptr [ebx],0xB8//mov eax, Imm32 inc ebx mov eax,context.Eax mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xBB//mov ebx, Imm32 inc ebx mov eax,context.Ebx mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xB9//mov ecx, Imm32 inc ebx mov eax,context.Ecx mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xBA//mov edx, Imm32 inc ebx mov eax,context.Edx mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xBE//mov esi, Imm32 inc ebx mov eax,context.Esi mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xBF//mov edi Imm32 inc ebx mov eax,context.Edi mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xBD//mov ebp, Imm32 inc ebx mov eax,context.Ebp mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xBC//mov esp Imm32 inc ebx mov eax,context.Esp mov dword ptr [ebx],eax add ebx,4 add ecx,5 mov byte ptr [ebx],0xE9//Jmp Imm32 inc ebx mov eax,context.Eip add ecx,5 sub eax,ecx mov dword ptr [ebx],eax pop ebx pop ecx } if(VirtualProtectEx(hProcess,lpBaseAddress,0x480,PAGE_EXECUTE_READWRITE,&oldProtect)) { if (WriteProcessMemory(hProcess,lpBaseAddress,StackAsmBuffer,0x480,&numBytesWritten) && numBytesWritten==0x480) { context.Eip=(DWORD)lpBaseAddress; if (FlushInstructionCache(hProcess,lpBaseAddress,0x480)) { if (SetThreadContext(hThread,&context)) { returnValue=TRUE; } } } } } return returnValue; } |
|
[求助]-------------------------------求汇编高手翻译一小段代码,最好能用编程语言写出来,很难,胆小别进
看起来是自己写的,还原代码是没什么问题的,也很简单。不过最好能提供这个dll,不然从挂起线程到写入内存之间的那一段代码无法确定用途。 从上下文分析来看,一开始先暂停了目标进程中的线程,然后再堆栈中划出了480h字节的空间,下面又写入了480h的字节,所以中间应该是构造执行代码。 |
|
[求助]-------------------------------求汇编高手翻译一小段代码,最好能用编程语言写出来,很难,胆小别进
难倒是不难,可是很明显的,你贴的这个函数并不完整。所以很多变量无法确定是不是指针。 |
|
[求助]
__asm{ push ebp; mov ebp , esp; sub esp , 80h; 你上面有着些asm代码,下面却没有相应的代码去平衡栈,所以你消息框出来了,然后结束的时候出错了。 |
|
WPE抓包的问题
自己编写的服务器端 |
|
WPE抓包的问题
因为软件二用的是Http服务器程序,软件一用的是自定义服务器程序。 |
|
[求助]请教三道很简单的算法题。。。我没有KX了,只好发在这里了o(︶︿︶)o
过编译器啊,我记事本写得……没去验证一下是不是能过编译的…… 刚才修改了一下,已通过编译了。 不过我这边只有VS2011,所以代码最少符合VS2011认可的C语言规范。 |
|
|
|
[求助]请教三道很简单的算法题。。。我没有KX了,只好发在这里了o(︶︿︶)o
额,这是我的解法,似乎看起来很长…… 我只给关键过程。输入输出自己去搞吧。 #include <stdlib.h> unsigned int SortCount(unsigned int numElements,unsigned int *pArray) { unsigned int nCount,i,j; nCount=0; for (i=0;i<=numElements;i++) { for (j=i;j<=numElements;j++) { if(*(pArray+i)>*(pArray+j)) { nCount++; *(pArray+i)^=*(pArray+j)^=*(pArray+i)^=*(pArray+j); } } } return nCount; } int SortCountK(unsigned int numElements,unsigned int *pArray,unsigned int k) { unsigned int i,minCount,maxCount,*pArrayb,*pMinElement,*pElement; int return_value=0; pArrayb=(unsigned int *)(malloc(numElements*sizeof(unsigned int))); for (i=0;i<numElements;i++) *(pArrayb+i)=*(pArray+i); maxCount=SortCount(numElements,pArray); minCount=0; i=0; do { pElement=pArray+i; pMinElement=pElement; while(pElement<(pArrayb+numElements)) { if (*pMinElement>*pElement) pMinElement=pElement; pElement++; } if (pMinElement!=pArray+i) { minCount++; *pMinElement^=*pElement^=*pMinElement^=*pElement; } }while(i<=numElements); if (k>=minCount && k<=maxCount) return_value=1; return return_value; } unsigned int ArithmeticProgression(int numElements,int *pArray) { //结果在debug模式编译的程序是正确的,Release模式出错,不管了。 int min,max,i,j,subArrayCount,*pElement,Dvalue; min=*pArray; max=min; i=1; do { if(min>*(pArray+i)) min=*(pArray+i); if(max<*(pArray+i)) max=*(pArray+i); i++; }while(i<numElements); i=max-min; max=i; min=0-i; subArrayCount=0; for (i=0;i<numElements;i++) { pElement=pArray+i; Dvalue=0; for (j=1;pElement<(pArray+numElements);j++) { if((*pElement-*(pElement+j))>=min && (*pElement-*(pElement+j))<=max) { if (!Dvalue) { Dvalue=*pElement-*(pElement+j); } else { if ((*pElement-*(pElement+j))==Dvalue) { subArrayCount++; pElement+=j; j=0; } } } } } return subArrayCount; } |
|
[讨论]TerminateProcess结束多个同名进程和多个进程
有些进程有主次之分,如果主进程完蛋了,次进程也会一起结束的。 最好的方法是 while(FindProcess(szProcessName)) { OpenProcess TerminateProcess } |
|
[求助]请教三道很简单的算法题。。。我没有KX了,只好发在这里了o(︶︿︶)o
第一题,用指针做冒泡排序,同时判断要交换的是否为当前元素,若是,则可节约一步。 第二题,用最费时的排序法求得最大值,若存在第一题的最小值<k<最大值,则成立。 第三题,首先求得数列中最大值与最小值的差,然后对数列中每个元素向后验证有无从差的负绝对值到正绝对值的存在。若存在则子数列数目+1。 趴床上爪机上网,就不去开机堆代码了。 不过,有这么多叙述,在这个临近暑假的时刻,你不会告诉我们说,其实你这学年DOTA打得不错吧? |
|
[求助]请问:这个是弹出Messagebox消息框的API代码的汇编指令吗,如何用VB直接执行这个汇编指令呢?
VB 的话 MsgBox在召唤你…… |
|
[求助]请教要如何脱这种壳
目测是Asprotect |
|
[求助]ZProtect v1.4.4 -> Sign by phpbb3
嗯,壳都脱了。但是里面的VMP代码你自己去还原吧…… |
|
[求助]UPX脱壳后运行出错,已经附加数据
是的,直接upx -d |
|
[转帖]Opera v12.00.1454 RC3
最近觉得,IE9的开发者工具至少比Chrome好用,至于Opera,好久没用过了。真的好久了…… |
|
|
|
[讨论]qq密码的破解程度真的很高吗
如果能拦截的话,绝对不会去破解。 |
|
[求助]UPX脱壳后运行出错,已经附加数据
我用的是v3.3版的。 |
|
[求助]高手帮忙指点一下这个<密码壳>的类型
这只是一个易语言写的很普通的程序,验证一下密码是不是正确,然后调用空间载入说好的网页。关闭的时候再把网页文件删除掉。如此而已。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值