Ir al contenido

Challenge Report: Windows RAM Forensic Analysis with Volatility

Since we are working on Fedora, we will install the Docker engine and start the service.

0views

Date: November 2025

Work environment: Fedora Linux (Docker)

Author: Portelcore Team

Since we are working on Fedora, we will install the Docker engine and start the service.

Command:

Ventana de terminal
sudo dnf install dnf-plugins-core
sudo dnf config-manager --add-repo [https://download.docker.com/linux/fedora/docker-ce.repo](https://download.docker.com/linux/fedora/docker-ce.repo)
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
# Verificació
docker --version

We will download the Docker images required for the challenge and rename them to make them easier to use.

Command:

# Descargar imágenes
docker pull phocean/volatility
docker pull sk4la/volatility3:edge
# Cambiar etiquetas (tags)
docker image tag phocean/volatility vol2
docker image tag sk4la/volatility3:edge vol3
# Verificar
docker images

Result (Screenshot or confirmation text):

[PEGAR AQUÍ LA LISTA DE IMÁGENES DOCKER]

We must execute the commands to install Docker and download the necessary images. We will run the commands to start the Docker service and verify that it is functioning correctly. We will download the Docker images and tag them for easier use. We will see the result of the image downloading and tagging.

First, we must identify the operating system profile to be able to run the rest of the plugins correctly with Volatility 2.

Command:

Ventana de terminal
sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw imageinfo

Result and Analysis:

  • Suggested profile: Win7SP1x64
  • Screenshot:
Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw imageinfo
[sudo] contraseña para user.portelcore:
Volatility Foundation Volatility Framework 2.6.1
INFO : volatility.debug : Determining profile based on KDBG search...
Suggested Profile(s) : Win7SP1x64, Win7SP0x64, Win2008R2SP0x64, Win2008R2SP1x64_24000, Win2008R2SP1x64_23418, Win2008R2SP1x64, Win7SP1x64_24000, Win7SP1x64_23418
AS Layer1 : WindowsAMD64PagedMemory (Kernel AS)
AS Layer2 : FileAddressSpace (/dumps/victim.raw)
PAE type : No PAE
DTB : 0x187000L
KDBG : 0xf800028420a0L
Number of Processors : 1
Image Type (Service Pack) : 1
KPCR for CPU 0 : 0xfffff80002843d00L
KUSER_SHARED_DATA : 0xfffff78000000000L
Image date and time : 2019-05-02 18:11:45 UTC+0000
Image local date and time : 2019-05-02 11:11:45 -0700
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

We will verify that the profile works by running pslist

Command:

Ventana de terminal
sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pslist

Questions:

  • Relevant screenshot:
Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pslist
Volatility Foundation Volatility Framework 2.6.1
Offset(V) Name PID PPID Thds Hnds Sess Wow64 Start Exit
------------------ -------------------- ------ ------ ------ -------- ------ ------ ------------------------------ ------------------------------
0xfffffa8001252040 System 4 0 88 624 ------ 0 2019-05-03 06:32:24 UTC+0000
0xfffffa800234d8a0 smss.exe 268 4 2 29 ------ 0 2019-05-03 06:32:24 UTC+0000
0xfffffa8002264550 csrss.exe 360 352 9 363 0 0 2019-05-03 06:32:34 UTC+0000
0xfffffa80027d67d0 csrss.exe 408 400 7 162 1 0 2019-05-03 06:32:35 UTC+0000
0xfffffa8002b601c0 wininit.exe 416 352 3 76 0 0 2019-05-03 06:32:35 UTC+0000
0xfffffa8002b71680 winlogon.exe 444 400 3 111 1 0 2019-05-03 06:32:35 UTC+0000
0xfffffa8002c69b30 services.exe 504 416 6 184 0 0 2019-05-03 06:32:36 UTC+0000
0xfffffa80027d9b30 lsass.exe 512 416 6 534 0 0 2019-05-03 06:32:37 UTC+0000
0xfffffa80027d81f0 lsm.exe 520 416 10 143 0 0 2019-05-03 06:32:37 UTC+0000
0xfffffa80029cd3e0 svchost.exe 628 504 9 345 0 0 2019-05-03 06:32:48 UTC+0000
0xfffffa8002d38b30 VBoxService.ex 688 504 12 135 0 0 2019-05-03 06:32:48 UTC+0000
0xfffffa8002a1bb30 svchost.exe 752 504 7 235 0 0 2019-05-02 18:02:51 UTC+0000
0xfffffa8002d70650 svchost.exe 852 504 22 473 0 0 2019-05-02 18:02:51 UTC+0000
0xfffffa8002d9c780 svchost.exe 892 504 17 427 0 0 2019-05-02 18:02:51 UTC+0000
0xfffffa8002dbe9e0 svchost.exe 920 504 29 878 0 0 2019-05-02 18:02:51 UTC+0000
0xfffffa8002e3db30 svchost.exe 400 504 10 281 0 0 2019-05-02 18:02:56 UTC+0000
0xfffffa8002e57890 svchost.exe 1004 504 20 379 0 0 2019-05-02 18:02:56 UTC+0000
0xfffffa8002dfdab0 spoolsv.exe 1140 504 12 279 0 0 2019-05-02 18:02:57 UTC+0000
0xfffffa8002f2cb30 svchost.exe 1268 504 17 297 0 0 2019-05-02 18:02:59 UTC+0000
0xfffffa8002f81460 svchost.exe 1368 504 20 295 0 0 2019-05-02 18:02:59 UTC+0000
0xfffffa8003148b30 taskhost.exe 1788 504 8 159 1 0 2019-05-02 18:03:09 UTC+0000
0xfffffa8003172b30 explorer.exe 1860 1756 19 645 1 0 2019-05-02 18:03:09 UTC+0000
0xfffffa800315eb30 dwm.exe 1896 892 3 69 1 0 2019-05-02 18:03:09 UTC+0000
0xfffffa800300d700 VBoxTray.exe 1600 1860 13 141 1 0 2019-05-02 18:03:25 UTC+0000
0xfffffa8003367060 SearchIndexer. 2180 504 11 629 0 0 2019-05-02 18:03:32 UTC+0000
0xfffffa80033f6060 WmiPrvSE.exe 2876 628 5 113 0 0 2019-05-02 18:03:55 UTC+0000
0xfffffa8003162060 svchost.exe 1820 504 11 317 0 0 2019-05-02 18:05:09 UTC+0000
0xfffffa8003371540 wmpnetwk.exe 2464 504 14 440 0 0 2019-05-02 18:05:10 UTC+0000
0xfffffa80014eeb30 taskhost.exe 1148 504 8 176 0 0 2019-05-02 18:09:58 UTC+0000
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

We will provide the process list commands (pstree, psxview)

Command:

Ventana de terminal
sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 psxview
sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pstree

Questions:

  • Relevant screenshot:
Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pstree
Volatility Foundation Volatility Framework 2.6.1
Name Pid PPid Thds Hnds Time
-------------------------------------------------- ------ ------ ------ ------ ----
0xfffffa8002b601c0:wininit.exe 416 352 3 76 2019-05-03 06:32:35 UTC+0000
. 0xfffffa80027d9b30:lsass.exe 512 416 6 534 2019-05-03 06:32:37 UTC+0000
. 0xfffffa80027d81f0:lsm.exe 520 416 10 143 2019-05-03 06:32:37 UTC+0000
. 0xfffffa8002c69b30:services.exe 504 416 6 184 2019-05-03 06:32:36 UTC+0000
.. 0xfffffa8002e3db30:svchost.exe 400 504 10 281 2019-05-02 18:02:56 UTC+0000
... 0xfffffa80027d67d0:csrss.exe 408 400 7 162 2019-05-03 06:32:35 UTC+0000
... 0xfffffa8002b71680:winlogon.exe 444 400 3 111 2019-05-03 06:32:35 UTC+0000
.. 0xfffffa8002dbe9e0:svchost.exe 920 504 29 878 2019-05-02 18:02:51 UTC+0000
.. 0xfffffa8003367060:SearchIndexer. 2180 504 11 629 2019-05-02 18:03:32 UTC+0000
.. 0xfffffa8003162060:svchost.exe 1820 504 11 317 2019-05-02 18:05:09 UTC+0000
.. 0xfffffa8002d38b30:VBoxService.ex 688 504 12 135 2019-05-03 06:32:48 UTC+0000
.. 0xfffffa80029cd3e0:svchost.exe 628 504 9 345 2019-05-03 06:32:48 UTC+0000
... 0xfffffa80033f6060:WmiPrvSE.exe 2876 628 5 113 2019-05-02 18:03:55 UTC+0000
.. 0xfffffa8002dfdab0:spoolsv.exe 1140 504 12 279 2019-05-02 18:02:57 UTC+0000
.. 0xfffffa8003371540:wmpnetwk.exe 2464 504 14 440 2019-05-02 18:05:10 UTC+0000
.. 0xfffffa8002d70650:svchost.exe 852 504 22 473 2019-05-02 18:02:51 UTC+0000
.. 0xfffffa8002f81460:svchost.exe 1368 504 20 295 2019-05-02 18:02:59 UTC+0000
.. 0xfffffa8003148b30:taskhost.exe 1788 504 8 159 2019-05-02 18:03:09 UTC+0000
.. 0xfffffa8002e57890:svchost.exe 1004 504 20 379 2019-05-02 18:02:56 UTC+0000
.. 0xfffffa8002a1bb30:svchost.exe 752 504 7 235 2019-05-02 18:02:51 UTC+0000
.. 0xfffffa8002f2cb30:svchost.exe 1268 504 17 297 2019-05-02 18:02:59 UTC+0000
.. 0xfffffa80014eeb30:taskhost.exe 1148 504 8 176 2019-05-02 18:09:58 UTC+0000
.. 0xfffffa8002d9c780:svchost.exe 892 504 17 427 2019-05-02 18:02:51 UTC+0000
... 0xfffffa800315eb30:dwm.exe 1896 892 3 69 2019-05-02 18:03:09 UTC+0000
0xfffffa8002264550:csrss.exe 360 352 9 363 2019-05-03 06:32:34 UTC+0000
0xfffffa8001252040:System 4 0 88 624 2019-05-03 06:32:24 UTC+0000
. 0xfffffa800234d8a0:smss.exe 268 4 2 29 2019-05-03 06:32:24 UTC+0000
0xfffffa8003172b30:explorer.exe 1860 1756 19 645 2019-05-02 18:03:09 UTC+0000
. 0xfffffa800300d700:VBoxTray.exe 1600 1860 13 141 2019-05-02 18:03:25 UTC+0000
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 psxview
Volatility Foundation Volatility Framework 2.6.1
Offset(P) Name PID pslist psscan thrdproc pspcid csrss session deskthrd ExitTime
------------------ -------------------- ------ ------ ------ -------- ------ ----- ------- -------- --------
0x000000005c99c780 svchost.exe 892 True True False True True True True
0x000000005c40d700 VBoxTray.exe 1600 True True False True True True True
0x000000005c367060 SearchIndexer. 2180 True True False True True True True
0x000000005c657890 svchost.exe 1004 True True False True True True True
0x000000005c548b30 taskhost.exe 1788 True True False True True True True
0x000000005c72cb30 svchost.exe 1268 True True False True True True True
0x000000005ca1bb30 svchost.exe 752 True True False True True True True
0x000000005e0eeb30 taskhost.exe 1148 True True False True True True True
0x000000005cb71680 winlogon.exe 444 True True False True True True True
0x000000005cb601c0 wininit.exe 416 True True False True True True True
0x000000005c9be9e0 svchost.exe 920 True True False True True True True
0x000000005c572b30 explorer.exe 1860 True True False True True True True
0x000000005c562060 svchost.exe 1820 True True False True True True True
0x000000005c970650 svchost.exe 852 True True False True True True True
0x000000005c938b30 VBoxService.ex 688 True True False True True True True
0x000000005c3f6060 WmiPrvSE.exe 2876 True True False True True True True
0x000000005cfd9b30 lsass.exe 512 True True False True True True False
0x000000005cdcd3e0 svchost.exe 628 True True False True True True True
0x000000005c781460 svchost.exe 1368 True True False True True True True
0x000000005cfd81f0 lsm.exe 520 True True False True True True False
0x000000005c63db30 svchost.exe 400 True True False True True True True
0x000000005c55eb30 dwm.exe 1896 True True False True True True True
0x000000005c9fdab0 spoolsv.exe 1140 True True False True True True True
0x000000005c371540 wmpnetwk.exe 2464 True True False True True True True
0x000000005c869b30 services.exe 504 True True False True True True False
0x000000005d34d8a0 smss.exe 268 True True False True False False False
0x000000005e252040 System 4 True True False True False False False
0x000000005cfd67d0 csrss.exe 408 True True False True False True True
0x000000005d264550 csrss.exe 360 True True False True False True True
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

What is the process identifier (PID) of SearchIndexer?

Command:

Ventana de terminal
sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pslist

Questions:

  • What is the process identifier (PID) of SearchIndexer? 2180
  • Relevant screenshot:
Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pslist
Volatility Foundation Volatility Framework 2.6.1
Offset(V) Name PID PPID Thds Hnds Sess Wow64 Start Exit
------------------ -------------------- ------ ------ ------ -------- ------ ------ ------------------------------ ------------------------------
0xfffffa8001252040 System 4 0 88 624 ------ 0 2019-05-03 06:32:24 UTC+0000
0xfffffa800234d8a0 smss.exe 268 4 2 29 ------ 0 2019-05-03 06:32:24 UTC+0000
0xfffffa8002264550 csrss.exe 360 352 9 363 0 0 2019-05-03 06:32:34 UTC+0000
0xfffffa80027d67d0 csrss.exe 408 400 7 162 1 0 2019-05-03 06:32:35 UTC+0000
0xfffffa8002b601c0 wininit.exe 416 352 3 76 0 0 2019-05-03 06:32:35 UTC+0000
0xfffffa8002b71680 winlogon.exe 444 400 3 111 1 0 2019-05-03 06:32:35 UTC+0000
0xfffffa8002c69b30 services.exe 504 416 6 184 0 0 2019-05-03 06:32:36 UTC+0000
0xfffffa80027d9b30 lsass.exe 512 416 6 534 0 0 2019-05-03 06:32:37 UTC+0000
0xfffffa80027d81f0 lsm.exe 520 416 10 143 0 0 2019-05-03 06:32:37 UTC+0000
0xfffffa80029cd3e0 svchost.exe 628 504 9 345 0 0 2019-05-03 06:32:48 UTC+0000
0xfffffa8002d38b30 VBoxService.ex 688 504 12 135 0 0 2019-05-03 06:32:48 UTC+0000
0xfffffa8002a1bb30 svchost.exe 752 504 7 235 0 0 2019-05-02 18:02:51 UTC+0000
0xfffffa8002d70650 svchost.exe 852 504 22 473 0 0 2019-05-02 18:02:51 UTC+0000
0xfffffa8002d9c780 svchost.exe 892 504 17 427 0 0 2019-05-02 18:02:51 UTC+0000
0xfffffa8002dbe9e0 svchost.exe 920 504 29 878 0 0 2019-05-02 18:02:51 UTC+0000
0xfffffa8002e3db30 svchost.exe 400 504 10 281 0 0 2019-05-02 18:02:56 UTC+0000
0xfffffa8002e57890 svchost.exe 1004 504 20 379 0 0 2019-05-02 18:02:56 UTC+0000
0xfffffa8002dfdab0 spoolsv.exe 1140 504 12 279 0 0 2019-05-02 18:02:57 UTC+0000
0xfffffa8002f2cb30 svchost.exe 1268 504 17 297 0 0 2019-05-02 18:02:59 UTC+0000
0xfffffa8002f81460 svchost.exe 1368 504 20 295 0 0 2019-05-02 18:02:59 UTC+0000
0xfffffa8003148b30 taskhost.exe 1788 504 8 159 1 0 2019-05-02 18:03:09 UTC+0000
0xfffffa8003172b30 explorer.exe 1860 1756 19 645 1 0 2019-05-02 18:03:09 UTC+0000
0xfffffa800315eb30 dwm.exe 1896 892 3 69 1 0 2019-05-02 18:03:09 UTC+0000
0xfffffa800300d700 VBoxTray.exe 1600 1860 13 141 1 0 2019-05-02 18:03:25 UTC+0000
0xfffffa8003367060 SearchIndexer. 2180 504 11 629 0 0 2019-05-02 18:03:32 UTC+0000
0xfffffa80033f6060 WmiPrvSE.exe 2876 628 5 113 0 0 2019-05-02 18:03:55 UTC+0000
0xfffffa8003162060 svchost.exe 1820 504 11 317 0 0 2019-05-02 18:05:09 UTC+0000
0xfffffa8003371540 wmpnetwk.exe 2464 504 14 440 0 0 2019-05-02 18:05:10 UTC+0000
0xfffffa80014eeb30 taskhost.exe 1148 504 8 176 0 0 2019-05-02 18:09:58 UTC+0000
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

What is the parent process and what PID does it have?

Command:

Ventana de terminal
sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pstree

Questions:

  • What is the parent process? services.exe
  • What PID does it have? 504
  • Relevant screenshot:
Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 pstree
Volatility Foundation Volatility Framework 2.6.1
Name Pid PPid Thds Hnds Time
-------------------------------------------------- ------ ------ ------ ------ ----
0xfffffa8002b601c0:wininit.exe 416 352 3 76 2019-05-03 06:32:35 UTC+0000
. 0xfffffa80027d9b30:lsass.exe 512 416 6 534 2019-05-03 06:32:37 UTC+0000
. 0xfffffa80027d81f0:lsm.exe 520 416 10 143 2019-05-03 06:32:37 UTC+0000
. 0xfffffa8002c69b30:services.exe 504 416 6 184 2019-05-03 06:32:36 UTC+0000
.. 0xfffffa8002e3db30:svchost.exe 400 504 10 281 2019-05-02 18:02:56 UTC+0000
... 0xfffffa80027d67d0:csrss.exe 408 400 7 162 2019-05-03 06:32:35 UTC+0000
... 0xfffffa8002b71680:winlogon.exe 444 400 3 111 2019-05-03 06:32:35 UTC+0000
.. 0xfffffa8002dbe9e0:svchost.exe 920 504 29 878 2019-05-02 18:02:51 UTC+0000
.. 0xfffffa8003367060:SearchIndexer. 2180 504 11 629 2019-05-02 18:03:32 UTC+0000
.. 0xfffffa8003162060:svchost.exe 1820 504 11 317 2019-05-02 18:05:09 UTC+0000
.. 0xfffffa8002d38b30:VBoxService.ex 688 504 12 135 2019-05-03 06:32:48 UTC+0000
.. 0xfffffa80029cd3e0:svchost.exe 628 504 9 345 2019-05-03 06:32:48 UTC+0000
... 0xfffffa80033f6060:WmiPrvSE.exe 2876 628 5 113 2019-05-02 18:03:55 UTC+0000
.. 0xfffffa8002dfdab0:spoolsv.exe 1140 504 12 279 2019-05-02 18:02:57 UTC+0000
.. 0xfffffa8003371540:wmpnetwk.exe 2464 504 14 440 2019-05-02 18:05:10 UTC+0000
.. 0xfffffa8002d70650:svchost.exe 852 504 22 473 2019-05-02 18:02:51 UTC+0000
.. 0xfffffa8002f81460:svchost.exe 1368 504 20 295 2019-05-02 18:02:59 UTC+0000
.. 0xfffffa8003148b30:taskhost.exe 1788 504 8 159 2019-05-02 18:03:09 UTC+0000
.. 0xfffffa8002e57890:svchost.exe 1004 504 20 379 2019-05-02 18:02:56 UTC+0000
.. 0xfffffa8002a1bb30:svchost.exe 752 504 7 235 2019-05-02 18:02:51 UTC+0000
.. 0xfffffa8002f2cb30:svchost.exe 1268 504 17 297 2019-05-02 18:02:59 UTC+0000
.. 0xfffffa80014eeb30:taskhost.exe 1148 504 8 176 2019-05-02 18:09:58 UTC+0000
.. 0xfffffa8002d9c780:svchost.exe 892 504 17 427 2019-05-02 18:02:51 UTC+0000
... 0xfffffa800315eb30:dwm.exe 1896 892 3 69 2019-05-02 18:03:09 UTC+0000
0xfffffa8002264550:csrss.exe 360 352 9 363 2019-05-03 06:32:34 UTC+0000
0xfffffa8001252040:System 4 0 88 624 2019-05-03 06:32:24 UTC+0000
. 0xfffffa800234d8a0:smss.exe 268 4 2 29 2019-05-03 06:32:24 UTC+0000
0xfffffa8003172b30:explorer.exe 1860 1756 19 645 2019-05-02 18:03:09 UTC+0000
. 0xfffffa800300d700:VBoxTray.exe 1600 1860 13 141 2019-05-02 18:03:25 UTC+0000
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 psxview
Volatility Foundation Volatility Framework 2.6.1
Offset(P) Name PID pslist psscan thrdproc pspcid csrss session deskthrd ExitTime
------------------ -------------------- ------ ------ ------ -------- ------ ----- ------- -------- --------
0x000000005c99c780 svchost.exe 892 True True False True True True True
0x000000005c40d700 VBoxTray.exe 1600 True True False True True True True
0x000000005c367060 SearchIndexer. 2180 True True False True True True True
0x000000005c657890 svchost.exe 1004 True True False True True True True
0x000000005c548b30 taskhost.exe 1788 True True False True True True True
0x000000005c72cb30 svchost.exe 1268 True True False True True True True
0x000000005ca1bb30 svchost.exe 752 True True False True True True True
0x000000005e0eeb30 taskhost.exe 1148 True True False True True True True
0x000000005cb71680 winlogon.exe 444 True True False True True True True
0x000000005cb601c0 wininit.exe 416 True True False True True True True
0x000000005c9be9e0 svchost.exe 920 True True False True True True True
0x000000005c572b30 explorer.exe 1860 True True False True True True True
0x000000005c562060 svchost.exe 1820 True True False True True True True
0x000000005c970650 svchost.exe 852 True True False True True True True
0x000000005c938b30 VBoxService.ex 688 True True False True True True True
0x000000005c3f6060 WmiPrvSE.exe 2876 True True False True True True True
0x000000005cfd9b30 lsass.exe 512 True True False True True True False
0x000000005cdcd3e0 svchost.exe 628 True True False True True True True
0x000000005c781460 svchost.exe 1368 True True False True True True True
0x000000005cfd81f0 lsm.exe 520 True True False True True True False
0x000000005c63db30 svchost.exe 400 True True False True True True True
0x000000005c55eb30 dwm.exe 1896 True True False True True True True
0x000000005c9fdab0 spoolsv.exe 1140 True True False True True True True
0x000000005c371540 wmpnetwk.exe 2464 True True False True True True True
0x000000005c869b30 services.exe 504 True True False True True True False
0x000000005d34d8a0 smss.exe 268 True True False True False False False
0x000000005e252040 System 4 True True False True False False False
0x000000005cfd67d0 csrss.exe 408 True True False True False True True
0x000000005d264550 csrss.exe 360 True True False True False True True
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

We will investigate user activity through Shellbags to see which folders have been visited.

Process:

Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 shellbags > shellbags.txt
[sudo] contraseña para user.portelcore:
Volatility Foundation Volatility Framework 2.6.1
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

Then, we have created a Python script to detect and filter the following information:

  • Files executed by the system
  • System directories
  • User files
  • User directories

Then, the script is as follows:

import json
import sys
import re
from datetime import datetime
SYSTEM_KEYWORDS = [
"Desktop", "My Computer", "Control Panel", "Recycle",
"Program Files", "ProgramData", "Windows", "Volume Name",
"Libraries", "Network and Sharing Center"
]
def limpiar_json(contenido_archivo):
"""Busca dónde empieza el JSON real (la primera llave '{') e ignora el resto."""
match = re.search(r'\{.*', contenido_archivo, re.DOTALL)
if match:
return match.group(0)
return contenido_archivo
def es_sistema(ruta):
"""Determina si una ruta es probablemente del sistema/ruido."""
for kw in SYSTEM_KEYWORDS:
if kw in ruta:
return True
return False
def imprimir_seccion(titulo, lista):
print(f"\n{'='*80}")
print(f" {titulo.upper()} ({len(lista)} entradas)")
print(f"{'='*80}")
print(f"{'FECHA (UTC)':<30} | {'RUTA / NOMBRE'}")
print("-" * 80)
lista_ordenada = sorted(lista, key=lambda x: x[0], reverse=True)
for fecha, ruta in lista_ordenada:
print(f"{fecha:<30} | {ruta}")
def main():
if len(sys.argv) < 2:
print("Uso: python3 analizar_shellbags_advanced.py <archivo.json>")
return
archivo_path = sys.argv[1]
try:
with open(archivo_path, 'r') as f:
raw_data = f.read()
json_str = limpiar_json(raw_data)
data = json.loads(json_str)
cols = data['columns']
try:
idx_time = cols.index('LastWrite') if 'LastWrite' in cols else cols.index('LastUpdated')
idx_path = cols.index('Path') if 'Path' in cols else cols.index('AbsolutePath')
idx_attr = cols.index('Attributes') if 'Attributes' in cols else -1
idx_filename = cols.index('FileName') if 'FileName' in cols else -1
except ValueError as e:
print(f"Error detectant columnes: {cols}")
return
user_files = []
user_folders = []
system_files = []
system_folders = []
for fila in data['rows']:
path = fila[idx_path]
time_str = fila[idx_time]
attrs = fila[idx_attr] if idx_attr != -1 else ""
filename = fila[idx_filename] if idx_filename != -1 else ""
if not time_str or not path:
continue
is_sys = es_sistema(path)
is_folder = "DIR" in attrs
if not is_folder:
if re.search(r'\.[a-zA-Z0-9]{2,4}$', filename):
is_folder = False
elif path.endswith(":\\"):
is_folder = True
item = (time_str, path)
if is_sys:
if is_folder:
system_folders.append(item)
else:
system_files.append(item)
else:
if is_folder:
user_folders.append(item)
else:
user_files.append(item)
imprimir_seccion("1. SISTEMA - CARPETAS (System Folders)", system_folders)
imprimir_seccion("2. SISTEMA - ARCHIVOS (System Files)", system_files)
imprimir_seccion("3. USUARIO - ARCHIVOS ACCEDIDOS (User Files)", user_files)
imprimir_seccion("4. USUARIO - CARPETAS VISITADAS (User Folders)", user_folders)
except Exception as e:
print(f"Error fatal: {e}")
if __name__ == "__main__":
main()

Next, we will run the python script to scan and view the results:

Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ python3 analizar_shellbags.py shellbags.json
================================================================================
1. SISTEMA - CARPETAS (SYSTEM FOLDERS) (10 entradas)
================================================================================
FECHA (UTC) | RUTA / NOMBRE
--------------------------------------------------------------------------------
2019-04-27 10:42:05 UTC+0000 | C:\ProgramData
2019-04-27 10:42:05 UTC+0000 | C:\Program Files (x86)
2019-04-27 10:38:03 UTC+0000 | C:\Program Files (x86)\Capture
2019-04-27 10:34:50 UTC+0000 | C:\ProgramData\Microsoft\Windows
2019-04-27 10:34:47 UTC+0000 | C:\ProgramData\Microsoft
2019-04-13 07:39:48 UTC+0000 | C:\ProgramData\Microsoft\Windows\Start Menu\Programs\WinRAR
2019-04-13 07:39:46 UTC+0000 | C:\ProgramData\Microsoft\Windows\Start Menu
2019-04-13 07:39:46 UTC+0000 | C:\ProgramData\Microsoft\Windows\Start Menu\Programs
2019-04-13 07:35:42 UTC+0000 | C:\Users\victim\AppData\Roaming\Microsoft\Windows
2019-04-13 07:35:42 UTC+0000 | C:\Users\victim\AppData\Roaming\Microsoft\Windows\Start Menu
================================================================================
2. SISTEMA - ARCHIVOS (SYSTEM FILES) (1 entrada)
================================================================================
FECHA (UTC) | RUTA / NOMBRE
--------------------------------------------------------------------------------
2019-04-27 10:38:03 UTC+0000 | C:\Program Files (x86)\Capture\capture_2742019_336.zip
================================================================================
3. USUARIO - ARCHIVOS ACCEDIDOS (USER FILES) (17 entradas)
================================================================================
FECHA (UTC) | RUTA / NOMBRE
--------------------------------------------------------------------------------
2019-05-02 07:00:41 UTC+0000 | Firefox.lnk
2019-05-02 07:00:41 UTC+0000 | HxD.lnk
2019-05-02 07:00:41 UTC+0000 | Wireshark.lnk
2019-05-02 07:00:41 UTC+0000 | ~res-x64.txt
2019-05-02 07:00:41 UTC+0000 | ~res-x64_0000.txt
2019-05-02 07:00:41 UTC+0000 | Analysis Deatils.txt
2019-05-02 07:00:41 UTC+0000 | depends - Shortcut.lnk
2019-05-02 07:00:41 UTC+0000 | emotet.txt
2019-05-02 07:00:41 UTC+0000 | emotet-regshot.hivu
2019-05-02 07:00:41 UTC+0000 | IDA Freeware.lnk
2019-05-02 07:00:41 UTC+0000 | OLLYDBG - Shortcut.lnk
2019-05-02 07:00:41 UTC+0000 | PEview - Shortcut.lnk
2019-05-02 07:00:41 UTC+0000 | Process Hacker 2.lnk
2019-05-02 07:00:41 UTC+0000 | Regshot-x64-Unicode - Shortcut.lnk
2019-05-02 07:00:41 UTC+0000 | sample 1.hivu
2019-05-02 07:00:41 UTC+0000 | WinPcap_4_1_3.exe
2019-04-27 10:33:36 UTC+0000 | Local\Temp\odbg110.zip
================================================================================
4. USUARIO - CARPETAS VISITADAS (USER FOLDERS) (50 entradas)
================================================================================
FECHA (UTC) | RUTA / NOMBRE
--------------------------------------------------------------------------------
2019-05-02 07:00:41 UTC+0000 | Life Virus Samples
2019-05-02 07:00:41 UTC+0000 | New folder
2019-05-02 06:57:18 UTC+0000 | Life Virus Samples
2019-05-02 06:57:18 UTC+0000 | New folder
2019-04-27 10:48:33 UTC+0000 | Z:\logs\deleted_files
2019-04-27 10:42:05 UTC+0000 | C:\Users
2019-04-27 10:42:05 UTC+0000 | C:\Users\victim\AppData
2019-04-27 10:42:05 UTC+0000 | C:\Users\victim\Downloads
2019-04-27 10:38:19 UTC+0000 | Z:\logs
2019-04-27 10:34:40 UTC+0000 | C:\Users\victim\AppData\Local
2019-04-27 10:34:40 UTC+0000 | C:\Users\victim\AppData\Roaming
2019-04-27 10:34:40 UTC+0000 | C:\Users\victim\AppData\LocalLow
2019-04-27 10:34:40 UTC+0000 | C:\Users\victim\AppData\Local\Temp
2019-04-27 10:34:35 UTC+0000 | C:\Users\victim\AppData\LocalLow\Mozilla
2019-04-27 10:34:26 UTC+0000 | C:\Users\victim\AppData\Roaming\Microsoft
2019-04-27 10:33:47 UTC+0000 | C:\Users\victim
2019-04-27 10:33:36 UTC+0000 | Local\Temp\VBE
2019-04-27 10:33:36 UTC+0000 | Local\Temp\TCD9405.tmp
2019-04-27 10:33:36 UTC+0000 | Local\Temp\Low
2019-04-27 10:33:36 UTC+0000 | Local\Temp\TCD9312.tmp
2019-04-23 07:37:46 UTC+0000 | HxDSetup
2019-04-23 07:37:46 UTC+0000 | CaptureBAT-Setup-2.0.0-5574-src
2019-04-23 07:37:46 UTC+0000 | New folder
2019-04-23 07:37:46 UTC+0000 | Malware analysis
2019-04-23 07:37:46 UTC+0000 | CMDWatcher_v0.3
2019-04-23 07:37:46 UTC+0000 | Rehshot
2019-04-23 07:37:46 UTC+0000 | OfficeMalScanner
2019-04-23 06:54:48 UTC+0000 | Life Virus Samples\13 April
2019-04-23 06:54:48 UTC+0000 | Life Virus Samples\New folder
2019-04-23 06:54:48 UTC+0000 | Life Virus Samples\DOC
2019-04-23 06:54:48 UTC+0000 | Life Virus Samples\18 April
2019-04-23 06:54:48 UTC+0000 | Life Virus Samples\18 April\New folder
2019-04-23 06:54:48 UTC+0000 | Life Virus Samples\18 April\VirusShare_aa8857f2b367d3e7036e6b788d1d0c3f
2019-04-23 06:54:48 UTC+0000 | Life Virus Samples\18 April\Emotet
2019-04-23 06:45:23 UTC+0000 | C:\Users\victim\Downloads\Microsoft Office Enterprise 2010 Corporate Final (full activated)\Microsoft Office Enterprise 2010 Corporate Final (full activated)
2019-04-23 06:45:21 UTC+0000 | C:\Users\victim\Downloads\Microsoft Office Enterprise 2010 Corporate Final (full activated)
2019-04-23 06:45:21 UTC+0000 | C:\Users\victim\Downloads\OfficeMalScanner
2019-04-23 06:16:06 UTC+0000 | OfficeMalScanner\VirusShare_edc7428ec4d6b18e2620aee95347b4fa
2019-04-23 06:15:54 UTC+0000 | Life Virus Samples\DOC\VirusShare_edc7428ec4d6b18e2620aee95347b4fa
2019-04-23 06:14:25 UTC+0000 | Life Virus Samples\18 April\Emotet\New folder
2019-04-23 06:14:25 UTC+0000 | Life Virus Samples\18 April\Emotet\VirusShare_05c632fe8ab2727adc9ac7b1b59c3be8
2019-04-13 08:05:26 UTC+0000 | CaptureBAT-Setup-2.0.0-5574-src\capture-client\SetupScript
2019-04-13 08:05:26 UTC+0000 | CaptureBAT-Setup-2.0.0-5574-src\capture-client\ApplicationConfig
2019-04-13 07:30:47 UTC+0000 | Malware analysis\Compressed
2019-04-13 07:30:47 UTC+0000 | Malware analysis\PEview
2019-04-13 07:30:47 UTC+0000 | Malware analysis\Compressed\depends22_x86
2019-04-13 05:57:48 UTC+0000 | CaptureBAT-Setup-2.0.0-5574-src\capture-client
2019-04-11 13:33:14 UTC+0000 | odbg110
2019-04-11 13:32:18 UTC+0000 | Local
2019-04-11 13:32:18 UTC+0000 | Local\Temp
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

Result:

  • Last directory accessed: Z:\logs\deleted_files
  • Access date: 2019-04-27 10:48:33 UTC+0000

We will look for active or closed connections to detect communications with C2 (Command & Control) servers.

Command:

Ventana de terminal
sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 netscan

(If it were XP, we would use connscan)

Then, we have created a Python script to detect and filter the following information:

import sys
import re
import ipaddress
KNOWN_SERVICES = {
135: ["svchost.exe", "System"],
137: ["System", "nbtscan.exe", "svchost.exe"],
138: ["System", "svchost.exe"],
139: ["System", "svchost.exe"],
445: ["System", "svchost.exe"],
5357: ["System", "svchost.exe"],
5355: ["svchost.exe"],
1900: ["svchost.exe"],
2869: ["System", "svchost.exe"],
5004: ["wmpnetwk.exe", "svchost.exe"],
5005: ["wmpnetwk.exe", "svchost.exe"],
21: ["ftpd.exe"], 22: ["sshd.exe"], 80: ["httpd.exe", "iis.exe", "System"],
443: ["httpd.exe", "System"], 3389: ["svchost.exe", "termsrv.exe"]
}
CLIENT_APPS = ["chrome.exe", "firefox.exe", "iexplore.exe", "outlook.exe", "excel.exe", "winword.exe", "powershell.exe", "cmd.exe"]
LOCALHOST_IPS = ["127.0.0.1", "::1"]
RED_BG = '\033[41m\033[37m'
PURPLE = '\033[95m'
RED = '\033[91m'
ORANGE = '\033[33m'
YELLOW = '\033[93m'
GREEN = '\033[92m'
CYAN = '\033[96m'
RESET = '\033[0m'
def parse_ip_port(address_str):
if address_str == "*:*": return "*", 0
match_v6 = re.search(r'^\[(.*)\]:(\d+)$', address_str)
if match_v6: return match_v6.group(1), int(match_v6.group(2))
match_v4 = re.search(r'^(.*):(\d+)$', address_str)
if match_v4: return match_v4.group(1), int(match_v4.group(2))
return address_str, 0
def analizar_tipo_ip(ip_str):
ip_clean = ip_str.replace("[", "").replace("]", "")
if ip_clean in LOCALHOST_IPS: return 'LOOPBACK'
if ip_clean == "*" or ip_clean == "0.0.0.0" or ip_clean == "::" or ip_clean == ":::0": return 'ANY'
if ip_clean.startswith("169.254") or ip_clean.lower().startswith("fe80:"): return 'LINK_LOCAL'
try:
ip = ipaddress.ip_address(ip_clean)
if ip.is_loopback: return 'LOOPBACK'
if ip.is_multicast: return 'MULTICAST'
if ip.is_private: return 'PRIVATE'
return 'PUBLIC'
except ValueError:
return 'INVALID'
def es_port_dinamic(port):
return 49152 <= port <= 65535
def analizar_netscan_reasoned(archivo_path):
alerts_process_mismatch = []
alerts_suspicious_app = []
alerts_c2_traffic = []
alerts_lateral_move = []
alerts_rare_ports = []
stats = {"total": 0, "hidden": 0}
try:
with open(archivo_path, 'r') as f:
lines = f.readlines()
print(f"\n{CYAN}{'='*90}")
print(f" [*] ANALIZADOR NETSCAN FORENSE EXPLICADO v6.0")
print(f"{'='*90}{RESET}\n")
for line in lines:
if "Offset" in line or "Volatility" in line or not line.strip(): continue
parts = line.strip().split()
if len(parts) < 5: continue
stats["total"] += 1
proto = parts[1]
local_addr_raw = parts[2]
remote_addr_raw = parts[3]
state = "UDP"
current_idx = 4
if proto.lower().startswith("tcp"):
state = parts[current_idx]
current_idx += 1
owner = "?"
for i in range(current_idx, len(parts)):
if parts[i].isdigit():
if i + 1 < len(parts): owner = " ".join(parts[i+1:])
break
if " " in owner: owner = owner.split()[0]
l_ip, l_port = parse_ip_port(local_addr_raw)
r_ip, r_port = parse_ip_port(remote_addr_raw)
if l_port == 0: continue
info = {'raw': line.strip(), 'l_port': l_port, 'owner': owner, 'proto': proto,
'state': state, 'r_ip': r_ip, 'r_port': r_port, 'reason': ''}
r_type = analizar_tipo_ip(r_ip)
l_type = analizar_tipo_ip(l_ip)
is_listening = "LISTENING" in state
if not is_listening and (l_type == 'LOOPBACK' or l_type == 'ANY') and (r_type == 'LOOPBACK' or r_type == 'ANY'):
stats["hidden"] += 1
continue
if r_type == 'MULTICAST' or l_type == 'MULTICAST':
stats["hidden"] += 1
continue
if l_port in KNOWN_SERVICES:
allowed = [x.lower() for x in KNOWN_SERVICES[l_port]]
if owner.lower() not in allowed:
info['reason'] = f"El port {l_port} està reservat per a {KNOWN_SERVICES[l_port]}, però es utilizado por '{owner}'. Esto puede indicar inyección de código o suplantación."
alerts_process_mismatch.append(info)
continue
else:
stats["hidden"] += 1
continue
if is_listening and owner.lower() in CLIENT_APPS:
info['reason'] = f"La aplicación '{owner}' es un client (navegador/oficina) i NUNCA debería estar en mode LISTENING. Possible backdoor."
alerts_suspicious_app.append(info)
continue
if r_type == 'PRIVATE' and state == 'ESTABLISHED':
info['reason'] = f"Conexión activa (ESTABLISHED) con IP privada {r_ip}. Posibles movimientos laterales dentro de la red local."
alerts_lateral_move.append(info)
continue
if r_type == 'PUBLIC':
info['reason'] = f"Conexión con IP pública {r_ip}. Verificar reputación en VirusTotal (Posible Command & Control)."
alerts_c2_traffic.append(info)
continue
if is_listening:
if es_port_dinamic(l_port) and owner.lower() in ["svchost.exe", "system", "lsass.exe", "services.exe", "wininit.exe", "spoolsv.exe"]:
stats["hidden"] += 1
continue
info['reason'] = f"El puerto {l_port} NO es un servicio estándar de Windows. A pesar de ser '{owner}', tener abierto un puerto desconocido es altamente sospechoso."
alerts_rare_ports.append(info)
continue
stats["hidden"] += 1
def print_block(alerts, color, title):
print(f"{color}{'='*90}")
print(f" {title}")
print(f"{'='*90}{RESET}")
for x in alerts:
print(f"{color}--> DETECCIÓN: {x['raw']}{RESET}")
print(f" {CYAN}[MOTIVO]: {x['reason']}{RESET}\n")
if alerts_process_mismatch:
print_block(alerts_process_mismatch, RED_BG, "[!!!] ALERTA CRÍTICA: PROCESO INCORRECTO")
if alerts_c2_traffic:
print_block(alerts_c2_traffic, RED, "[🌐] CONEXIONES INTERNET ACTIVAS (POTENCIAL C2)")
if alerts_lateral_move:
print_block(alerts_lateral_move, PURPLE, "[↔] MOVIMIENTO LATERAL DETECTADO (RED INTERNA)")
if alerts_suspicious_app:
print_block(alerts_suspicious_app, ORANGE, "[!] APP SOSPECHOSA ESCUCHANDO")
if alerts_rare_ports:
alerts_rare_ports.sort(key=lambda x: x['l_port'])
print_block(alerts_rare_ports, YELLOW, "[?] PUERTOS RAROS / NO ESTÁNDAR (Listening)")
print(f"{GREEN}[INFO] Se han ocultado {stats['hidden']} líneas de tráfico normal/ruido de sistema.{RESET}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
analizar_netscan_reasoned(sys.argv[1])

Next, we will run the python script to scan and view the results.

Result:

Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ python3 analizar_netscan.py netscan.txt
==========================================================================================
[*] ANALIZADOR NETSCAN FORENSE EXPLICADO v6.0
==========================================================================================
==========================================================================================
[?] PUERTOS RAROS / NO ESTÁNDAR (Listening)
==========================================================================================
--> DETECCIÓ: 0x5cabcdd0 TCPv4 0.0.0.0:554 0.0.0.0:0 LISTENING 2464 wmpnetwk.exe
[MOTIU]: El puerto 554 NO es un servicio estándar de Windows. A pesar de ser 'wmpnetwk.exe', tener abierto un puerto desconocido es altamente sospechoso.
--> DETECCIÓ: 0x5d5f79c0 TCPv4 0.0.0.0:554 0.0.0.0:0 LISTENING 2464 wmpnetwk.exe
[MOTIU]: El puerto 554 NO es un servicio estándar de Windows. A pesar de ser 'wmpnetwk.exe', tener abierto un puerto desconocido es altamente sospechoso.
--> DETECCIÓ: 0x5d5f79c0 TCPv6 :::554 :::0 LISTENING 2464 wmpnetwk.exe
[MOTIU]: El puerto 554 NO es un servicio estándar de Windows. A pesar de ser 'wmpnetwk.exe', tener abierto un puerto desconocido es altamente sospechoso.
--> DETECCIÓ: 0x5d5e8960 TCPv4 0.0.0.0:10243 0.0.0.0:0 LISTENING 4 System
[MOTIU]: El puerto 10243 NO es un servicio estándar de Windows. A pesar de ser 'System', tener abierto un puerto desconocido es altamente sospechoso.
--> DETECCIÓ: 0x5d5e8960 TCPv6 :::10243 :::0 LISTENING 4 System
[MOTIU]: El puerto 10243 NO es un servicio estándar de Windows. A pesar de ser 'System', tener abierto un puerto desconocido es altamente sospechoso.
[INFO] Se han ocultado 61 líneas de tráfico normal/ruido de sistema.
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

We will look for memory regions with execution, read, and write permissions (PAGE_EXECUTE_READWRITE) which often indicate code injection.

Command:

Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run --rm -v $PWD:/dumps:ro vol2 -f /dumps/victim.raw --profile=Win7SP1x64 malfind
Volatility Foundation Volatility Framework 2.6.1
Process: explorer.exe Pid: 1860 Address: 0x3ee0000
Vad Tag: VadS Protection: PAGE_EXECUTE_READWRITE
Flags: CommitCharge: 1, MemCommit: 1, PrivateMemory: 1, Protection: 6
0x0000000003ee0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0000000003ee0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0000000003ee0020 00 00 ee 03 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0000000003ee0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0000000003ee0000 0000 ADD [EAX], AL
0x0000000003ee0002 0000 ADD [EAX], AL
0x0000000003ee0004 0000 ADD [EAX], AL
0x0000000003ee0006 0000 ADD [EAX], AL
0x0000000003ee0008 0000 ADD [EAX], AL
0x0000000003ee000a 0000 ADD [EAX], AL
0x0000000003ee000c 0000 ADD [EAX], AL
0x0000000003ee000e 0000 ADD [EAX], AL
0x0000000003ee0010 0000 ADD [EAX], AL
0x0000000003ee0012 0000 ADD [EAX], AL
0x0000000003ee0014 0000 ADD [EAX], AL
0x0000000003ee0016 0000 ADD [EAX], AL
0x0000000003ee0018 0000 ADD [EAX], AL
0x0000000003ee001a 0000 ADD [EAX], AL
0x0000000003ee001c 0000 ADD [EAX], AL
0x0000000003ee001e 0000 ADD [EAX], AL
0x0000000003ee0020 0000 ADD [EAX], AL
0x0000000003ee0022 ee OUT DX, AL
0x0000000003ee0023 0300 ADD EAX, [EAX]
0x0000000003ee0025 0000 ADD [EAX], AL
0x0000000003ee0027 0000 ADD [EAX], AL
0x0000000003ee0029 0000 ADD [EAX], AL
0x0000000003ee002b 0000 ADD [EAX], AL
0x0000000003ee002d 0000 ADD [EAX], AL
0x0000000003ee002f 0000 ADD [EAX], AL
0x0000000003ee0031 0000 ADD [EAX], AL
0x0000000003ee0033 0000 ADD [EAX], AL
0x0000000003ee0035 0000 ADD [EAX], AL
0x0000000003ee0037 0000 ADD [EAX], AL
0x0000000003ee0039 0000 ADD [EAX], AL
0x0000000003ee003b 0000 ADD [EAX], AL
0x0000000003ee003d 0000 ADD [EAX], AL
0x0000000003ee003f 00 DB 0x0
Process: explorer.exe Pid: 1860 Address: 0x3f90000
Vad Tag: VadS Protection: PAGE_EXECUTE_READWRITE
Flags: CommitCharge: 2, PrivateMemory: 1, Protection: 6
0x0000000003f90000 00 00 00 00 00 00 00 00 4b 5b b2 8d 2d d2 00 01 ........K[..-...
0x0000000003f90010 ee ff ee ff 00 00 00 00 28 01 f9 03 00 00 00 00 ........(.......
0x0000000003f90020 28 01 f9 03 00 00 00 00 00 00 f9 03 00 00 00 00 (...............
0x0000000003f90030 00 00 f9 03 00 00 00 00 80 00 00 00 00 00 00 00 ................
0x0000000003f90000 0000 ADD [EAX], AL
0x0000000003f90002 0000 ADD [EAX], AL
0x0000000003f90004 0000 ADD [EAX], AL
0x0000000003f90006 0000 ADD [EAX], AL
0x0000000003f90008 4b DEC EBX
0x0000000003f90009 5b POP EBX
0x0000000003f9000a b28d MOV DL, 0x8d
0x0000000003f9000c 2dd20001ee SUB EAX, 0xee0100d2
0x0000000003f90011 ff DB 0xff
0x0000000003f90012 ee OUT DX, AL
0x0000000003f90013 ff00 INC DWORD [EAX]
0x0000000003f90015 0000 ADD [EAX], AL
0x0000000003f90017 0028 ADD [EAX], CH
0x0000000003f90019 01f9 ADD ECX, EDI
0x0000000003f9001b 0300 ADD EAX, [EAX]
0x0000000003f9001d 0000 ADD [EAX], AL
0x0000000003f9001f 0028 ADD [EAX], CH
0x0000000003f90021 01f9 ADD ECX, EDI
0x0000000003f90023 0300 ADD EAX, [EAX]
0x0000000003f90025 0000 ADD [EAX], AL
0x0000000003f90027 0000 ADD [EAX], AL
0x0000000003f90029 00f9 ADD CL, BH
0x0000000003f9002b 0300 ADD EAX, [EAX]
0x0000000003f9002d 0000 ADD [EAX], AL
0x0000000003f9002f 0000 ADD [EAX], AL
0x0000000003f90031 00f9 ADD CL, BH
0x0000000003f90033 0300 ADD EAX, [EAX]
0x0000000003f90035 0000 ADD [EAX], AL
0x0000000003f90037 008000000000 ADD [EAX+0x0], AL
0x0000000003f9003d 0000 ADD [EAX], AL
0x0000000003f9003f 00 DB 0x0
Process: svchost.exe Pid: 1820 Address: 0x24f0000
Vad Tag: VadS Protection: PAGE_EXECUTE_READWRITE
Flags: CommitCharge: 128, MemCommit: 1, PrivateMemory: 1, Protection: 6
0x00000000024f0000 20 00 00 00 e0 ff 07 00 0c 00 00 00 01 00 05 00 ................
0x00000000024f0010 00 42 00 50 00 30 00 70 00 60 00 00 00 00 00 00 .B.P.0.p.`......
0x00000000024f0020 48 8b 45 28 c7 00 00 00 00 00 c7 40 04 00 00 00 H.E(.......@....
0x00000000024f0030 00 48 8b 45 28 48 8d 40 08 48 89 c2 48 8b 45 20 .H.E(H.@.H..H.E.
0x00000000024f0000 2000 AND [EAX], AL
0x00000000024f0002 0000 ADD [EAX], AL
0x00000000024f0004 e0ff LOOPNZ 0x24f0005
0x00000000024f0006 07 POP ES
0x00000000024f0007 000c00 ADD [EAX+EAX], CL
0x00000000024f000a 0000 ADD [EAX], AL
0x00000000024f000c 0100 ADD [EAX], EAX
0x00000000024f000e 0500004200 ADD EAX, 0x420000
0x00000000024f0013 50 PUSH EAX
0x00000000024f0014 0030 ADD [EAX], DH
0x00000000024f0016 007000 ADD [EAX+0x0], DH
0x00000000024f0019 60 PUSHA
0x00000000024f001a 0000 ADD [EAX], AL
0x00000000024f001c 0000 ADD [EAX], AL
0x00000000024f001e 0000 ADD [EAX], AL
0x00000000024f0020 48 DEC EAX
0x00000000024f0021 8b4528 MOV EAX, [EBP+0x28]
0x00000000024f0024 c70000000000 MOV DWORD [EAX], 0x0
0x00000000024f002a c7400400000000 MOV DWORD [EAX+0x4], 0x0
0x00000000024f0031 48 DEC EAX
0x00000000024f0032 8b4528 MOV EAX, [EBP+0x28]
0x00000000024f0035 48 DEC EAX
0x00000000024f0036 8d4008 LEA EAX, [EAX+0x8]
0x00000000024f0039 48 DEC EAX
0x00000000024f003a 89c2 MOV EDX, EAX
0x00000000024f003c 48 DEC EAX
0x00000000024f003d 8b4520 MOV EAX, [EBP+0x20]
Process: svchost.exe Pid: 1820 Address: 0x4d90000
Vad Tag: VadS Protection: PAGE_EXECUTE_READWRITE
Flags: CommitCharge: 256, MemCommit: 1, PrivateMemory: 1, Protection: 6
0x0000000004d90000 20 00 00 00 e0 ff 0f 00 0c 00 00 00 01 00 05 00 ................
0x0000000004d90010 00 42 00 50 00 30 00 70 00 60 00 00 00 00 00 00 .B.P.0.p.`......
0x0000000004d90020 ba fc ff ff ff 03 55 20 03 55 5c b9 04 00 1a 00 ......U..U\.....
0x0000000004d90030 4c 8b c5 ff 95 e0 37 00 00 8b 4d 24 89 08 48 8d L.....7...M$..H.
0x0000000004d90000 2000 AND [EAX], AL
0x0000000004d90002 0000 ADD [EAX], AL
0x0000000004d90004 e0ff LOOPNZ 0x4d90005
0x0000000004d90006 0f000c00 STR WORD [EAX+EAX]
0x0000000004d9000a 0000 ADD [EAX], AL
0x0000000004d9000c 0100 ADD [EAX], EAX
0x0000000004d9000e 0500004200 ADD EAX, 0x420000
0x0000000004d90013 50 PUSH EAX
0x0000000004d90014 0030 ADD [EAX], DH
0x0000000004d90016 007000 ADD [EAX+0x0], DH
0x0000000004d90019 60 PUSHA
0x0000000004d9001a 0000 ADD [EAX], AL
0x0000000004d9001c 0000 ADD [EAX], AL
0x0000000004d9001e 0000 ADD [EAX], AL
0x0000000004d90020 bafcffffff MOV EDX, 0xfffffffc
0x0000000004d90025 035520 ADD EDX, [EBP+0x20]
0x0000000004d90028 03555c ADD EDX, [EBP+0x5c]
0x0000000004d9002b b904001a00 MOV ECX, 0x1a0004
0x0000000004d90030 4c DEC ESP
0x0000000004d90031 8bc5 MOV EAX, EBP
0x0000000004d90033 ff95e0370000 CALL DWORD [EBP+0x37e0]
0x0000000004d90039 8b4d24 MOV ECX, [EBP+0x24]
0x0000000004d9003c 8908 MOV [EAX], ECX
0x0000000004d9003e 48 DEC EAX
0x0000000004d9003f 8d DB 0x8d
Process: wmpnetwk.exe Pid: 2464 Address: 0x280000
Vad Tag: VadS Protection: PAGE_EXECUTE_READWRITE
Flags: CommitCharge: 16, MemCommit: 1, PrivateMemory: 1, Protection: 6
0x0000000000280000 41 ba 80 00 00 00 48 b8 38 a1 e6 ff fe 07 00 00 A.....H.8.......
0x0000000000280010 48 ff 20 90 41 ba 81 00 00 00 48 b8 38 a1 e6 ff H...A.....H.8...
0x0000000000280020 fe 07 00 00 48 ff 20 90 41 ba 82 00 00 00 48 b8 ....H...A.....H.
0x0000000000280030 38 a1 e6 ff fe 07 00 00 48 ff 20 90 41 ba 83 00 8.......H...A...
0x0000000000280000 41 INC ECX
0x0000000000280001 ba80000000 MOV EDX, 0x80
0x0000000000280006 48 DEC EAX
0x0000000000280007 b838a1e6ff MOV EAX, 0xffe6a138
0x000000000028000c fe07 INC BYTE [EDI]
0x000000000028000e 0000 ADD [EAX], AL
0x0000000000280010 48 DEC EAX
0x0000000000280011 ff20 JMP DWORD [EAX]
0x0000000000280013 90 NOP
0x0000000000280014 41 INC ECX
0x0000000000280015 ba81000000 MOV EDX, 0x81
0x000000000028001a 48 DEC EAX
0x000000000028001b b838a1e6ff MOV EAX, 0xffe6a138
0x0000000000280020 fe07 INC BYTE [EDI]
0x0000000000280022 0000 ADD [EAX], AL
0x0000000000280024 48 DEC EAX
0x0000000000280025 ff20 JMP DWORD [EAX]
0x0000000000280027 90 NOP
0x0000000000280028 41 INC ECX
0x0000000000280029 ba82000000 MOV EDX, 0x82
0x000000000028002e 48 DEC EAX
0x000000000028002f b838a1e6ff MOV EAX, 0xffe6a138
0x0000000000280034 fe07 INC BYTE [EDI]
0x0000000000280036 0000 ADD [EAX], AL
0x0000000000280038 48 DEC EAX
0x0000000000280039 ff20 JMP DWORD [EAX]
0x000000000028003b 90 NOP
0x000000000028003c 41 INC ECX
0x000000000028003d ba DB 0xba
0x000000000028003e 83 DB 0x83
0x000000000028003f 00 DB 0x0
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

Result:

  • Suspicious processes detected (PIDs): 1860, 1820, 2464

  • Indicators: Is the 'MZ' header or abnormal hexadecimal code observed?

    In the output, the classic 4D 5A (“MZ”) header is NOT seen at the beginning of the blocks. This indicates that a complete .exe or .dll file has not been injected as is (or the header has been wiped to hide it), but rather it is likely Shellcode or an obfuscated executable.

We will dump the memory of suspicious processes to search for text strings (strings) related to malicious domains.

Step 1: Memory Dump Command:

Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run --rm -v "$PWD":/dumps vol2 -f /dumps/victim.raw --profile=Win7SP1x64 memdump -p 1820 --dump-dir=/dumps/resultat_memdump
Volatility Foundation Volatility Framework 2.6.1
************************************************************************
Writing svchost.exe [ 1820] to 1820.dmp
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run --rm -v "$PWD":/dumps vol2 -f /dumps/victim.raw --profile=Win7SP1x64 memdump -p 1860 --dump-dir=/dumps/resultat_memdump
Volatility Foundation Volatility Framework 2.6.1
************************************************************************
Writing explorer.exe [ 1860] to 1860.dmp
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run --rm -v "$PWD":/dumps vol2 -f /dumps/victim.raw --profile=Win7SP1x64 memdump -p 2464 --dump-dir=/dumps/resultat_memdump
Volatility Foundation Volatility Framework 2.6.1
************************************************************************
Writing wmpnetwk.exe [ 2464] to 2464.dmp
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

Step 2: String Search (Grep) Command:

  • PID 1820

    Ventana de terminal
    strings resultat_memdump/1820.dmp | grep "www.go"
    strings resultat_memdump/1820.dmp | grep "www.i"
    strings resultat_memdump/1820.dmp | grep "www.ic"
    strings resultat_memdump/1820.dmp | grep -E "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
  • PID 1860

    Ventana de terminal
    strings resultat_memdump/1860.dmp | grep "www.go"
    strings resultat_memdump/1860.dmp | grep "www.i"
    strings resultat_memdump/1860.dmp | grep "www.ic"
    strings resultat_memdump/1860.dmp | grep -E "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
  • PID 2464

    Ventana de terminal
    strings resultat_memdump/2464.dmp | grep "www.go"
    strings resultat_memdump/2464.dmp | grep "www.i"
    strings resultat_memdump/2464.dmp | grep "www.ic"
    strings resultat_memdump/2464.dmp | grep -E "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"

Result (IOCs Found):

  • Domain 1: www.go****.ru -> www.goporn.ru, www.go4win.ru, www.go4win.ru, www.gocaps.ru
  • Domain 2: www.i****.com -> www.iciba.com, www.ikaka.com
  • Domain 3: www.ic******.com -> www.icsalabs.com
  • IP 1: 202..233. -> 202.107.233.211
  • IP 2: .200..164 -> 209.200.12.164
  • IP 3: 209.190.. -> 209.190.122.186

Command:

Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/Snapshot19.vmem imageinfo
[sudo] contraseña para user.portelcore:
Volatility Foundation Volatility Framework 2.6.1
INFO : volatility.debug : Determining profile based on KDBG search...
Suggested Profile(s) : Win7SP1x64, Win7SP0x64, Win2008R2SP0x64, Win2008R2SP1x64_24000, Win2008R2SP1x64_23418, Win2008R2SP1x64, Win7SP1x64_24000, Win7SP1x64_23418
AS Layer1 : WindowsAMD64PagedMemory (Kernel AS)
AS Layer2 : FileAddressSpace (/dumps/Snapshot19.vmem)
PAE type : No PAE
DTB : 0x187000L
KDBG : 0xf80002bfd0a0L
Number of Processors : 1
Image Type (Service Pack) : 1
KPCR for CPU 0 : 0xfffff80002bfed00L
KUSER_SHARED_DATA : 0xfffff78000000000L
Image date and time : 2020-12-27 23:06:01 UTC+0000
Image local date and time : 2020-12-28 00:06:01 +0100
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

Result:

  • Selected profile: Win7SP1x64

We will extract the users' NTLM hashes and crack them (or look them up) to obtain the plaintext password.

Command (Extraction):

Ventana de terminal
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$ sudo docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/Snapshot19.vmem --profile=Win7SP1x64 hashdump
Volatility Foundation Volatility Framework 2.6.1
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
John:1001:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
HomeGroupUser$:1002:aad3b435b51404eeaad3b435b51404ee:91c34c06b7988e216c3bfeb9530cabfb:::
user.portelcore@fedora:~/Escritorio/Cyber/M4-Forense/Volatiliy/victimas$

Result:

  • John's user hash: aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
  • Plaintext password (after cracking): [RESPUESTA]

We will check the Windows registry in memory to find out when the machine was last shut down.

Command:

docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/imagen2.vmem --profile=[PERFIL] printkey -K "ShutdownTime"

Result:

  • Date and time (UTC): [RESPUESTA]

We will search for TrueCrypt encrypted container passwords in memory.

Command:

docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/imagen2.vmem --profile=[PERFIL] truecryptpassphrase

Result:

  • Password found: [RESPUESTA]

Legal Disclaimer: This exercise was performed in a controlled environment for exclusively educational purposes.

Note: It is recommended to redirect the output of long commands to text files (for example, > salida.txt) so as not to have to wait every time.

We must determine the operating system. We will use both Volatility 2 (imageinfo) and Volatility 3 (windows.info).

Command (Volatility 2):

Ventana de terminal
docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/victim.raw imageinfo > imageinfo_victim.txt
cat imageinfo_victim.txt

Command (Volatility 3):

docker run --rm -v "$PWD":/dumps:ro vol3 -f /dumps/victim.raw windows.info

Result and Analysis:

  • Detected Operating System: [RESPUESTA]
  • Suggested profile (Vol2) that we will use: [ESCRIBIR EL PERFIL AQUÍ]
  • Screenshot:
[ENGANXAR RESULTAT DE IMAGEINFO/WINDOWS.INFO]

We will check the profile and analyze the process tree. We will execute pslist, pstree, and psxview.

Commands:

# Llistat simple (per verificar perfil)
docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/victim.raw --profile=[PERFIL] pslist > pslist.txt
# Arbre de processos (relació pare-fill)
docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/victim.raw --profile=[PERFIL] pstree > pstree.txt
# Visió creuada (processos ocults)
docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/victim.raw --profile=[PERFIL] psxview > psxview.txt

Questions:

  • What is the process identifier (PID) of SearchIndexer? [RESPUESTA]
  • What is its parent process (PPID) and what is its PID? [RESPUESTA]
  • Relevant capture (Pstree or Pslist):
[ENGANXAR PART DEL PSLIST/PSTREE ON SURT SEARCHINDEXER]

We will investigate user activity through Shellbags.

Command:

Ventana de terminal
docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/victim.raw --profile=[PERFIL] shellbags > shellbags.txt
# Podemos hacer un grep para buscar fechas recientes o abrir el archivo de texto

Result:

  • What was the last directory accessed by the user? [RESPUESTA]
  • Access date: [RESPUESTA]

We will search for active connections.

Command:

docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/victim.raw --profile=[PERFIL] netscan
# Si netscan no funciona (per ser XP), prova 'connscan' o 'sockets'

Result:

  • Are there any suspicious ports? Which is the first one that appears? [RESPUESTA]
  • Status and remote IP: [RESPUESTA]

We will execute malfind to search for code injection. We will look for Vad Tag attributes and PAGE_EXECUTE_READWRITE protection.

Command:

docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/victim.raw --profile=[PERFIL] malfind > malfind.txt

Result:

  • Which processes are suspicious (PIDs)? [RESPUESTA]
  • Justification (Hexa/VAD Tags): [RESPUESTA]

We will extract images of the malicious processes detected in the previous step and search for specific patterns (strings).

Step 1: Memory Dump Command:

Ventana de terminal
# Substitueix [PID] pels PIDs trobats a malfind (ex: 1234)
docker run --rm -v "$PWD":/dumps vol2 -f /dumps/victim.raw --profile=[PERFIL] memdump -p [PID] --dump-dir=/dumps

Step 2: String Search (Grep) These commands are executed directly in the Fedora terminal on the created .dmp files.

Commands and Results:

  1. ‘www.go*.ru’**

    Ventana de terminal
    strings [PID].dmp | grep "www.go"

    Result: [RESPUESTA]

  2. ‘www.i*.com’**

    Ventana de terminal
    strings [PID].dmp | grep "www.i"

    Result: [RESPUESTA]

  3. ‘www.ic***.com’**

    Ventana de terminal
    strings [PID].dmp | grep "www.ic"

    Result: [RESPUESTA]

  4. IP ‘202..233.’

    Ventana de terminal
    strings [PID].dmp | grep "202\." | grep "233\."

    Result: [RESPUESTA]

  5. IP ‘*.200..164’

    Ventana de terminal
    strings [PID].dmp | grep "\.200\." | grep "164"

    Result: [RESPUESTA]

  6. IP ‘209.190..’

    Ventana de terminal
    strings [PID].dmp | grep "209\.190\."

    Result: [RESPUESTA]

Command:

docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/Snapshot19.vmem imageinfo

Result:

  • Operating System and Profile: [RESPUESTA]

We will extract credentials and use the list rockyou (or an online tool if we don't have john installed locally) to find the password.

Command (Extraction):

docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/Snapshot19.vmem --profile=[PERFIL] hashdump

Result:

  • John's NTLM Hash: [COPIAR HASH]
  • Plaintext Password (Cracked): [RESPUESTA]

We will look for the registry key ShutdownTime.

Command:

docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/Snapshot19.vmem --profile=[PERFIL] printkey -K "ShutdownTime"

Result:

  • When was the last system shutdown performed? [RESPUESTA]

We will search for the encrypted volume password in memory.

Command:

docker run --rm -v "$PWD":/dumps:ro vol2 -f /dumps/Snapshot19.vmem --profile=[PERFIL] truecryptpassphrase

Result:

  • What is the found TrueCrypt password? [RESPUESTA]

Legal Disclaimer: This exercise was performed in a controlled environment for exclusively educational purposes.