We need to specify plain text passwords with some APIs like LogonUser
, NetUseAdd
and others. We may protect the password by keeping it encrypted in memory, and assign a plaintext password just before calling the function (into lpszPassword
parameter in case of LogonUser
, or USE_INFO_2::ui2_username
in case of NetUseAdd
).
My question is how to protect the plaintext password from external process, especially when this process might crash and produce a memory dump.
It should be like:
You need to protect the memory dump itself. This is why some systems have them disabled entirely, some have them written to a special place which is not readable by mere mortals, etc.