I wanted to do some protection against the memory dumping when users can recover my shell script's commands using the (delete) tag and then recover it from its memory address.
So I thought it could be a good idea to overwrite the shell memory address at the end of it, and this way it could be difficult to restore.
So my question is it possible to get the memory address of the current shell script or its command?


1 Answer 1


Are you considering other users being able to recover your shell script's commands, or just the user that's been running the script?

If it's the former then you're got bigger issues to worry about if they can read /dev/*mem and you should address those first. If it's the latter then they can already read the script directly.

  • Well I am doing it with an android app, so they cannot read my shell script file (encrypted) but they recover it from the memory, can you address what you mean by bigger issues? Also, is it still available to override its memory allocation after executing (like at the end of it)
    – Jagar
    Apr 20, 2022 at 22:12
  • @Jagar you had tagged with linux rather than android. I've fixed that for you Apr 20, 2022 at 22:30
  • thank you for that, but honestly, I meant it, is not it based on a modified version of Linux? and with the root privileges, it won't be difficult to manage it the same way in the majority of scenarios. So it was better to keep people thinking away if it is android or another Linux, especially for shell script executing that is almost the same from my basic knowledge.
    – Jagar
    Apr 20, 2022 at 22:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .