|
[求助]dll注入并获取另一个dll的全局变量
估计这个fuck.dll加载的时候,demo.exe还没有调用set_obj, fuck.dll可以顺便把set_obj也hook一下, 并OutputDebugString看看 |
|
|
|
[讨论]IDA中F5功能反编译安卓平台的so文件得到的一个很奇怪的函数
参数问题可以直接在函数上点右键→Force call type |
|
[求助]高手指点一下,这段代码为什么不能在ida 中f5
函数右键→Edit Function→Frame pointer delta修改一下 |
|
关于64位win7系统读取PE文件函数导出表的问题,求大牛帮忙
ULONG_PTR理解有问题 int _tmain(int argc, _TCHAR* argv[]) { printf("%d\n", sizeof(DWORD)); ULONG_PTR ulModuleBase; ulModuleBase = (ULONG_PTR)GetModuleHandleW(TEXT("kernel32.dll")); //得到"kernel32.dll"的基地址 PIMAGE_DOS_HEADER pDosHeader; //dos头结构体 PIMAGE_NT_HEADERS NtDllHeader; //nt结构头 IMAGE_OPTIONAL_HEADER opthdr; //可选镜像头部 IMAGE_EXPORT_DIRECTORY *pExportTable; DWORD* arrayOfFunctionAddresses; DWORD* arrayOfFunctionNames; WORD* arrayOfFunctionOrdinals; ULONG_PTR Base, x, functionAddress; ULONG_PTR functionOrdinal; char *functionName; __try { //得到dos头 PE内存映像从DOS头开始,也就是从IMAGE_DOS_HEADER结构体开始,文件在内存中的开始地址,也就是IMAGE_DOS_HEADER结构体开始的位置 /*把这个值强制类型转换后,赋值给PIMAGE_DOS_HEADER类型指针,作为指向IMAGE_DOS_HEADER结构体的指针*/ pDosHeader = (PIMAGE_DOS_HEADER)ulModuleBase; //强制类型转换,将一个“PVOID64”转换为“PIMAGE_DOS_HEADER” if (pDosHeader->e_magic != IMAGE_DOS_SIGNATURE) //校验IMAGE_DOS_HEADER结构体的e_magic 是否符合预定义的数值5A4D { printf("IMAGE_DOS_SIGNATURE failed\r\n"); return FALSE; } //得到NT文件头 NT结构体 NtDllHeader = (PIMAGE_NT_HEADERS)(ULONG_PTR)((ULONG_PTR)pDosHeader + pDosHeader->e_lfanew); if (NtDllHeader->Signature != IMAGE_NT_SIGNATURE) //校验是否找到PE文件头,IMAGE_NT_SIGNATURE预定义为PE文件头,值为4550,DWORD型 { printf("IMAGE_NT_SIGNATURE failed\r\n"); return FALSE; } //得到可选镜像结构体 opthdr = NtDllHeader->OptionalHeader; //得到内存的导出表结构 pExportTable = (IMAGE_EXPORT_DIRECTORY*)(ulModuleBase + opthdr.DataDirectory[IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress); //得到导出表 //地址 arrayOfFunctionAddresses = (DWORD*)(ulModuleBase + pExportTable->AddressOfFunctions); //地址表 /*NumberOfNames:被定义函数名称的导出函数的总数,显然只有这个数量的函数既可以用函数名方式导出。也可以用序号方式导出,剩*/ /*下的NumberOfFunctions 减去NumberOfNames 数量的函数只能用序号方式导出。该字段的值只会小于或者等于NumberOfFunctions 字段*/ /*的值,如果这个值是0,表示所有的函数都是以序号方式导出的。*/ arrayOfFunctionNames = (DWORD *)(ulModuleBase + pExportTable->AddressOfNames); //函数名表 if (IsBadReadPtr(arrayOfFunctionNames, pExportTable->NumberOfFunctions)) { printf("内存不可访问\n"); system("Pause"); return false; } arrayOfFunctionOrdinals = (WORD*)(ulModuleBase + pExportTable->AddressOfNameOrdinals); //得到导出表的起始地址 Base = pExportTable->Base; //然后我们开始搜索整个导出表 for (x = 0; x < pExportTable->NumberOfFunctions; x++) //在整个导出表里扫描 { functionName = (char*)(ulModuleBase + arrayOfFunctionNames[x]); functionOrdinal = arrayOfFunctionOrdinals[x] + Base - 1; functionAddress = ulModuleBase + arrayOfFunctionAddresses[functionOrdinal]; printf("%s:0x%08X\r\n", functionName, functionAddress); } } _except(EXCEPTION_EXECUTE_HANDLER){ } system("Pause"); return 0; } |
|
[原创]说说这次的阿里比赛和连续逆向N天的点感想
o-llvm混淆过的代码看得真痛苦。。 |
|
[推荐]Safengine LLVM DEMO - Android SO库加密终极武器发布(有下载,可无限制离线测试)
wo ca, 某个apk原来是用这个处理的,难怪这么蛋疼 |
|
[原创][2014-12-11更新]程序员记忆录!.
还是这种文字看着带感啊 |
|
《看雪论坛精华13》发布
新年快乐!!! |
|
[原创]WINXP 图片查看器拒绝服务漏洞
[QUOTE=ctyfrank;1257238]没有弄出楼主的情况…… 实体机……sp3…… [/QUOTE] 这个应该是直接把快速启动的那个"显示桌面"复制进来的吧, 这个实际上是个文件,不是快捷方式 |
|
[求助]菜鸟问题,函数名都可以被反编译出来吗?
要么是od的UDD没删, 要么就是pdb还在原来的路径, 放到其他环境就不会显示了 |
|
[原创]WINXP 图片查看器拒绝服务漏洞
1. shimgvw!CPreviewWnd::WalkItemsToPreview失败导致没有调用CPreviewWnd::PreviewItems(显示图片) 2. 1失败是shell32!CNamespaceWalk::_WalkShortcut失败导致的 3. 2失败是该快捷方式不满足shell32!CFSFolder::_IsValidID导致的 上面几个可以打开的估计是 直接把快捷方式复制到虚拟机里面 导致快捷方式本身是无效的 导致的 |
|
|
|
[求助]请问有什么函数能判断系统是否处于测试模式吗
检测注册表HKLM\SYSTEM\CurrentControlSet\Control\SystemStartOptions 是否有TESTSIGNING这个串 |
|
[求助]桌面图标位置的保存
xp HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop ItemPos1280x720(1) |
|
[求助]在启动Explore之后马上启动SHAppBarMessage(ABM_NEW, &abd)失败
1. SHAppBarMessage的消息最终还是发给TrayWindow来处理 2. explorer进程启动的时候创建了一个线程来创建TrayWindow 所以SHAppBarMessage要等TrayWindow创建之后再调用才能成功, FindWindowA("Shell_TrayWnd", NULL) != NULL |
|
[求助]当我强制结束另外一个Desktop下的explorer进程时弹出“我的文档”窗口
http://bbs.pediy.com/showthread.php?t=131275 mark. gina\winlogon\sas.c LRESULT SASWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { //... switch (message) { //... case WM_LOGONNOTIFY: // A private notification from Windows DebugLog((DEB_TRACE_SAS, "LOGONNOTIFY message %d\n", wParam )); switch (wParam) { //... case LOGON_RESTARTSHELL: // // Restart the shell after X seconds // // We don't restart the shell for the following conditions: // // 1) No one is logged on // 2) We are in the process of logging off // (logoffflags will be non-zero) // 3) The shell exiting gracefully // (Exit status is in lParam. 1 = graceful) // 4) A new user has logged on after the request // to restart the shell. // (in the case of autoadminlogon, the new // user could be logged on before the restart // request comes through). // if (!pTerm->UserLoggedOn || pTerm->LogoffFlags || (lParam == 1) || (pTerm->TickCount > (DWORD)GetMessageTime())) { break; } SetTimer (hwnd, SHELL_RESTART_TIMER_ID, 2000, NULL); break; //... } return(0); //... case WM_TIMER: { LONG lResult; HKEY hKey; BOOL bRestart = TRUE; DWORD dwType, dwSize; // // Restart the shell // if (wParam != SHELL_RESTART_TIMER_ID) { break; } KillTimer (hwnd, SHELL_RESTART_TIMER_ID); // // Check if we should restart the shell // lResult = RegOpenKeyEx (HKEY_LOCAL_MACHINE, WINLOGON_KEY, 0, KEY_READ, &hKey); if (lResult == ERROR_SUCCESS) { dwSize = sizeof(bRestart); RegQueryValueEx (hKey, TEXT("AutoRestartShell"), NULL, &dwType, (LPBYTE) &bRestart, &dwSize); RegCloseKey (hKey); } if (!pTerm->UserLoggedOn) { bRestart = FALSE; } if (bRestart) { PWCH pchData; PWSTR pszTok; DebugLog((DEB_TRACE, "Restarting user's shell.\n")); pchData = AllocAndGetPrivateProfileString(APPLICATION_NAME, SHELL_KEY, TEXT("explorer.exe"), NULL); if (!pchData) { break; } wsprintfW (szDesktop, L"%s\\%s", pTerm->pWinStaWinlogon->lpWinstaName, APPLICATION_DESKTOP_NAME); pszTok = wcstok(pchData, TEXT(",")); while (pszTok) { if (*pszTok == TEXT(' ')) { while (*pszTok++ == TEXT(' ')) ; } if (StartApplication(pTerm, szDesktop, pTerm->pWinStaWinlogon->UserProcessData.pEnvironment, pszTok)) { ReportWinlogonEvent(pTerm, EVENTLOG_INFORMATION_TYPE, EVENT_SHELL_RESTARTED, 0, NULL, 1, pszTok); } pszTok = wcstok(NULL, TEXT(",")); } Free(pchData); } } break; default: return DefWindowProc(hwnd, message, wParam, lParam); } return 0L; } |
|
获取指定进程的STARTUPINFO
thx, 了解了 LZ这段代码, 看来是已知desktop name了, 在这段代码执行之前想必已经OpenDesktop或者CreateDesktop了, 不然GetThreadDesktop也会失败的. 我这前的想法都是基于不知道desktop name的情况.. |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值