I'm trying to allocate memory on lsass.exe process but it always fail.
Other tools i try like sam password dump works.
What could be the problem?
Example code i use to allocate memory on that process.
// Enable the debug privilege if( SetDebugPrivilege() != 0 ) // Get the LSASS pid dwPid = GetLsassPid(); // Open lsass hLsassProc = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dwPid );. // Allocate memory in remote proc pRemoteAlloc = VirtualAllocEx( hLsassProc, NULL, 1000, MEM_COMMIT, PAGE_READWRITE );
Result:
pRemoteAlloc = NULL
GetLastError = 5
....
I'm using win 7 x86 sp1 and vsc++ 2010