Do Wiki do Forense: Ferramentas: Imagenologia de Memória
trecho
Linux
/dev/mem
On older Linux systems, the program dd can be used to read the contents of physical memory from the device file /dev/mem. On recent Linux systems, however, /dev/mem provides access only to a restricted range of addresses, rather than the full physical memory of a system. On other systems it may not be available at all. Throughout the 2.6 series of the Linux kernel, the trend was to reduce direct access to memory via pseudo-device files. See, for example, the message accompanying this patch: http://lwn.net/Articles/267427/.
/dev/crash
On Red Hat systems (and those running related distros such as Fedora or CentOS), the crash driver can be loaded to create pseudo-device /dev/crash for raw physical memory access (via command "modprobe crash"). This module can also be compiled for other Linux distributions with minor effort (see, for example, http://gleeda.blogspot.com/2009/08/devcrash-driver.html). When the crash driver is modified, compiled, and loaded on other systems, the resulting memory access device is not safe to image in its entirety. Care must be taken to avoid addresses that are not RAM-backed. On Linux, /proc/iomem exposes the correct address ranges to image, marked with "System RAM".
Second Look: Linux Memory Forensics
This commercial memory forensics product ships with a modified version of the crash driver and a script for safely dumping memory using the original or modified driver on any given Linux system.
fmemfmem - github repofmem is kernel module that creates device /dev/fmem, similar to /dev/mem but without limitations. This device (physical RAM) can be copied using dd or other tool. Works on 2.6 Linux kernels. Under GNU GPL.
LiME - Linux Memory Extractor
Linux Memory Extractor (LiME) is a Loadable Kernel Module (LKM), which allows the acquisition of volatile memory from Linux and Linux-based devices, such as those powered by Android. The tool supports dumping memory either to the file system of the device or over the network.
Eu encontrei este exemplo de fmem
em uso, que parece ser a maneira mais fácil de despejar memória para propósitos de análise, você não pode mais usar /dev/mem
após os kernels 2.6.x, como eu o entendo.
Exemplo fmem
$ ./run.sh
...
----Memory areas: -----
reg00: base=0x000000000 ( 0MB), size= 1024MB, count=1: write-back
reg01: base=0x0c8800000 ( 3208MB), size= 2MB, count=1: write-combining
-----------------------
!!! Don't forget add "count=" to dd !!!
$ ls /dev/f*
/dev/fb0 /dev/fd0 /dev/fmem /dev/full /dev/fuse
$ sudo dd if=/dev/fmem of=/tmp/fmem_dump.dd bs=1MB count=10
10+0 records in
10+0 records out
10000000 bytes (10 MB) copied, 0.0331212 s, 302 MB/s
* Fonte: Como posso copiar toda a memória física para um arquivo?
Exemplo LiME
Para analisar a memória volátil, há também esta página, intitulada: Análise de memória do Linux . Há um exemplo completo neste tutorial em vídeo que mostra o uso do LiME e do Volatility para coletar um despejo de memória e analisá-lo, extraindo o histórico de Bash do usuário do despejo de memória.
O que mais?
Há também este livro de Perguntas e Respostas intitulado: Como posso descarregar toda a memória do sistema? que contém exemplos e informações adicionais.