Prevent strings stored in memory from being read by other programs

Posted by Roy on Stack Overflow See other posts from Stack Overflow or by Roy
Published on 2010-12-27T05:50:40Z Indexed on 2010/12/27 5:53 UTC
Read the original article Hit count: 265

Filed under:
|
|

Some programs like ProcessExplorer are able to read strings in memory (for example, my error message written in the code could be displayed easily, even though it is compiled already).

  1. Imagine if I have a password string "123456" allocated sequentially in memory. What if hackers are able to get hold of the password typed by the user? Is there anyway to prevent strings from being seen so clearly?

  2. Oh yes, also, if I hash the password and sent it from client to server to compare the stored database hash value, won't the hacker be able to store the same hash and replay it to gain access to the user account? Is there anyway to prevent replaying?

Thank You!

© Stack Overflow or respective owner

Related posts about c++

Related posts about string