|
[转帖]远程卸载DLL代码
//少女式卸载,1参数为PID,2参数为dll名称 int UnInjectDll(ULONG dwProcessId,CString DllName) { const DWORD dwThreadSize = 4096; Quanxian->EnablePriv(); //提升权限的,这个函数你自己写吧,贴出来占地方 //以下为创建远程线程做准备 // 取得LoadLibraryA函数的地址,我们将以它作为远程线程函数启动 HMODULE hModule=::GetModuleHandle("kernel32.dll"); LPTHREAD_START_ROUTINE pfnStartRoutine = (LPTHREAD_START_ROUTINE)::GetProcAddress(hModule, "GetModuleHandleA"); LPTHREAD_START_ROUTINE pfnFreeRoutine = (LPTHREAD_START_ROUTINE)::GetProcAddress(hModule, "FreeLibrary"); char DllPath[MAX_PATH]; memset(DllPath, 0, MAX_PATH); int nSel = m_modulelist.GetSelectionMark(); m_modulelist.GetItemText(nSel, 0, DllPath, MAX_PATH); // 在目标进程中申请空间,存放字符串szDllName,作为远程线程的参数 int cbSize = (strlen(DllPath) + 1); //以上为创建远程线程做准备 HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcessId); if(NULL != hProcess) { DWORD dwHandle; LPVOID lpRemoteDllName = ::VirtualAllocEx(hProcess, NULL, cbSize, MEM_COMMIT, PAGE_READWRITE); ::WriteProcessMemory(hProcess, lpRemoteDllName, DllPath, cbSize, NULL); // 启动远程线程,并立刻运行 HANDLE hRemoteThread = ::CreateRemoteThread(hProcess, NULL, 0, pfnStartRoutine, lpRemoteDllName, 0, NULL); if(hRemoteThread == NULL) { CloseHandle(hProcess); return FALSE; } // 等待目标线程运行结束,即LoadLibraryA函数返回 ::WaitForSingleObject(hRemoteThread, INFINITE); GetExitCodeThread( hRemoteThread, &dwHandle ); // 释放目标进程中申请的空间 VirtualFreeEx( hProcess, lpRemoteDllName, cbSize, MEM_RELEASE|MEM_DECOMMIT); ::CloseHandle(hRemoteThread); hRemoteThread = CreateRemoteThread( hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)pfnFreeRoutine, (LPVOID)dwHandle, 0, &dwProcessId ); // 等待FreeLibrary卸载完毕 WaitForSingleObject( hRemoteThread, INFINITE ); CloseHandle( hRemoteThread ); CloseHandle(hProcess); m_modulelist.DeleteItem(nSel); } return 0; } //少妇式卸载 typedef DWORD (_stdcall *XXXNtUnmapViewOfSection)( HANDLE hProcess, PVOID Address); void UnloadNtdll() { PVOID NtdllAddress; HANDLE hProcess; XXXNtUnmapViewOfSection NtUnmapViewOfSection; HWND hWindow; BOOL bRet = TRUE; hWindow = FindWindow( NULL, "你要找的名称"); hProcess = OpenProcess( PROCESS_VM_OPERATION, FALSE, PID号); NtUnmapViewOfSection = (XXXNtUnmapViewOfSection)GetProcAddress( GetModuleHandle("你要卸载的dll文件"), "NtUnmapViewOfSection" ); NtdllAddress = (PVOID)NtUnmapViewOfSection; NtUnmapViewOfSection( hProcess, NtdllAddress); CloseHandle( hProcess ); PostMessage( hWindow, WM_MOUSEMOVE, 0 , 0); } |
|
[转帖]DNS补丁被黑客破解
有极大商业价值 |
|
[下载]Rebel.NET Version: 1.1.0.1
重建 .NET assemblies |
|
[下载]HxD 1.7.6.4(8.8.2008)中文版(免费)
类似WINHEX |
|
[下载]ntdllSDK的头文件和lib文件下载
笔记:为ntdll.dll创建移入库ntdll.lib 本来以为很简单的,结果费了一番周折,为了防止下次重蹈覆辙,记个笔记。 一开始的想法: 1、用impdef或dumpbin生成一个ntdll.dll的模块定义文件ntdll.def; 2、用lib /def:ntdll.def生成ntdll.lib; 3、按网上hacker给出的函数原形写个头文件ntdll.h. 结果编译时说无法链接_LdrLoadDll@16,看起来是__stdcall调用约定修饰名的原因,但是找不到办法将链接时的_LdrLoadDll@16转换到DLL实际输出的名称LdrLoadDll,查def文件格式时有EXPORTS部分的写法: entryname[=internalname] [@ordinal [NONAME]] [PRIVATE] [DATA] 以为可以用这种方法换名,于是改def文件: LdrLoadDll@16=LdrLoadDll 重新生成ntdll.lib后程序编译通过,但是运行提示找不到_LdrLoadDll@16入口点,看来这次反过来了,移入库里我名称对了,但还是没对应到DLL实际输出的名称。 想不出办法了,所以到网上搜了一下,发觉原MS在DDK提供了一个ntdll.lib,汗! 最后不知道从哪看到一个说自己建一个dll工程ntdll,然后生成移入库,于是试了试,自己建一个纯win32 dll项目,加一个模块定义文件: EXPORTS LdrLoadDll 再在程序里写一个与ntdll.dll里LdrLoadDll原型一样的空函数,编译一下,得到一个ntdll.lib,用这个编译原来的程序,编译通过,运行, 也OK了,用dumpbin看一下生成的ntdll.lib,呵呵,居然它就是用的_LdrLoadDll@16这个名字,但它却能正确的定位ntdll.dll里的LdrLoadDll,搞不明白了,为什么,lib /def:ntdll.def生成的库就不行:( 这方法麻烦点,不过可行,就这样吧,MS的东西,搞不明白的太多了! |
|
[转帖]微软研发Midori终结Wins时代
LZ一看就是新手,Wins是早期WIN一个效率很差,但易用性不错的3D引擎。 |
|
[分享]Xprotector.v1.08.incl.keyfile.WinApp-GTT
这是FINAL版,不是以前本人发布的BETA版。在2K下稳定性还不错。对于某些服务器程序,这个壳倒是可以一用,这个壳其实是很变态的,能脱掉主程序的人不一定能脱掉SDK加壳。 |
|
[原创]抹掉所有进程中自己的Handle
还有一个方法, NTSTATUS ObDuplicateObject ( IN PEPROCESS SourceProcess, IN HANDLE SourceHandle, IN PEPROCESS TargetProcess OPTIONAL, OUT PHANDLE TargetHandle OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG HandleAttributes, IN ULONG Options, IN KPROCESSOR_MODE PreviousMode ) Options 存在 DUPLICATE_CLOSE_SOURCE 参数. |
|
[原创]从DKOM摘链隐藏进程想到的(文中问题已经解决)
int __stdcall ProrectProcess(int pid) { int status; // eax@1 int pEPROCESS; // [sp+14h] [bp-4h]@1 int v4; // [sp+4h] [bp-14h]@1 int v5; // [sp+0h] [bp-18h]@2 int pThreadListHead; // [sp+8h] [bp-10h]@2 int pListEntry; // [sp+10h] [bp-8h]@2 int pKTHREAD; // [sp+Ch] [bp-Ch]@4 status = PsLookupProces**yProcessId(pid, &pEPROCESS); v4 = status; if ( status >= 0 ) { v5 = pEPROCESS; pThreadListHead = pEPROCESS + 0x50; // EPROCESS->ThreadListHead pListEntry = *(_DWORD *)(pEPROCESS + 0x50); while ( pListEntry != pThreadListHead ) // Ñ»·±éÀúÿ¸öÏß³Ì { pKTHREAD = pListEntry - 0x1B0; // ThreadListEntry->KTHREAD if ( !*(_DWORD *)(pListEntry - 0x1B0 + 0xD4) ) *(_DWORD *)(pKTHREAD + 0xD4) = 11111111; // (pKTHREAD+0xD4)=KernelApcDisable pListEntry = *(_DWORD *)pListEntry; } } return v4; } |
|
|
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值