Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Security of data in memory (Python)

I have an application that uses sensitive information (passwords). As the password is kept on memory (a variable) I wonder if an attacker could read the information stored in the memory. Does python ensure that the variables cannot be read by other software running on the same machine? If not, how can any app that handles passwords be safe if at some point the passwords need to be in memory to be checked? One can go ahead and encrypt the data but still, at some point, it will be in memory. More important, the password must be entered, for instance, using an input box, how these risk can be avoided?

like image 271
Jaime Avatar asked Aug 05 '26 23:08

Jaime


1 Answers

Two processes can't share memory (unless one has been forked from the other, then it will have copy-on-write access). This is handled by the kernal. A process that tries to access another processes memory should revive a segFault.

This question is not exactly a duplicate but this post may have the answers you are looking for.

like image 106
ktzr Avatar answered Aug 07 '26 13:08

ktzr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!