Madhav
Madhav

Reputation: 11

In python, how to hide sensitive data from getting exposed in memory dump?

In windows platform, python application data is getting exposed in the memory dump. Memory dump is taken by using process hacker tool.

def f1(self):
        # some code
        id = "<sensitive_string_data>"
        return

If above example is considered, the value of id i.e., <sensitive_string_data> is exposed in the memory dump.

Is there any way to mark such variables as sensitive and hide it from memory dump?

Tried 3 options, but no use.

  1. by deleting the variable after its use
  2. by pointing the variable to None
  3. by deleting the variable and performing gc.collect()

Upvotes: 1

Views: 152

Answers (1)

foolshark
foolshark

Reputation: 11

Python does not offer low level memory control or direct control over memory management.

Upvotes: 0

Related Questions