Linux Memory Acquisition with LiME
There are several memory acquisition tools available for Linux but using them doesn’t necessarily have to be difficult. In this article we will be looking into using LiME for a simple Linux memory acquisation.LiME stands for Loadable Kernel Module (LKM) enabling the acquisition of volatile memory from Linux and Linux-based devices, including Android.
LiME can be cloned from the following github repository:
Cloning the GitHub repository:
Command used :
git clone https://github.com/504ensicsLabs/LiME.gitBefore cloning the repo, ensure that the system is updated with the following command:
sudo apt-updateChecking the pre-requisites and kernel version :
Once you have cloned the repo, go to the desired location by using the below command:
cd [PATH TO LiME]Once you are in the directory ensure to run the following commands :
Get Nived Sawant’s stories in your inbox
Join Medium for free to get updates from this writer.
The below command will show you the kernel version for your endpoint:
uname -rOnce you have the kernel version for youe endpoint go to the src folder in the cloned folder by running the below commands:
cd /LiME/srcYou can then list out the items under “src” by using the below command.
lsWe should be looking for .c files and makefile. After listing out the files run the below command :
make Once completed without error(s) you should be presented with the below screen :
now in your /src folder, you shall be presented with a .ko file (kernel object file) named after your endpoint’s kernel version as mentioned below:
Simple yet effective memory acquisition:
LiME uses the “insmod” command for loading the module.
Run the below command to acquire:
insmod ./lime-6.2.0-39-generic.ko "[path where you want to save it]/[name of your file].mem format=raw"
example : insmod ./lime-6.2.0-39-generic.ko "path=/home/testuser/Desktop/test1.mem format=raw"If everything concludes as planned, you should be presented with a .mem file which can be easily analysed through volatility.
Conclusion:
As an avid learner in the field, I acknowledge that each day presents new challenges and opportunities for growth. You don’t have to have a substantial budget to delve into DFIR; instead, you can diligently gather information from the internet, learning gradually and taking it at your own pace. Remember, Rome wasn’t built in a day, so trust in your abilities, take it easy, and keep progressing step by step.
Your feedback and suggestions are always welcomed.
Thank you.






