I built something on top of ack's answer, it's just a little bash script that automates the process of converting the hex to decimal for us noobs.
I was finding it annoying converting everything, also his answer doesn't mention that you have to convert the values and where to put them and all that...
so here's a simple explanation:
you have to run:
grep ROM /proc/iomem # this will ouput the ROM hex values...
# this will output the other mem values you can dump if that floats your boat.
once you have the two different hex values ~ looks like this:
you just add a 0x at the front of both of them and separate them with a space like this:
finally add them to the script that I made like this:
sudo ./memDifference 0x000c0000 0x000ce9ff /home/kali/output
as you can tell, the first bit is the script and the bit at the end is the file you want to output... MAKE SURE YOU ENTER THE VALUES LIKE THIS OR IT WILL NOT WORK ITS A QUICK SCRIPT I MADE.. nothing fancy.
here is the code so you can compile the script:
just do ~ sudo nano memDifference ~ then copy and paste this in there:
printf '\ndumping memory with dd & /dev/mem with these values:\n\ntotal amount ~ hex: '$action1' / decimal: '$part1kb'kb/s\nstart location ~ hex: '$action2' / decimal: '$part2kb'kb/s''\n\n'
dd if=/dev/mem of=$action3 skip=$part2 bs=1 count=$part1 status=progress
when you're done, make sure you change the permissions of the file ~ memDifference to 777 or at least 755:
sudo chmod 777 memDifference
and that's all folks... I'm such a retard.
anyway, cheers enjoy x
P.S ~ if you want view the hex / unicode / ascii or whatever just use:
xxd output | less
if you want to modify the hex, the best tool is:
its a terminal basked tool and I really like it, works really well!!