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.
cat /proc/iomem
once you have the two different hex values ~ looks like this:
fed20000-fed3ffff
you just add a 0x at the front of both of them and separate them with a space like this:
0xfed20000 0xfed3ffff
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:
#!/bin/bash
action1=$1
action2=$2
action3=$3
part1=$(($action2-$action1))
part1=$(($part1+1))
part2=$(($action1))
part1kb=$(($part1/990))
part2kb=$(($part2/990))
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:
hexcurse
its a terminal basked tool and I really like it, works really well!!