sensepost / objection

📱 objection - runtime mobile exploration
GNU General Public License v3.0
7.41k stars 850 forks source link

(feat) Added memory replace command. #656

Closed IPMegladon closed 4 months ago

IPMegladon commented 8 months ago

Added memory replace "<search pattern eg: 41 41 ?? 41>" "<replace value eg: 41 50>" (--string-pattern) (--string-replace) command.

--string-pattern is used to specify the search input is a string. --string-replace is used to specify the replace input is a string. Only searches ('rw-') memory space, can look at adding support for searching all memory and automatically changing perms with frida's Memory.protect().

Added some simple tests for it, though they by no means cover everything.

The naming of some of the parameters may not be the best, though I was not sure what else to call them.

CDuPlooy commented 8 months ago

Awesome PR! :)

I unfortunately didn't have time to test it, but at a glance it looks good (and useful!)