|
[原创]查找系统动态链接库(Dll)基地址和指定函数地址的一种方法
主要就获取映像基址, 映像基址计算式子:*(ULONG*)(base+*(ULONG*)(base+0x3c)+0x34); 和 输出表地址计算式子: *(ULONG*)(base+*(ULONG*)(base+0x3c)+0x78); 还有 遍历输出表 这不能说是新方法,说白了就是最常规的方法了,首选的方法。 另外,我觉得Kernel32.dll是在系统目录下,CreateFile第一个参数应该可以直接写Kernel32.dll 吧? |
|
[求助][原创]如何获取进程文件属性
static SHELLEXECUTEINFO se; se.hwnd=NULL; se.lpVerb="properties"; se.lpFile="C:\\1.txt"; se.fMask=SEE_MASK_NOCLOSEPROCESS |SEE_MASK_INVOKEIDLIST |SEE_MASK_FLAG_NO_UI ; se.lpParameters=NULL; se.lpDirectory=NULL; se.cbSize=sizeof(se); ::ShellExecuteEx(&se); |
|
[原创]查找进程API内存地址的小程序
遍历进程, 枚举导入表加载的模块然后调用下面我的这个函数就可以打印出API的地址了, ULONG FindApiImportAddr ( ULONG dwBaseImage, char* pModuleName, char* pFuncName ) { PIMAGE_DOS_HEADER pDosHeader; PIMAGE_NT_HEADERS pNtHeader; PIMAGE_OPTIONAL_HEADER32 pOptionalHeader; PIMAGE_SECTION_HEADER pSectionHeader; PIMAGE_THUNK_DATA pThunk, pIAT; PIMAGE_IMPORT_DESCRIPTOR pIID; ULONG dwThunkValue = 0; ULONG test; __asm int 3 // 检查参数是否合法 if ( 0==dwBaseImage || 0==pModuleName || 0==pFuncName ) return 0 ; // pDosHeader指向DOS头结构 pDosHeader = (PIMAGE_DOS_HEADER)dwBaseImage ; //pNtHeader指向PE文件头结构 pNtHeader = (PIMAGE_NT_HEADERS)(dwBaseImage + (pDosHeader->e_lfanew)) ; if ( 0 == pNtHeader ) return 0; //pOptionalHeader指向可选头结构 pOptionalHeader = &(pNtHeader->OptionalHeader) ; if ( 0 == pOptionalHeader ) return 0; //pSectionHeader指向第一个段头部结构 pSectionHeader = (PIMAGE_SECTION_HEADER) ((ULONG)pNtHeader + 0x18 + pNtHeader->FileHeader.SizeOfOptionalHeader ) ; if ( 0 == pSectionHeader ) return 0; // 遍历导入表 KdPrint(( "pOptionalHeader->DataDirectory[1].VirtualAddress@@@%X\n", pOptionalHeader->DataDirectory[1].VirtualAddress )); //pIID指向第一个导入DLL目录结构 pIID = (PIMAGE_IMPORT_DESCRIPTOR) \ (dwBaseImage + pOptionalHeader->DataDirectory[1].VirtualAddress ) ; __try { test = pIID->FirstThunk; } __except( GetExceptionCode() ) { return 0; } while ( pIID->FirstThunk ) { __asm int 3 // 找到指定的DLL导入目录 if ( strcmp ( (char*)(dwBaseImage+pIID->Name), pModuleName ) ) { pIID++ ; continue ; } //pIAT指向该导入DLL的IAT表 pIAT = (PIMAGE_THUNK_DATA)( dwBaseImage + pIID->FirstThunk ) ; //pThunk指向INT表导入(即导入名称表) if ( pIID->OriginalFirstThunk ) pThunk = (PIMAGE_THUNK_DATA)( dwBaseImage + pIID->OriginalFirstThunk ) ; else pThunk = pIAT ; // pIAT在一开始时保存了名称表 if ( 0 == pThunk ) return 0; // 遍历IAT //dwThunkValue存放原始的IAT表中函数的虚拟地址 while ( ( dwThunkValue = *((ULONG*)pThunk) ) != 0 ) { if ( ( dwThunkValue & IMAGE_ORDINAL_FLAG32 ) == 0 ) { // 寻找指定的函数在IAT表中的项 if ( strcmp ( (char*) (dwBaseImage+dwThunkValue + 2 ), pFuncName ) == 0 ) { return (ULONG)pIAT ; } } pThunk ++ ; pIAT ++ ; } pIID ++ ; } return 0 ; } |
|
|
|
[原创]一步一步实现在PE文件中添加可执行代码
太长了,上课去了,回来有时间再看........... |
|
[原创]一步一步实现在PE文件中添加可执行代码
前段时间毕业设计我是做PE的研究和加壳机的设计实现,也要做代码移植,对这个还是比较了解的! |
|
|
|
[原创]从php源码中提取纯C编写的url编解码两函数
嗯,调用的例子是C++写的, url编解码在文件url.c里面。 |
|
|
|
[分享]绿盟科技2012实习生招聘
我也是去绿盟哦, |
|
[分享]绿盟科技2012实习生招聘
请关注绿盟各地区的实习生招聘笔试地点。。(笔试全国统一时间) 热招职位: UnixC/C++研发实习生、产品测试实习生、web研发实习生、渗透测试实习生、逆向分析实习生、战略研究实习生、系统软件开发实习生、安全工程师实习生 欢迎加入绿盟! |
|
|
|
[分享]绿盟科技2012实习生招聘
路过,我也不知道。。。。。 |
|
[值得你珍藏]清华大学计算机全套教程!
不是,因为视频看太浪费时间了,不如看书。。 |
|
PE结构表纵向图
等待完善版…… |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值