# Volatility2 Basics (Linux)

![](https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2F8F1XL74bRVEb0FgoIdtk%2Fvola_logo.jpeg?alt=media\&token=9fb87267-3e65-4657-8ea9-5d6b0cb4e58f)

### 1. Introduction

A memory dump is provided in the home directory of the root user. You have to use [Volatility](https://github.com/volatilityfoundation/volatility) to  answer the following questions:

1. Which command is used to list all profiles supported by Volatility?
2. What is the name of the profile which is present for Ubuntu Linux?
3. Which command can be used to extract the CPU details from the memory dump?&#x20;
4. Which command can be used to retrieve the list running processes from memory dump?
5. Which command can be used to show the processes in the parent-child relationship format?
6. Which command can be used to extract the list of open TCP connections from the memory dump?
7. What was the IP address of the machine on which the memory dump was taken?
8. Which command can identify the applications (which are using a promiscuous socket) from the memory dump?
9. Which command can be used to recover the bash command history from the memory dump?

### 2. Answers

To list all profiles I  can use the command:

`vol.py --info`

The profile name for linux ubuntu is:

`LinuxUbuntu-16_04-4_15_0_45-genericx64`

![](https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2Ffum6WIrdTUGDKoLn2i57%2Fvol01.png?alt=media\&token=9e7b025d-3fd4-4330-9800-b1b48100a5b5)

To identify the cpu I'll use the following command:

`vol.py -f memory_dump.img linux_cpuinfo`

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2FsBfyfCCyHft8qEmvALKo%2Fvol02.png?alt=media&#x26;token=0dc41901-6569-48ac-8907-32193fcf3981" alt=""></div>

`vol.py -f memory_dump.img linux_pslist`

![](https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2F1elZfUljUdRsSPqziNni%2Fvol03.png?alt=media\&token=d3c7816f-9754-41da-b7f6-8dce3430e16c)

The get a list of processes I use the following command:

`vol.py -f memory_dump.img linux_pstree`

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2FzU3a8o3Nhuf9e0p3UIEx%2Fvol04.png?alt=media&#x26;token=eca95a82-9e31-404c-bad5-2daa9517f86f" alt=""></div>

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2F9BNzm2BFELAU5XZxxYxR%2Fvol05.png?alt=media&#x26;token=26fdd028-bc39-4062-9c10-fc7036fce5a6" alt=""></div>

To get a list of open tcp connections I use the following command:

`vol.py -f memory_dump.img linux_netstat`

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2FEHkD3Hly1v0iwHKjmuQQ%2Fvol06.png?alt=media&#x26;token=2c4e02e6-351f-4813-9c1d-46260c366c1e" alt=""></div>

To reveal the ip adress from memory I'll use the following command:

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2FD1nOeeldkYUwC8FnpqmY%2Fvol07.png?alt=media&#x26;token=79b00c0a-fd5e-4f0d-b89d-d832f6130015" alt=""></div>

Identify applications which are using promiscious connections:

<div align="left"><img src="https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2F8ayBNUmcwVYxqcnlbDip%2Fvol08.png?alt=media&#x26;token=5afc691a-66ff-43fc-861e-578118c7657d" alt=""></div>

Reveal bash command history:

`vol.py -f memory_dump.img linux_bash`

![](https://3977837039-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfT0VPyK6X13Egd9pzy%2Fuploads%2Fhe1XO3I27QThuomZJzs3%2Fvol09.png?alt=media\&token=6e3412b3-c983-4256-b280-ddc5770676e2)

### 3. Summary

{% embed url="<https://vimeo.com/681021441>" %}
