Command-line access to /dev/mem in Ubuntu

Posted on

Problem :

So I’m trying to search through all my memory for a specific string, but I don’t know how to get access to the contents of my memory.

I try to run this but get an error message:

~$ sudo cat /dev/mem | strings | grep findme
[sudo] password for user:
cat: /dev/mem: Permission denied

I’m running Ubuntu 9.04 64-bit with the 2.6.28-15-generic kernel. From my understanding it’s some sort of built-in protection. How can I get around this if sudo isn’t sufficient?

Solution :

Access to “real” memory via /dev/mem has been disabled by this kernel patch. So your options are to either recompile your kernel with the NONPROMISC_DEVMEM option disabled or you try a different route, such as writing your own kernel module. Happy kernel hacking!

Leave a Reply

Your email address will not be published. Required fields are marked *