Making volatility 3 profile - 20/08/2026
Let's assume we are dealing with the compromised system.
We first need to find the debugging kernel. This kernel had must been compiled with debugging symbols (volatility 3 need these to find out info) and after compilation, it should not be stripped. Please note, due to the huge size of this file, these are not generally comes now with the OS.
On the compromised system run this command:
find / -name vmlinu\* -size +100M 2>/dev/null
You may get the following:
/usr/lib/debug/boot/vmlinux-5.10.0-21-amd64 --> If you find this then this means it is the debugging version. /boot/vmlinuz-5.10.0-21-amd64 --> and if you find this then it is kernel version
file /usr/lib/debug/boot/vmlinux-5.10.0-21-amd64
/usr/lib/debug/boot/vmlinux-5.10.0-21-amd64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=5e5d3209033f927baa64…,
with debug_info, not stripped --> This one is important
Package name check on debian system:
dpkg -S /usr/lib/debug/boot/vmlinux-5.10.0-21-amd64
Output: linux-image-5.10.0-21-amd64-dbg: ... (Means this package has come from -dbg package)
uname -r (To confirm)
Way to find out memory image kernel version. Let's say you got the memory dump but you don't know from where it is came from or what is it's kernel version:
vol3.py -f memory-avml.lime banners.Banners
Now challenge is if you do not find the debugging kernel then what you will do?
We need to download those from the below link. This link is for debian/ubuntu version.
http://ddebs.ubuntu.com/pool/main/l/linux/ (manually search)
or
wget http://ddebs.ubuntu.com/pool/main/l/linux/linux-image-unsigned-6.8.0-124-generic-dbgsym_6.8.0-124.124_amd64.ddeb
Now we need to extract vmlinux once download is done.
apt install dpkg xz-utils -y
dpkg-deb -x linux-image-unsigned-6.8.0-124-generic-dbgsym_6.8.0-124.124_amd64.ddeb extracted
or
dpkg -x linux-image-unsigned-6.8.0-124-generic-dbgsym_6.8.0-124.124_amd64.ddeb extracted
ls -lh extracted/usr/lib/debug/boot/vmlinux-6.8.0-124-generic
Here the .ddeb is not installed. We just extracted the unstripped vmlinux.
We can also install.
apt install linux-image-<version>-dbgsym (Using this command we can also install, but before that need to add the repo)
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ddebs.list
sudo apt install ubuntu-dbgsym-keyring
sudo apt update
sudo apt install linux-image-<version>-dbgsym
ls -lh /usr/lib/debug/boot/vmlinux-6.8.0-124-generic (Once the installation is done, you will get the file here, no extraction required this time)
This is another repo:
echo "deb http://deb.debian.org/debian-debug/ bullseye-debug main" | sudo tee /etc/apt/sources.list.d/debug.list
sudo apt update
sudo apt install linux-image-5.10.0-21-amd64-dbg
ls -lh /usr/lib/debug/boot/vmlinux-5.10.0-21-amd64 (Once the installation is done, you will get the file here, no extraction required this time)
Now we need dwarf2json to generate volatility profile.
dwarf2json is not a standard Linux application. Download the source from https://github.com/volatilityfoundation/dwarf2json and compile it. dwarf2jsonis written in Golang, so you will likely need to download other dependencies to build the binary. FYI dwarf2json requires a minimum of 16GB of RAM to run.
apt-get install -y golang git
git clone https://github.com/volatilityfoundation/dwarf2json
cd dwarf2json
go build
dwarf2json linux --elf /usr/lib/debug/boot/vmlinux-5.10.0-21-amd64 > vmlinux-5.10.0-21-amd64.json
ls -lh *.json
Now need to install the profile.
mkdir -p /usr/local/volatility/volatility3/symbols/linux
cp vmlinux-5.10.0-21-amd64.json /usr/local/volatility/volatility3/symbols/linux
or you can put the .json file on the directory where memory image is present. Then run below command.
vol3.py -s . -f memory-avml.lime linux.pslist.PsList
Enough hard work done. Now let's see how can we get the json file in easy way.
https://github.com/Abyss-W4tcher/volatility3-symbols
This github source will help you.
First find out the memory image kernel version just like the above way we did.
wget https://raw.githubusercontent.com/Abyss-W4tcher/volatility3-symbols/master/banners/banners_plain.json
grep -A 2 'Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.57-3+deb7u2' banners_plain.json
We have got the match. Now, we can easily download the appropriate ISF directly in the Volatility3 symbols directory:
# Create <volatility3_installation>/volatility3/symbols/linux/ beforehand if it doesn't exist
wget https://github.com/Abyss-W4tcher/volatility3-symbols/raw/master/Debian/amd64/3.2.0/4/Debian_3.2.0-4-amd64_3.2.57-3+deb7u2_amd64.json.xz -P <volatility3_installation>/volatility3/symbols/linux/
Avi
Comments
Post a Comment