|
[求助]懂驱动的帮忙看下啊,谢谢了。3天3夜了 就错这里了
ZwWriteVirtualMemory 也是没导出的吧 隔壁那个不是有人回答你了么,在PEB里找ntdll然后找到ZwWriteVirtualMemory的序号。 其实可以直接在Ring3找到然后DeviceIoControl给驱动的。 |
|
[求助]VS2008 无法转到定义
不会用就怪人家编译器不好,真蛋疼 |
|
[讨论]秀秀你的桌面
.... |
|
[求助]ring0下如何HOOK实现拦截驱动加载并获得映像基址
ZwLoadDriver--NtLoadDriver--IopLoadDriver--MmLoadSystemImage--NtCreateSection 服务加载的可以hookZwLoadDriver,SetSystemInformation的是直接调用MmLoadSystemImage的。 PsSetLoadImageNotifyRoutine只是Notify,告诉你驱动已经加载了而已。 |
|
[转帖]QQ大战360,战局会如何发展?
飞信该出来抢地盘啊 |
|
[转帖]据说是一道月薪万元的面试题 看看你能不能做出来
多少年前的了。。old不 |
|
|
|
[分享][第一阶段 第一题]ExploitMe.exe源代码
。。IDA F5一下就这样了。。。 |
|
[求助]为什么inlink hook NtQueryDirectoryFile从第6字节跳老是出错呢
你跳到Hook函数后怎么处理的。 因为参数是在堆栈里面的,push ebp后堆栈改变了。 你jmp到HookXX后,里面的参数值也改变了。 |
|
目前公认最强的壳是什么壳?
最强的其实是不加壳。。 |
|
[求助]为什么inlink hook NtQueryDirectoryFile从第6字节跳老是出错呢
函数中间hook的话必须保证返回到原始函数时各个寄存器的状态一样 jmp hidefile!MyNtQueryDirectoryFile (f8a2650a) 可以改成 pushad/pushf/jmp/popf/popad |
|
[求助]为什么inlink hook NtQueryDirectoryFile从第6字节跳老是出错呢
8056ef2e 8bff mov edi,edi 8056ef30 55 push ebp 8056ef31 8bec mov ebp,esp 8056ef33 e9d2754b78 jmp hidefile!MyNtQueryDirectoryFile (f8a2650a) 在MyNtQueryDirectory里面 也有 push ebp mov ebp,esp 然后你没恢复ebp就jmp到下面吧 hidefile!OriginalNtQueryDirectoryFile [c:\hidefile\src2\hidefile.c @ 381]: f8a264da 8d452c lea eax,[ebp+2Ch]f8a264dd 50 push eax f8a264de 8d4528 lea eax,[ebp+28h] ebp的值不是原来的了 |
|
[答案]
[QUOTE=Prochg;874419]xp sp2的,没sp3的机子。。。看看通过不 ExploitMe.rar[/QUOTE] 汗。。传了下载的东西。。 重新上传 exploit.rar |
|
|
|
|
|
[讨论]对竹君同学那篇文章的一个疑问
建议Lz先在Ring3下练习Inlinehook吧。 弄清楚hook是什么,怎么跳到自己想运行的函数,怎么构建stub跳转到原始函数。 给个参考代码吧,部分函数看名字理解,没贴出来 LPVOID /*返回hook后跳转到原始函数的地址,此地址用于调用原始函数和取消hook,为NULL时表示hook失败。*/ InlineHook( LPVOID lpFnAddress, /*需要hook的函数地址*/ LPVOID lpNewFnAddress /*替换被hook函数的地址*/) { LPVOID lpOrgFnAddress=NULL; //返回地址. if(lpFnAddress==NULL || lpNewFnAddress==NULL) return NULL; DWORD dwPatchSize = GetPatchSize(lpFnAddress); if(dwPatchSize==0) return NULL; // //计算stub的大小,建造stub //DWORD(lpFnAddress)|DWORD(dwPatchSize)|Patch掉的代码|jmp XXXXXXXX //lpOrgFnAddress指向->Patch掉的代码. // DWORD dwStubSize = sizeof(DWORD)*2 /*保存dwPatchSize的值*/ + dwPatchSize /*保存被Patch的代码*/ + JMP_SIZE; /*Jmp到原始函数继续运行*/ lpOrgFnAddress = MALLOC(dwStubSize); ((DWORD*)lpOrgFnAddress)[0]=(DWORD)lpFnAddress; ((DWORD*)lpOrgFnAddress)[1] = dwPatchSize; lpOrgFnAddress =(LPVOID)((DWORD)lpOrgFnAddress+sizeof(DWORD)*2); //指向Patch掉的代码 memcpy(lpOrgFnAddress,lpFnAddress,dwPatchSize); //复制保存Patch掉的代码 #ifndef RING0 *(UCHAR*)((DWORD)lpOrgFnAddress+dwPatchSize)=0xE9; //计算jmp xxxxxxxx *(DWORD*)((DWORD)lpOrgFnAddress+dwPatchSize+1)=((DWORD)lpFnAddress+dwPatchSize)- ((DWORD)lpOrgFnAddress+dwPatchSize)-JMP_SIZE; // //处理lpFnAddress // LPVOID lpPatchBuffer = MALLOC(dwPatchSize); memset(lpPatchBuffer,0x90,dwPatchSize); *(UCHAR*)lpPatchBuffer = 0xE9; *(DWORD*)((DWORD)lpPatchBuffer+1) = (DWORD)lpNewFnAddress-(DWORD)lpFnAddress-JMP_SIZE; #else //RING0 *(UCHAR*)((DWORD)lpOrgFnAddress+dwPatchSize)=0xEA; //计算jmp far 0x08:xxxxxxxx *(DWORD*)((DWORD)lpOrgFnAddress+dwPatchSize+1)=(DWORD)lpFnAddress+dwPatchSize; *(USHORT*)((DWORD)lpOrgFnAddress+dwPatchSize+5)=0x08; // //处理lpFnAddress // LPVOID lpPatchBuffer = MALLOC(dwPatchSize); memset(lpPatchBuffer,0x90,dwPatchSize); *(UCHAR*)lpPatchBuffer = 0xEA; *(DWORD*)((DWORD)lpPatchBuffer+1)=(DWORD)lpNewFnAddress; *(USHORT*)((DWORD)lpPatchBuffer+5)=0x08; #endif RomCpy(lpFnAddress,lpPatchBuffer,dwPatchSize); FREE(lpPatchBuffer); return lpOrgFnAddress; } BOOL UnInlineHook(LPVOID lpOrgFnAddress /*为InlineHook返回的地址(跳转到原始函数的地址)*/) { if(lpOrgFnAddress==NULL) return FALSE; LPVOID lpStubBuffer=(LPVOID)((DWORD)lpOrgFnAddress-sizeof(DWORD)*2); //得到分配的所有内存空间。 LPVOID lpFnAddress=(LPVOID)((DWORD*)lpStubBuffer)[0]; DWORD dwPatchSize =((DWORD*)lpStubBuffer)[1]; if(!RomCpy(lpFnAddress,lpOrgFnAddress,dwPatchSize)) return FALSE; FREE(lpStubBuffer); return TRUE; } |
|
|
|
[求助]大家帮我,inline hook NtOpenProcess
NtOpenProcess typedef NTSTATUS(NTAPI*DefNtOpenProcess)(PHANDLE,ACCESS_MASK,POBJECT_ATTRIBUTES,PCLIENT_ID); DefNtOpenProcess OrgOpenProcess; NTSTATUS NTAPI OnNtOpenProcess ( OUT PHANDLE ProcessHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN PCLIENT_ID ClientId OPTIONAL ) { HANDLE ProctectPID =(HANDLE) 1234; if(ClientId && ClientId->UniqueProcess == ProctectPID) //有人打开 Pid = 1234 的进程。 { KdPrint(("使其打开失败\n")); return STATUS_UNSUCCESSFUL; } return OrgOpenProcess(ProcessHandle,DesiredAccess,ObjectAttributes,ClientId); } DriverEntry #pragma INITCODE extern "C" NTSTATUS DriverEntry ( IN PDRIVER_OBJECT pDriverObject, IN PUNICODE_STRING pRegistryPath) { NTSTATUS status=STATUS_SUCCESS; pDriverObject->DriverUnload = Unload; KdPrint(("DriverEntry!.\n")); // //InlineHook NtOpenProcess // OrgOpenProcess = (DefNtOpenProcess) InlineHook((PVOID)NtOpenProcess,(PVOID)OnNtOpenProcess); return status; } VOID Unload(IN PDRIVER_OBJECT pDriverObject) { // //UnInlineHook // UnInlineHook(OrgOpenProcess); KdPrint(("Unload.\n")); } |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值