[原创]深入探究Windows平台客户端安全问题-进程地址空间入侵和白加黑高阶利用
发表于:
2014-9-8 00:03
43091
[原创]深入探究Windows平台客户端安全问题-进程地址空间入侵和白加黑高阶利用
ModLoad: 00000000`73e00000 00000000`73e0d000 E:\Users\xxxxx\Desktop\spookshellext\Release\SpookShlExt.dll
ntdll!NtMapViewOfSection+0xa:
00000000`77b7153a c3 ret
0:000> .effmach x86
Effective machine: x86 compatible (x86)
0:000:x86> kvn 5000
# ChildEBP RetAddr Args to Child
00 002dbd10 77d3bf70 0000027c ffffffff 002dbe3c ntdll32!NtMapViewOfSection+0x12 (FPO: [10,0,0])
01 002dbd64 77d3c5fb 0000027c 00000000 00000000 ntdll32!LdrpMapViewOfSection+0xc7 (FPO: [Non-Fpo])
02 002dbe58 77d3c42c 002dbea4 012dc004 00000000 ntdll32!LdrpFindOrMapDll+0x333 (FPO: [Non-Fpo])
03 002dbfd8 77d3c558 002dc03c 002dc004 00000000 ntdll32!LdrpLoadDll+0x2b2 (FPO: [Non-Fpo])
04 002dc010 75962c95 002dc004 002dc054 002dc03c ntdll32!LdrLoadDll+0xaa (FPO: [Non-Fpo])
05 002dc04c 764a9d43 00000000 00000000 00556614 KERNELBASE!LoadLibraryExW+0x1f1 (FPO: [Non-Fpo])
06 002dc068 764a9cc7 00000000 002dc0e4 00000008 ole32!LoadLibraryWithLogging+0x16 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\common\loadfree.cxx @ 157]
07 002dc08c 764a9bb6 002dc0e4 002dc0b0 002dc0b4 ole32!CClassCache::CDllPathEntry::LoadDll+0xa9 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\dllcache.cxx @ 1925]
08 002dc0bc 764a90be 002dc0e4 002dc3cc 002dc0dc ole32!CClassCache::CDllPathEntry::Create_rl+0x37 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\dllcache.cxx @ 1783]
09 002dc308 764a8f93 00000001 002dc3cc 002dc338 ole32!CClassCache::CClassEntry::CreateDllClassEntry_rl+0xd4 (FPO: [Non-Fpo]) (CONV: thiscall) [d:\w7rtm\com\ole32\com\objact\dllcache.cxx @ 886]
0a 002dc350 764a8e99 00000001 00525464 002dc37c ole32!CClassCache::GetClassObjectActivator+0x224 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\dllcache.cxx @ 4795]
0b 002dc388 764a8c57 002dc3cc 00000000 002dc9d4 ole32!CClassCache::GetClassObject+0x30 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\dllcache.cxx @ 4574]
0c 002dc404 764c3170 765c6444 00000000 002dc9d4 ole32!CServerContextActivator::CreateInstance+0x110 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actvator.cxx @ 974]
0d 002dc444 764a8dca 002dc9d4 00000000 002dcf38 ole32!ActivationPropertiesIn::DelegateCreateInstance+0x108 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\actprops\actprops.cxx @ 1917]
0e 002dc498 764a8d3f 765c646c 00000000 002dc9d4 ole32!CApartmentActivator::CreateInstance+0x112 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actvator.cxx @ 2268]
0f 002dc4b8 764a8ac2 765c6494 00000001 00000000 ole32!CProcessActivator::CCICallback+0x6d (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actvator.cxx @ 1737]
10 002dc4d8 764a8a73 765c6494 002dc830 00000000 ole32!CProcessActivator::AttemptActivation+0x2c (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actvator.cxx @ 1630]
11 002dc514 764a8e2d 765c6494 002dc830 00000000 ole32!CProcessActivator::ActivateByContext+0x4f (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actvator.cxx @ 1487]
12 002dc53c 764c3170 765c6494 00000000 002dc9d4 ole32!CProcessActivator::CreateInstance+0x49 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actvator.cxx @ 1377]
13 002dc57c 764c2ef4 002dc9d4 00000000 002dcf38 ole32!ActivationPropertiesIn::DelegateCreateInstance+0x108 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\actprops\actprops.cxx @ 1917]
14 002dc7dc 764c3170 765c6448 00000000 002dc9d4 ole32!CClientContextActivator::CreateInstance+0xb0 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actvator.cxx @ 685]
15 002dc81c 764c3098 002dc9d4 00000000 002dcf38 ole32!ActivationPropertiesIn::DelegateCreateInstance+0x108 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\actprops\actprops.cxx @ 1917]
16 002dcfec 764c9e25 00545700 00000000 00000401 ole32!ICoCreateInstanceEx+0x404 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\objact.cxx @ 1334]
17 002dd04c 764c9d86 00545700 00000000 00000401 ole32!CComActivator::DoCreateInstance+0xd9 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\immact.hxx @ 343]
18 002dd070 764c9d3f 00545700 00000000 00000401 ole32!CoCreateInstanceEx+0x38 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actapi.cxx @ 157]
19 002dd0a0 76ae82c0 00545700 00000000 00000401 ole32!CoCreateInstance+0x37 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\w7rtm\com\ole32\com\objact\actapi.cxx @ 110]
1a 002dd338 76ae83bd 00545700 00000000 00000401 SHELL32!_SHCoCreateInstance+0x1ac (FPO: [Non-Fpo])
1b 002dd35c 76aa9a6f 00545700 00000000 00000401 SHELL32!SHExtCoCreateInstance+0x1e (FPO: [Non-Fpo])
1c 002dd37c 76a8354e 00545660 00000007 00000002 SHELL32!DCA_SHExtCoCreateInstance+0x32 (FPO: [Non-Fpo])
1d 002dd8f0 76a83a49 00000000 00545610 76a83a19 SHELL32!CFSIconOverlayManager::_s_LoadIconOverlayIdentifiers+0x12b (FPO: [Non-Fpo])
1e 002dd8fc 76a83a19 002dd98c 80004005 00002000 SHELL32!CFSIconOverlayManager::_InitializeHdsaIconOverlays+0xb (FPO: [0,0,0])
1f 002dd910 76a83991 00000000 76a839b8 002dd924 SHELL32!CFSIconOverlayManager::CreateInstance+0x4e (FPO: [Non-Fpo])
20 002dd92c 76a92a84 00000000 00000001 002dd994 SHELL32!IconOverlayManagerInit+0x2a (FPO: [Non-Fpo])
21 002dd93c 76a83974 002dd98c 76889679 002dda00 SHELL32!GetIconOverlayManager+0x17 (FPO: [Non-Fpo])
22 002dd994 76b8210a 00000000 00542058 002ddc10 SHELL32!FileIconInit+0x218 (FPO: [Non-Fpo])
23 002dd9a4 63db4285 00000003 63d45538 002dda00 SHELL32!SHGetImageList+0x1b (FPO: [Non-Fpo])
24 002ddc10 63d543c6 00542058 0001090a 63db4084 explorerframe!CBreadcrumbBar::InitBreadcrumbBar+0x1d9 (FPO: [Non-Fpo])
25 002ddc28 63db4066 00534e80 00541078 00000001 explorerframe!CAddressBand::_EnsureBreadcrumbBar+0x6f (FPO: [0,0,4])
26 002ddc68 63d558ac 00534e80 00534e80 80004005 explorerframe!CAddressBand::_CreateAddressBand+0xf5 (FPO: [Non-Fpo])
27 002ddc80 758f34b6 00541078 00000000 00534e70 explorerframe!CAddressBand::SetSite+0x62 (FPO: [Non-Fpo])
28 002ddcac 63d4acdb 00541080 00534e80 00534e80 SHLWAPI!IUnknown_SetSite+0x44 (FPO: [Non-Fpo])
29 002ddcc8 63d4ad7d 00541080 00000001 00534d78 explorerframe!CBandSite::_AddBandByID+0x91 (FPO: [Non-Fpo])
2a 002ddcdc 63d74082 00534e80 00541080 76889679 explorerframe!CBandSite::AddBand+0x17 (FPO: [Non-Fpo])
2b 002ddd60 63d73e12 00534d78 00534dc0 00000000 explorerframe!CNavBar::_CreateBands+0x11a (FPO: [Non-Fpo])
2c 002dde58 63d74231 00526c48 002dde84 759a8a45 explorerframe!CNavBar::_CreateBar+0x137 (FPO: [Non-Fpo])
2d 002dde64 759a8a45 00534d78 00000001 00000000 explorerframe!CNavBar::ShowDW+0x10 (FPO: [Non-Fpo])
2e 002dde84 759a85bb 00526c48 00000000 000208da COMDLG32!CFileOpenSave::_CreateNavigationBar+0xd8 (FPO: [Non-Fpo])
2f 002de110 759a7f97 000500f4 00000001 759a3a45 COMDLG32!CFileOpenSave::_InitOpenSaveDialog+0x68a (FPO: [Non-Fpo])
30 002de37c 768862fa 000500f4 00000110 000208da COMDLG32!CFileOpenSave::s_OpenSaveDlgProc+0x10b (FPO: [Non-Fpo])
31 002de3a8 768af9df 759a3a45 000500f4 00000110 USER32!InternalCallWinProc+0x23
32 002de424 768af784 0052719c 759a3a45 000500f4 USER32!UserCallDlgProcCheckWow+0xd7 (FPO: [Non-Fpo])
33 002de474 768af889 0131aaa0 00000000 00000110 USER32!DefDlgProcWorker+0xb7 (FPO: [Non-Fpo])
34 002de494 768862fa 000500f4 00000110 000208da USER32!DefDlgProcW+0x29 (FPO: [Non-Fpo])
35 002de4c0 76886d3a 768af860 000500f4 00000110 USER32!InternalCallWinProc+0x23
36 002de538 7688965e 0052719c 77b446b4 000500f4 USER32!UserCallWinProcCheckWow+0x109 (FPO: [Non-Fpo])
37 002de57c 768b206f 0131aaa0 00000000 77b446b4 USER32!SendMessageWorker+0x581 (FPO: [Non-Fpo])
38 002de650 768acf4b 759a0000 00000007 00000000 USER32!InternalCreateDialog+0xb9f (FPO: [Non-Fpo])
39 002de688 768ace8a 759a0000 005272e0 00050810 USER32!InternalDialogBox+0xc1 (FPO: [Non-Fpo])
3a 002de6a8 768acc0e 759a0000 005272e0 00050810 USER32!DialogBoxIndirectParamAorW+0x37 (FPO: [Non-Fpo])
3b 002de6c8 759a597b 759a0000 005272e0 00050810 USER32!DialogBoxIndirectParamW+0x1b (FPO: [Non-Fpo])
3c 002de714 759e1b50 005272e0 00050810 00000000 COMDLG32!CFileOpenSave::Show+0x181 (FPO: [Non-Fpo])
3d 002de740 759e29d0 00526c4c 00000611 00050810 COMDLG32!_InvokeNewFileOpenSave+0xab (FPO: [Non-Fpo])
3e 002de76c 759e2b15 00000611 00050810 00526c4c COMDLG32!_CreateNewFileOpenSaveInProc+0xae (FPO: [Non-Fpo])
3f 002de7a8 759e2b71 00000611 00000000 002de7e4 COMDLG32!NewGetFileName+0x121 (FPO: [Non-Fpo])
40 002de7b8 759d9a9b 002de7f8 00050810 012245c0 COMDLG32!NewGetOpenFileName+0xf (FPO: [Non-Fpo])
41 002de7e4 759da33f 002de7f8 759d9603 012215d0 COMDLG32!GetFileName+0xcd (FPO: [Non-Fpo])
*** ERROR: Module load completed but symbols could not be loaded for MYInjector.exe
42 002df864 0122189f 012245c0 00000000 012215fc COMDLG32!GetOpenFileNameW+0x6a (FPO: [Non-Fpo]) git clone git://git.code.sf.net/p/spoonshlext/code spoonshlext-code
HHOOK WINAPI SetWindowsHookEx(
_In_ int idHook,
_In_ HOOKPROC lpfn,
_In_ HINSTANCE hMod,
_In_ DWORD dwThreadId); HHOOK SetWindowsHookExAW(
int idHook,
HOOKPROC lpfn,
HINSTANCE hmod,
DWORD dwThreadID,
DWORD dwFlags)
{
WCHAR pwszLibFileName[MAX_PATH];
/*
* If we're passing an hmod, we need to grab the file name of the
* module while we're still on the client since module handles
* are NOT global.
*/
if (hmod != NULL) {
// 在这里获取传入的hMod的模块所在的全路径
if (GetModuleFileNameW(hmod, pwszLibFileName, sizeof(pwszLibFileName)/sizeof(TCHAR)) == 0) {
/*
* hmod is bogus - return NULL.
*/
return NULL;
}
………………………………
………………………………
return _SetWindowsHookEx(hmod,
(hmod == NULL) ? NULL : pwszLibFileName,
dwThreadID, idHook, (PROC)lpfn, dwFlags);
}
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)
上传的附件: