Здравствуйте. PFNCLIENT - Client side functisons pointer structure. Как можно в WindowsXP 32\64 получить адрес на PFNCLIENT (Ansi\Unicode), не используя структуру SERVERINFO? В данный момент делаю так: Код (Text): PVOID pv1 = NULL; PVOID pv2 = NULL; pv1 = (PVOID)((UINT_PTR)gServerInfo + 0x00000E8); if(IsX64Windows()) pv2 = (PVOID)((UINT_PTR)pv1 + sizeof(_PFNCLIENT64)); else pv2 = (PVOID)((UINT_PTR)pv1 + sizeof(_PFNCLIENT32)); Код работает - но проверял только на WindowsXP 32 бита. Вот думаю что это не оч. хороший метод - но тем не менее лучшего пока нет. P.S. Еще есть опасение из-за того что в Windows Seven PFNCLIENT уже не храниться в SERVERINFO.
Это лысо, притом весьма прозрачно; Никаких готовых решений на этот раз. Впрочем, раз тема была затронута, один может взглянуть на этот дамп: Код (Text): lkd> vertarget Windows 7 Kernel Version 7600 MP (2 procs) Free x64 Product: WinNt, suite: TerminalServer SingleUserTS Built by: 7600.16385.amd64fre.win7_rtm.090713-1255 lkd> x win32k!*sharedinfo* fffff960`0034d300 win32k!gSharedInfo = struct tagSharedInfo lkd> dt win32k!tagSharedInfo +0x000 psi : Ptr64 tagSERVERINFO +0x008 aheList : Ptr64 _HANDLEENTRY +0x010 HeEntrySize : Uint4B +0x018 pDispInfo : Ptr64 tagDISPLAYINFO +0x020 ulSharedDelta : Uint8B +0x028 awmControl : [31] _WNDMSG +0x218 DefWindowMsgs : _WNDMSG +0x228 DefWindowSpecMsgs : _WNDMSG lkd> dt win32k!tagSharedInfo fffff960`0034d300 +0x000 psi : 0xfffff900`c0580a70 tagSERVERINFO +0x008 aheList : 0xfffff900`c0400000 _HANDLEENTRY +0x010 HeEntrySize : 0x18 +0x018 pDispInfo : 0xfffff900`c0581e50 tagDISPLAYINFO +0x020 ulSharedDelta : 0 +0x028 awmControl : [31] _WNDMSG +0x218 DefWindowMsgs : _WNDMSG +0x228 DefWindowSpecMsgs : _WNDMSG lkd> dt 0xfffff900`c0580a70 tagSERVERINFO Exit on Control-C lkd> dt 0xfffff900`c0580a70 win32k!tagSERVERINFO +0x000 dwSRVIFlags : 0x554 +0x008 cHandleEntries : 0x16aa +0x010 mpFnidPfn : [32] 0xfffff960`0015bb88 int64 win32k!xxxWrapSBWndProc+0 +0x110 aStoCidPfn : [7] 0xfffff960`001892e8 int64 win32k!xxxSBWndProc+0 +0x148 mpFnid_serverCBWndProc : [31] 0x170 +0x188 apfnClientA : _PFNCLIENT +0x240 apfnClientW : _PFNCLIENT +0x2f8 apfnClientWorker : _PFNCLIENTWORKER +0x350 cbHandleTable : 0x22000 +0x354 atomSysClass : [25] 0xc017 +0x388 dwDefaultHeapBase : 0 +0x38c dwDefaultHeapSize : 0x1400000 +0x390 uiShellMsg : 0xc02b +0x394 MBStrings : [11] tagMBSTRING +0x54c atomIconSmProp : 0xc029 +0x54e atomIconProp : 0xc02a +0x550 atomContextHelpIdProp : 0xc028 +0x552 atomFrostedWindowProp : 0xc02c +0x554 acOemToAnsi : [256] "" +0x654 acAnsiToOem : [256] "" +0x754 dwInstalledEventHooks : 0x8105 +0x758 aiSysMet : [97] 1280 +0x8dc argbSystemUnmatched : [31] 0x500 +0x958 argbSystem : [31] 0x15 +0x9d8 ahbrSystem : [31] (null) +0xad0 hbrGray : 0x00ff9933`00f2e4d7 HBRUSH__ +0xad8 ptCursor : tagPOINT +0xae0 ptCursorReal : tagPOINT +0xae8 dwLastRITEventTickCount : 0xdbcdbf +0xaec nEvents : 15790320 +0xaf0 dtScroll : 0xffffff +0xaf4 dtLBSearch : 0x646464 +0xaf8 dtCaretBlink : 0 +0xafc ucWheelScrollLines : 0 +0xb00 ucWheelScrollChars : 0 +0xb04 wMaxLeftOverlapChars : 11842740 +0xb08 wMaxRightOverlapChars : 16578548 +0xb0c cxSysFontChar : 11250603 +0xb10 cySysFontChar : 16750899 +0xb14 tmSysFont : tagTEXTMETRICW +0xb50 dpiSystem : tagDPISERVERINFO +0xb78 hIconSmWindows : 0x00000000`01100079 HICON__ +0xb80 hIcoWindows : 0x00000000`0110007a HICON__ +0xb88 dwKeyCache : 0x110007b +0xb8c dwAsyncKeyCache : 0 +0xb90 cCaptures : 0x110007c +0xb94 oembmi : [93] tagOEMBITMAPINFO +0x1164 rcScreenReal : tagRECT +0x1174 BitCount : 0x11 +0x1176 dmLogPixels : 0 +0x1178 Planes : 0x11 '' +0x1179 BitsPixel : 0 '' +0x117c PUSIFlags : 0x82 +0x1180 uCaretWidth : 0x5d +0x1184 UILangID : 0x11 +0x1188 dwLastSystemRITEventTickCountUpdate : 0x11 +0x118c adwDBGTAGFlags : [35] 0x93 +0x1218 dwTagCount : 0xd +0x121c dwRIPFlags : 0x1a lkd> dps 0xfffff900`c0580a70+10 L100/8 fffff900`c0580a80 fffff960`0015bb88 win32k!xxxWrapSBWndProc fffff900`c0580a88 fffff960`001207c0 win32k!xxxWrapRealDefWindowProc fffff900`c0580a90 fffff960`0015bbe0 win32k!xxxWrapMenuWindowProc fffff900`c0580a98 fffff960`0015bc38 win32k!xxxWrapDesktopWndProc fffff900`c0580aa0 fffff960`001207c0 win32k!xxxWrapRealDefWindowProc fffff900`c0580aa8 fffff960`001207c0 win32k!xxxWrapRealDefWindowProc fffff900`c0580ab0 fffff960`0015bc90 win32k!xxxWrapSwitchWndProc fffff900`c0580ab8 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580ac0 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580ac8 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580ad0 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580ad8 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580ae0 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580ae8 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580af0 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580af8 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580b00 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580b08 fffff960`001c7224 win32k!fnHkINLPCWPEXSTRUCT fffff900`c0580b10 fffff960`001c72b8 win32k!fnHkINLPCWPRETEXSTRUCT fffff900`c0580b18 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580b20 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580b28 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580b30 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580b38 fffff960`000f3374 win32k!xxxWrapSendMessage fffff900`c0580b40 fffff960`00179204 win32k!xxxSendMessageFF fffff900`c0580b48 fffff960`000eec34 win32k!xxxSendMessageEx fffff900`c0580b50 fffff960`0015be08 win32k!xxxWrapCallWindowProc fffff900`c0580b58 fffff960`000e0790 win32k!xxxWrapSendMessageBSM fffff900`c0580b60 fffff960`00252f74 win32k!prunPlgReadError fffff900`c0580b68 fffff960`000e1ef4 win32k!xxxWrapSendNotifyMessage fffff900`c0580b70 fffff960`0015bcf0 win32k!xxxWrapSendMessageCallback fffff900`c0580b78 fffff960`00252f74 win32k!prunPlgReadError lkd> dps 0xfffff900`c0580a70+110 L7 fffff900`c0580b80 fffff960`001892e8 win32k!xxxSBWndProc fffff900`c0580b88 fffff960`000fc080 win32k!xxxDefWindowProc fffff900`c0580b90 fffff960`00193570 win32k!xxxMenuWindowProc fffff900`c0580b98 fffff960`000fc200 win32k!xxxDesktopWndProc fffff900`c0580ba0 fffff960`000fc080 win32k!xxxDefWindowProc fffff900`c0580ba8 fffff960`000fc080 win32k!xxxDefWindowProc fffff900`c0580bb0 00000000`00000000 lkd> dt 0xfffff900`c0580a70 win32k!tagSERVERINFO apfnClient. +0x188 apfnClientA : +0x000 pfnScrollBarWndProc : 0x00000000`77c1930c int64 ntdll!NtdllScrollBarWndProc_A+0 +0x008 pfnTitleWndProc : 0x00000000`77bb18d8 int64 ntdll!NtdllDefWindowProc_A+0 +0x010 pfnMenuWndProc : 0x00000000`77c1932c int64 ntdll!NtdllMenuWndProc_A+0 +0x018 pfnDesktopWndProc : 0x00000000`77c1934c int64 ntdll!NtdllDesktopWndProc_A+0 +0x020 pfnDefWindowProc : 0x00000000`77bb18d8 int64 ntdll!NtdllDefWindowProc_A+0 +0x028 pfnMessageWindowProc : 0x00000000`77bb18d8 int64 ntdll!NtdllDefWindowProc_A+0 +0x030 pfnSwitchWindowProc : 0x00000000`77c1936c int64 ntdll!NtdllSwitchWindowProc_A+0 +0x038 pfnButtonWndProc : 0x00000000`77c1938c int64 ntdll!NtdllButtonWndProc_A+0 +0x040 pfnComboBoxWndProc : 0x00000000`77c193ac int64 ntdll!NtdllComboBoxWndProc_A+0 +0x048 pfnComboListBoxProc : 0x00000000`77c193cc int64 ntdll!NtdllComboListBoxProc_A+0 +0x050 pfnDialogWndProc : 0x00000000`77c193ec int64 ntdll!NtdllDialogWndProc_A+0 +0x058 pfnEditWndProc : 0x00000000`77c193fc int64 ntdll!NtdllEditWndProc_A+0 +0x060 pfnListBoxWndProc : 0x00000000`77c1941c int64 ntdll!NtdllListBoxWndProc_A+0 +0x068 pfnMDIClientWndProc : 0x00000000`77c1943c int64 ntdll!NtdllMDIClientWndProc_A+0 +0x070 pfnStaticWndProc : 0x00000000`77c1945c int64 ntdll!NtdllStaticWndProc_A+0 +0x078 pfnImeWndProc : 0x00000000`77c1947c int64 ntdll!NtdllImeWndProc_A+0 +0x080 pfnGhostWndProc : 0x00000000`77c1948c int64 ntdll!NtdllGhostWndProc_A+0 +0x088 pfnHkINLPCWPSTRUCT : 0x00000000`77c194ac int64 ntdll!NtdllHkINLPCWPSTRUCT_A+0 +0x090 pfnHkINLPCWPRETSTRUCT : 0x00000000`77c194bc int64 ntdll!NtdllHkINLPCWPRETSTRUCT_A+0 +0x098 pfnDispatchHook : 0x00000000`77c194dc int64 ntdll!NtdllDispatchHook_A+0 +0x0a0 pfnDispatchDefWindowProc : 0x00000000`77c194fc int64 ntdll!NtdllDispatchDefWindowProc_A+0 +0x0a8 pfnDispatchMessage : 0x00000000`77c1951c int64 ntdll!NtdllDispatchMessage_A+0 +0x0b0 pfnMDIActivateDlgProc : 0x00000000`77c1952c int64 ntdll!NtdllMDIActivateDlgProc_A+0 +0x240 apfnClientW : +0x000 pfnScrollBarWndProc : 0x00000000`77c1931c int64 ntdll!NtdllScrollBarWndProc_W+0 +0x008 pfnTitleWndProc : 0x00000000`77bd5dd0 int64 ntdll!NtdllDefWindowProc_W+0 +0x010 pfnMenuWndProc : 0x00000000`77c1933c int64 ntdll!NtdllMenuWndProc_W+0 +0x018 pfnDesktopWndProc : 0x00000000`77c1935c int64 ntdll!NtdllDesktopWndProc_W+0 +0x020 pfnDefWindowProc : 0x00000000`77bd5dd0 int64 ntdll!NtdllDefWindowProc_W+0 +0x028 pfnMessageWindowProc : 0x00000000`77bd5dd0 int64 ntdll!NtdllDefWindowProc_W+0 +0x030 pfnSwitchWindowProc : 0x00000000`77c1937c int64 ntdll!NtdllSwitchWindowProc_W+0 +0x038 pfnButtonWndProc : 0x00000000`77c1939c int64 ntdll!NtdllButtonWndProc_W+0 +0x040 pfnComboBoxWndProc : 0x00000000`77c193bc int64 ntdll!NtdllComboBoxWndProc_W+0 +0x048 pfnComboListBoxProc : 0x00000000`77c193dc int64 ntdll!NtdllComboListBoxProc_W+0 +0x050 pfnDialogWndProc : 0x00000000`77bb39e8 int64 ntdll!NtdllDialogWndProc_W+0 +0x058 pfnEditWndProc : 0x00000000`77c1940c int64 ntdll!NtdllEditWndProc_W+0 +0x060 pfnListBoxWndProc : 0x00000000`77c1942c int64 ntdll!NtdllListBoxWndProc_W+0 +0x068 pfnMDIClientWndProc : 0x00000000`77c1944c int64 ntdll!NtdllMDIClientWndProc_W+0 +0x070 pfnStaticWndProc : 0x00000000`77c1946c int64 ntdll!NtdllStaticWndProc_W+0 +0x078 pfnImeWndProc : 0x00000000`77bbe290 int64 ntdll!NtdllImeWndProc_W+0 +0x080 pfnGhostWndProc : 0x00000000`77c1949c int64 ntdll!NtdllGhostWndProc_W+0 +0x088 pfnHkINLPCWPSTRUCT : 0x00000000`77b9dcc4 int64 ntdll!NtdllHkINLPCWPSTRUCT_W+0 +0x090 pfnHkINLPCWPRETSTRUCT : 0x00000000`77c194cc int64 ntdll!NtdllHkINLPCWPRETSTRUCT_W+0 +0x098 pfnDispatchHook : 0x00000000`77c194ec int64 ntdll!NtdllDispatchHook_W+0 +0x0a0 pfnDispatchDefWindowProc : 0x00000000`77c1950c int64 ntdll!NtdllDispatchDefWindowProc_W+0 +0x0a8 pfnDispatchMessage : 0x00000000`77bd5dc0 int64 ntdll!NtdllDispatchMessage_W+0 +0x0b0 pfnMDIActivateDlgProc : 0x00000000`77c1953c int64 ntdll!NtdllMDIActivateDlgProc_W+0 +0x2f8 apfnClientWorker : +0x000 pfnButtonWndProc : 0x00000000`77c1954c int64 ntdll!NtdllButtonWndProcWorker+0 +0x008 pfnComboBoxWndProc : 0x00000000`77c1955c int64 ntdll!NtdllComboBoxWndProcWorker+0 +0x010 pfnComboListBoxProc : 0x00000000`77c1956c int64 ntdll!NtdllComboListBoxProcWorker+0 +0x018 pfnDialogWndProc : 0x00000000`77bbe8dc int64 ntdll!NtdllDialogWndProcWorker+0 +0x020 pfnEditWndProc : 0x00000000`77c1957c int64 ntdll!NtdllEditWndProcWorker+0 +0x028 pfnListBoxWndProc : 0x00000000`77c1958c int64 ntdll!NtdllListBoxWndProcWorker+0 +0x030 pfnMDIClientWndProc : 0x00000000`77c1959c int64 ntdll!NtdllMDIClientWndProcWorker+0 +0x038 pfnStaticWndProc : 0x00000000`77c195ac int64 ntdll!NtdllStaticWndProcWorker+0 +0x040 pfnImeWndProc : 0x00000000`77bbdaa4 int64 ntdll!NtdllImeWndProcWorker+0 +0x048 pfnGhostWndProc : 0x00000000`77c195bc int64 ntdll!NtdllGhostWndProcWorker+0 +0x050 pfnCtfHookProc : 0x00000000`77bbda58 int64 ntdll!NtdllCtfHookProcWorker+0 И в сфокусированном виде: Код (Text): lkd> dps 0xfffff900`c0580a70 +110 L(2f8+50-110)/8 + 1 fffff900`c0580b80 fffff960`001892e8 win32k!xxxSBWndProc fffff900`c0580b88 fffff960`000fc080 win32k!xxxDefWindowProc fffff900`c0580b90 fffff960`00193570 win32k!xxxMenuWindowProc fffff900`c0580b98 fffff960`000fc200 win32k!xxxDesktopWndProc fffff900`c0580ba0 fffff960`000fc080 win32k!xxxDefWindowProc fffff900`c0580ba8 fffff960`000fc080 win32k!xxxDefWindowProc fffff900`c0580bb0 00000000`00000000 fffff900`c0580bb8 01280130`01280170 fffff900`c0580bc0 01300000`012c0000 fffff900`c0580bc8 01300146`01300130 fffff900`c0580bd0 01300130`01380130 fffff900`c0580bd8 00000000`00000130 fffff900`c0580be0 00000000`00000000 fffff900`c0580be8 00000000`00000000 fffff900`c0580bf0 00000000`00000158 fffff900`c0580bf8 00000000`77c1930c ntdll!NtdllScrollBarWndProc_A fffff900`c0580c00 00000000`77bb18d8 ntdll!NtdllDefWindowProc_A fffff900`c0580c08 00000000`77c1932c ntdll!NtdllMenuWndProc_A fffff900`c0580c10 00000000`77c1934c ntdll!NtdllDesktopWndProc_A fffff900`c0580c18 00000000`77bb18d8 ntdll!NtdllDefWindowProc_A fffff900`c0580c20 00000000`77bb18d8 ntdll!NtdllDefWindowProc_A fffff900`c0580c28 00000000`77c1936c ntdll!NtdllSwitchWindowProc_A fffff900`c0580c30 00000000`77c1938c ntdll!NtdllButtonWndProc_A fffff900`c0580c38 00000000`77c193ac ntdll!NtdllComboBoxWndProc_A fffff900`c0580c40 00000000`77c193cc ntdll!NtdllComboListBoxProc_A fffff900`c0580c48 00000000`77c193ec ntdll!NtdllDialogWndProc_A fffff900`c0580c50 00000000`77c193fc ntdll!NtdllEditWndProc_A fffff900`c0580c58 00000000`77c1941c ntdll!NtdllListBoxWndProc_A fffff900`c0580c60 00000000`77c1943c ntdll!NtdllMDIClientWndProc_A fffff900`c0580c68 00000000`77c1945c ntdll!NtdllStaticWndProc_A fffff900`c0580c70 00000000`77c1947c ntdll!NtdllImeWndProc_A fffff900`c0580c78 00000000`77c1948c ntdll!NtdllGhostWndProc_A fffff900`c0580c80 00000000`77c194ac ntdll!NtdllHkINLPCWPSTRUCT_A fffff900`c0580c88 00000000`77c194bc ntdll!NtdllHkINLPCWPRETSTRUCT_A fffff900`c0580c90 00000000`77c194dc ntdll!NtdllDispatchHook_A fffff900`c0580c98 00000000`77c194fc ntdll!NtdllDispatchDefWindowProc_A fffff900`c0580ca0 00000000`77c1951c ntdll!NtdllDispatchMessage_A fffff900`c0580ca8 00000000`77c1952c ntdll!NtdllMDIActivateDlgProc_A fffff900`c0580cb0 00000000`77c1931c ntdll!NtdllScrollBarWndProc_W fffff900`c0580cb8 00000000`77bd5dd0 ntdll!NtdllDefWindowProc_W fffff900`c0580cc0 00000000`77c1933c ntdll!NtdllMenuWndProc_W fffff900`c0580cc8 00000000`77c1935c ntdll!NtdllDesktopWndProc_W fffff900`c0580cd0 00000000`77bd5dd0 ntdll!NtdllDefWindowProc_W fffff900`c0580cd8 00000000`77bd5dd0 ntdll!NtdllDefWindowProc_W fffff900`c0580ce0 00000000`77c1937c ntdll!NtdllSwitchWindowProc_W fffff900`c0580ce8 00000000`77c1939c ntdll!NtdllButtonWndProc_W fffff900`c0580cf0 00000000`77c193bc ntdll!NtdllComboBoxWndProc_W fffff900`c0580cf8 00000000`77c193dc ntdll!NtdllComboListBoxProc_W fffff900`c0580d00 00000000`77bb39e8 ntdll!NtdllDialogWndProc_W fffff900`c0580d08 00000000`77c1940c ntdll!NtdllEditWndProc_W fffff900`c0580d10 00000000`77c1942c ntdll!NtdllListBoxWndProc_W fffff900`c0580d18 00000000`77c1944c ntdll!NtdllMDIClientWndProc_W fffff900`c0580d20 00000000`77c1946c ntdll!NtdllStaticWndProc_W fffff900`c0580d28 00000000`77bbe290 ntdll!NtdllImeWndProc_W fffff900`c0580d30 00000000`77c1949c ntdll!NtdllGhostWndProc_W fffff900`c0580d38 00000000`77b9dcc4 ntdll!NtdllHkINLPCWPSTRUCT_W fffff900`c0580d40 00000000`77c194cc ntdll!NtdllHkINLPCWPRETSTRUCT_W fffff900`c0580d48 00000000`77c194ec ntdll!NtdllDispatchHook_W fffff900`c0580d50 00000000`77c1950c ntdll!NtdllDispatchDefWindowProc_W fffff900`c0580d58 00000000`77bd5dc0 ntdll!NtdllDispatchMessage_W fffff900`c0580d60 00000000`77c1953c ntdll!NtdllMDIActivateDlgProc_W fffff900`c0580d68 00000000`77c1954c ntdll!NtdllButtonWndProcWorker fffff900`c0580d70 00000000`77c1955c ntdll!NtdllComboBoxWndProcWorker fffff900`c0580d78 00000000`77c1956c ntdll!NtdllComboListBoxProcWorker fffff900`c0580d80 00000000`77bbe8dc ntdll!NtdllDialogWndProcWorker fffff900`c0580d88 00000000`77c1957c ntdll!NtdllEditWndProcWorker fffff900`c0580d90 00000000`77c1958c ntdll!NtdllListBoxWndProcWorker fffff900`c0580d98 00000000`77c1959c ntdll!NtdllMDIClientWndProcWorker fffff900`c0580da0 00000000`77c195ac ntdll!NtdllStaticWndProcWorker fffff900`c0580da8 00000000`77bbdaa4 ntdll!NtdllImeWndProcWorker fffff900`c0580db0 00000000`77c195bc ntdll!NtdllGhostWndProcWorker fffff900`c0580db8 00000000`77bbda58 ntdll!NtdllCtfHookProcWorker В совокупности со знанием о доступности получения адреса оконной процедуры универсальный алгоритм поиска _PFNCLIENT внутри SERVERINFO для любой системы становится очевидным. >pv1 = (PVOID)((UINT_PTR)gServerInfo + 0x00000E8) Нам кажется, что если уж делать поддержку x64, то имеет смысл изначально работать именно с такой системой, а не делать странных предположений.
Sol_Ksacap А возможно ли узнать PFNCLIENT без использования структуры SERVERINFO? (может как нибудь через Csr* ф-ии?) Меня интересует только WindowsXP 32\64.
>А возможно ли узнать PFNCLIENT без использования структуры SERVERINFO? Нам ничего об этом не известно. А сервер подсистемы – не волшебная пуля: Код (Text): lkd> vertarget Windows 7 Kernel Version 7600 MP (2 procs) Free x64 Product: WinNt, suite: TerminalServer SingleUserTS Built by: 7600.16385.amd64fre.win7_rtm.090713-1255 lkd> !process 0 0 csrss.exe PROCESS fffffa8002cda840 SessionId: 0 Cid: 017c Peb: 7fffffd9000 ParentCid: 0174 DirBase: 19f8e000 ObjectTable: fffff8a000c82a40 HandleCount: 471. Image: csrss.exe PROCESS fffffa80035fcb30 SessionId: 1 Cid: 01c8 Peb: 7fffffd4000 ParentCid: 01a4 DirBase: 186cd000 ObjectTable: fffff8a005106910 HandleCount: 611. Image: csrss.exe lkd> .process /p /r fffffa80035fcb30 Implicit process is now fffffa80`035fcb30 Loading User Symbols .......WARNING: Loader 00000000`00283ab0 timestamp 0004ac81 != header timestamp 4a5bdfdf ......... lkd> lmm csrsrv* Browse full module list start end module name 000007fe`fdb70000 000007fe`fdb83000 CSRSRV (deferred) lkd> dps CSRSRV!CsrLoadedServerDll L8 000007fe`fdb7e740 00000000`00283480 000007fe`fdb7e748 00000000`00283590 000007fe`fdb7e750 00000000`002ab030 000007fe`fdb7e758 00000000`002a99a0 000007fe`fdb7e760 00000000`002ab0c0 000007fe`fdb7e768 00000000`7efe0000 000007fe`fdb7e770 00000000`00000090 000007fe`fdb7e778 00000000`00000078 lkd> dps 00283480 L10 00000000`00283480 00000000`00060005 00000000`00283488 00000000`002834f8 00000000`00283490 00000000`00000000 00000000`00283498 00000000`00000000 00000000`002834a0 00000005`00000000 00000000`002834a8 000007fe`fdb713b8 CSRSRV!CsrServerApiDispatchTable 00000000`002834b0 000007fe`fdb7a170 CSRSRV!CsrServerApiServerValidTable 00000000`002834b8 00000000`00000000 00000000`002834c0 00000000`00000000 00000000`002834c8 00000000`00000000 00000000`002834d0 00000000`00000000 00000000`002834d8 00000000`00000000 00000000`002834e0 00000000`7efe0000 00000000`002834e8 00000000`00000000 00000000`002834f0 00000000`00000000 00000000`002834f8 00000053`53525343 lkd> as /x OffsetApiTable 002834a8 - 00283480 lkd> as /x OffsetName 002834f8 - 00283480 lkd> al Alias Value ------- ------- OffsetApiTable 0x28 OffsetName 0x78 lkd> r$t0=0; .while (@$t0 < 5) {r$t1= poi(CSRSRV!CsrLoadedServerDll + @$ptrsize * @$t0); .echo;.echo;.echo; da @$t1 + OffsetName ; .echo; dps @$t1 L(1 + OffsetName / @$ptrsize); .echo; dps poi(@$t1 + OffsetApiTable ) L(dwo(@$t1 + OffsetApiTable - 4) - dwo(@$t1 + OffsetApiTable - 8)); r$t0= @$t0+1} 00000000`002834f8 "CSRSS" 00000000`00283480 00000000`00060005 00000000`00283488 00000000`002834f8 00000000`00283490 00000000`00000000 00000000`00283498 00000000`00000000 00000000`002834a0 00000005`00000000 00000000`002834a8 000007fe`fdb713b8 CSRSRV!CsrServerApiDispatchTable 00000000`002834b0 000007fe`fdb7a170 CSRSRV!CsrServerApiServerValidTable 00000000`002834b8 00000000`00000000 00000000`002834c0 00000000`00000000 00000000`002834c8 00000000`00000000 00000000`002834d0 00000000`00000000 00000000`002834d8 00000000`00000000 00000000`002834e0 00000000`7efe0000 00000000`002834e8 00000000`00000000 00000000`002834f0 00000000`00000000 00000000`002834f8 00000053`53525343 000007fe`fdb713b8 000007fe`fdb738f8 CSRSRV!CsrSrvClientConnect 000007fe`fdb713c0 000007fe`fdb726dc CSRSRV!CsrSrvUnusedFunction 000007fe`fdb713c8 000007fe`fdb726dc CSRSRV!CsrSrvUnusedFunction 000007fe`fdb713d0 000007fe`fdb726dc CSRSRV!CsrSrvUnusedFunction 000007fe`fdb713d8 000007fe`fdb726dc CSRSRV!CsrSrvUnusedFunction 00000000`00283608 "basesrv" 00000000`00283590 00000000`00080007 00000000`00283598 00000000`00283608 00000000`002835a0 000007fe`fdb50000 basesrv!_imp_CsrUnlockProcess <PERF> (basesrv+0x0) 00000000`002835a8 00000000`00000001 00000000`002835b0 0000001d`00000000 00000000`002835b8 000007fe`fdb51930 basesrv!BaseServerApiDispatchTable 00000000`002835c0 000007fe`fdb5d270 basesrv!BaseServerApiServerValidTable 00000000`002835c8 00000000`00000000 00000000`002835d0 00000000`00000000 00000000`002835d8 000007fe`fdb52e04 basesrv!BaseClientConnectRoutine 00000000`002835e0 000007fe`fdb52e1c basesrv!BaseClientDisconnectRoutine 00000000`002835e8 00000000`00000000 00000000`002835f0 00000000`7efe0ac0 00000000`002835f8 00000000`00000000 00000000`00283600 00000000`00000000 00000000`00283608 00767273`65736162 000007fe`fdb51930 000007fe`fdb54b44 basesrv!BaseSrvCreateProcess 000007fe`fdb51938 000007fe`fdb54fb8 basesrv!BaseSrvCreateThread 000007fe`fdb51940 000007fe`fdb551b4 basesrv!BaseSrvDeadEntry 000007fe`fdb51948 000007fe`fdb55188 basesrv!BaseSrvExitProcess 000007fe`fdb51950 000007fe`fdb551b4 basesrv!BaseSrvDeadEntry 000007fe`fdb51958 000007fe`fdb5547c basesrv!BaseSrvCheckVDM 000007fe`fdb51960 000007fe`fdb5562c basesrv!BaseSrvUpdateVDMEntry 000007fe`fdb51968 000007fe`fdb55674 basesrv!BaseSrvGetNextVDMCommand 000007fe`fdb51970 000007fe`fdb55f50 basesrv!BaseSrvExitVDM 000007fe`fdb51978 000007fe`fdb55f98 basesrv!BaseSrvIsFirstVDM 000007fe`fdb51980 000007fe`fdb579e4 basesrv!BaseSrvGetVDMExitCode 000007fe`fdb51988 000007fe`fdb58238 basesrv!BaseSrvSetReenterCount 000007fe`fdb51990 000007fe`fdb551c0 basesrv!BaseSrvSetProcessShutdownParam 000007fe`fdb51998 000007fe`fdb551f8 basesrv!BaseSrvGetProcessShutdownParam 000007fe`fdb519a0 000007fe`fdb56028 basesrv!BaseSrvSetVDMCurDirs 000007fe`fdb519a8 000007fe`fdb56398 basesrv!BaseSrvGetVDMCurDirs 000007fe`fdb519b0 000007fe`fdb5615c basesrv!BaseSrvBatNotification 000007fe`fdb519b8 000007fe`fdb56224 basesrv!BaseSrvRegisterWowExec 000007fe`fdb519c0 000007fe`fdb5ae18 basesrv!BaseSrvSoundSentryNotification 000007fe`fdb519c8 000007fe`fdb5a7ec basesrv!BaseSrvRefreshIniFileMapping 000007fe`fdb519d0 000007fe`fdb52f54 basesrv!BaseSrvDefineDosDevice 000007fe`fdb519d8 000007fe`fdb5ad0c basesrv!BaseSrvSetTermsrvAppInstallMode 000007fe`fdb519e0 000007fe`fdb5411c basesrv!BaseSrvSetTermsrvClientTimeZone 000007fe`fdb519e8 000007fe`fdb55224 basesrv!BaseSrvCreateActivationContext 000007fe`fdb519f0 000007fe`fdb551b4 basesrv!BaseSrvDeadEntry 000007fe`fdb519f8 000007fe`fdb550c0 basesrv!BaseSrvRegisterThread 000007fe`fdb51a00 000007fe`fdb54f5c basesrv!BaseSrvDeferredCreateProcess 000007fe`fdb51a08 000007fe`fdb59930 basesrv!BaseSrvNlsGetUserInfo 000007fe`fdb51a10 000007fe`fdb59a28 basesrv!BaseSrvNlsUpdateCacheCount 00000000`002ab0a8 "winsrv" 00000000`002ab030 00000000`00070006 00000000`002ab038 00000000`002ab0a8 00000000`002ab040 000007fe`fdb10000 winsrv!_delayLoadHelper2 <PERF> (winsrv+0x0) 00000000`002ab048 00000000`00000002 00000000`002ab050 00000000`00000000 00000000`002ab058 00000000`00000000 00000000`002ab060 00000000`00000000 00000000`002ab068 00000000`00000000 00000000`002ab070 00000000`00000090 00000000`002ab078 000007fe`fdb113b4 winsrv!ConsoleClientConnectRoutine 00000000`002ab080 000007fe`fdb11270 winsrv!ConsoleClientDisconnectRoutine 00000000`002ab088 00000000`00000000 00000000`002ab090 00000000`7efe0000 00000000`002ab098 000007fe`fdb11300 winsrv!ConsoleAddProcessRoutine 00000000`002ab0a0 00000000`00000000 00000000`002ab0a8 00007672`736e6977 00000000`002a9a18 "winsrv" 00000000`002a99a0 00000000`00070006 00000000`002a99a8 00000000`002a9a18 00000000`002a99b0 000007fe`fdb10000 winsrv!_delayLoadHelper2 <PERF> (winsrv+0x0) 00000000`002a99b8 00000000`00000003 00000000`002a99c0 0000040a`00000400 00000000`002a99c8 000007fe`fdb26960 winsrv!UserServerApiDispatchTable 00000000`002a99d0 000007fe`fdb2b8b8 winsrv!UserServerApiServerValidTable 00000000`002a99d8 00000000`00000000 00000000`002a99e0 00000000`00000000 00000000`002a99e8 000007fe`fdb1145c winsrv!UserClientConnect 00000000`002a99f0 00000000`00000000 00000000`002a99f8 000007fe`fdb231b0 winsrv!UserHardError 00000000`002a9a00 00000000`7efe0000 00000000`002a9a08 00000000`00000000 00000000`002a9a10 000007fe`fdb1e064 winsrv!UserClientShutdown 00000000`002a9a18 00007672`736e6977 000007fe`fdb26960 000007fe`fdb1ff70 winsrv!SrvExitWindowsEx 000007fe`fdb26968 000007fe`fdb145bc winsrv!SrvEndTask 000007fe`fdb26970 000007fe`fdb12bd8 winsrv!SrvLogon 000007fe`fdb26978 000007fe`fdb21314 winsrv!SrvActivateDebugger 000007fe`fdb26980 000007fe`fdb1409c winsrv!SrvDeviceEvent 000007fe`fdb26988 000007fe`fdb14280 winsrv!SrvCreateSystemThreads 000007fe`fdb26990 000007fe`fdb20528 winsrv!SrvRecordShutdownReason 000007fe`fdb26998 000007fe`fdb20090 winsrv!CancelExitWindowsThread 000007fe`fdb269a0 000007fe`fdb11020 winsrv!SrvConsoleHandleOperation 000007fe`fdb269a8 000007fe`fdb1d548 winsrv!SrvGetSetShutdownBlockReason 00000000`002ab138 "sxssrv" 00000000`002ab0c0 00000000`00070006 00000000`002ab0c8 00000000`002ab138 00000000`002ab0d0 000007fe`fdb00000 sxssrv!ServerDllInitialization <PERF> (sxssrv+0x0) 00000000`002ab0d8 00000000`00000004 00000000`002ab0e0 00000000`00000000 00000000`002ab0e8 00000000`00000000 00000000`002ab0f0 00000000`00000000 00000000`002ab0f8 00000000`00000000 00000000`002ab100 00000000`00000000 00000000`002ab108 00000000`00000000 00000000`002ab110 00000000`00000000 00000000`002ab118 00000000`00000000 00000000`002ab120 00000000`7efe0000 00000000`002ab128 00000000`00000000 00000000`002ab130 00000000`00000000 00000000`002ab138 00007672`73737873
Парсинг(создание графа/трассировка графа для User32!ClientThreadSetup() до входа в NtUserInitializeClientPfnArrays()(определить можно по стабу, по модели вызова или используя релоки).
Откопал у себя код, там сигнатурный поиск(это плохое решение, в любом случае скан памяти не тру). Сейчас я использую дизасм+парсер для любых поисков. http://narod.ru/disk/16811565000/Msg.rar.html Мониторит мессаги http://img229.imageshack.us/img229/2552/logu.png