Re:An exploit can reveal your KeePass master password in pla...
by ThunderSizzle on Sunday May 21, 2023 @12:27AM
(#36018027)
Well, yes. This is a known vulnerability of SecureString, and there is no true work around that I'm aware of. At some point, the string will be in memory, and this is why securestring isn't a recommended solution as much
> KeePass 2.X uses a custom-developed text box for password entry, SecureTextBoxEx. This text box is not only used for the master password entry, but in other places in KeePass as well, like password edit boxes (so the attack can also be used to recover their contents).
> The flaw exploited here is that for every character typed, a leftover string is created in memory. Because of how .NET works, it is nearly impossible to get rid of it once it gets created. For example, when "Password" is typed, it will result in these leftover strings: •a, ••s, •••s, ••••w, •••••o, ••••••r, •••••••d. The POC application searches the dump for these patterns and offers a likely password character for each position in the password.
https://github.com/vdohney/keepass-password-dumper