10 questions about my system
Description
Auteur: noraj
Difficulté estimée : moyen
Format de Flag : sigsegv{sha1(flag)}Description:
openSUSE Leap 15.1
4.12.14-lp151.28.32-default (4.12.14-lp151.28.32.1)
Question n°1: Quelle est la commande que noraj a utilisé à 2019-11-19 22:57:38 UTC+0000?
Question n°2: Quelle version de gcc a été utilisée pour compiler le kernel? (string entière)
Question n°3: Quel est le message de debug à 1105416124.1?
Question n°4: Quelle est l‘adresse IP de eth0 et son adresse MAC? (concatène la réponse)
Question n°5: Quelle est la 3ème bibliothèque chargée par sshd? (chemin entier)
Question n°6: Quels sont le système de fichier et les options de montage de /tmp? (concatène la réponse)
Question n°7: Quels sont le nom/pid du processus qui utilise le socket UNIX 18707?
Question n°8: Quelle est la commande entière du pid 364?
Question n°9: Quel est l‘invocation id de bash?
Question n°10: Quel est le PPID of qmgr process?
Affichage du profil
root@kali:/tmp/chall# volatility -f chall.raw imageinfo
CRTL + C
Echec : au bout de 10 minutes, toujours pas de réponse.
Vérification des profils présents dans volatility à l’aide de la commande –info
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --info
Volatility Foundation Volatility Framework 2.6
Profiles
--------
VistaSP0x64 - A Profile for Windows Vista SP0 x64
VistaSP0x86 - A Profile for Windows Vista SP0 x86
VistaSP1x64 - A Profile for Windows Vista SP1 x64
VistaSP1x86 - A Profile for Windows Vista SP1 x86
VistaSP2x64 - A Profile for Windows Vista SP2 x64
VistaSP2x86 - A Profile for Windows Vista SP2 x86
Win10x64 - A Profile for Windows 10 x64
Win10x64_10240_17770 - A Profile for Windows 10 x64 (10.0.10240.17770 / 2018-02-10)
Win10x64_10586 - A Profile for Windows 10 x64 (10.0.10586.306 / 2016-04-23)
Win10x64_14393 - A Profile for Windows 10 x64 (10.0.14393.0 / 2016-07-16)
Win10x64_15063 - A Profile for Windows 10 x64 (10.0.15063.0 / 2017-04-04)
Win10x64_16299 - A Profile for Windows 10 x64 (10.0.16299.0 / 2017-09-22)
Win10x64_17134 - A Profile for Windows 10 x64 (10.0.17134.1 / 2018-04-11)
Win10x86 - A Profile for Windows 10 x86
Win10x86_10240_17770 - A Profile for Windows 10 x86 (10.0.10240.17770 / 2018-02-10)
Win10x86_10586 - A Profile for Windows 10 x86 (10.0.10586.420 / 2016-05-28)
Win10x86_14393 - A Profile for Windows 10 x86 (10.0.14393.0 / 2016-07-16)
Win10x86_15063 - A Profile for Windows 10 x86 (10.0.15063.0 / 2017-04-04)
Win10x86_16299 - A Profile for Windows 10 x86 (10.0.16299.15 / 2017-09-29)
Win10x86_17134 - A Profile for Windows 10 x86 (10.0.17134.1 / 2018-04-11)
Win2003SP0x86 - A Profile for Windows 2003 SP0 x86
Win2003SP1x64 - A Profile for Windows 2003 SP1 x64
Win2003SP1x86 - A Profile for Windows 2003 SP1 x86
Win2003SP2x64 - A Profile for Windows 2003 SP2 x64
Win2003SP2x86 - A Profile for Windows 2003 SP2 x86
Win2008R2SP0x64 - A Profile for Windows 2008 R2 SP0 x64
Win2008R2SP1x64 - A Profile for Windows 2008 R2 SP1 x64
Win2008R2SP1x64_23418 - A Profile for Windows 2008 R2 SP1 x64 (6.1.7601.23418 / 2016-04-09)
Win2008R2SP1x64_24000 - A Profile for Windows 2008 R2 SP1 x64 (6.1.7601.24000 / 2016-04-09)
Win2008SP1x64 - A Profile for Windows 2008 SP1 x64
Win2008SP1x86 - A Profile for Windows 2008 SP1 x86
Win2008SP2x64 - A Profile for Windows 2008 SP2 x64
Win2008SP2x86 - A Profile for Windows 2008 SP2 x86
Win2012R2x64 - A Profile for Windows Server 2012 R2 x64
Win2012R2x64_18340 - A Profile for Windows Server 2012 R2 x64 (6.3.9600.18340 / 2016-05-13)
Win2012x64 - A Profile for Windows Server 2012 x64
Win2016x64_14393 - A Profile for Windows Server 2016 x64 (10.0.14393.0 / 2016-07-16)
Win7SP0x64 - A Profile for Windows 7 SP0 x64
Win7SP0x86 - A Profile for Windows 7 SP0 x86
Win7SP1x64 - A Profile for Windows 7 SP1 x64
Win7SP1x64_23418 - A Profile for Windows 7 SP1 x64 (6.1.7601.23418 / 2016-04-09)
Win7SP1x64_24000 - A Profile for Windows 7 SP1 x64 (6.1.7601.24000 / 2018-01-09)
Win7SP1x86 - A Profile for Windows 7 SP1 x86
Win7SP1x86_23418 - A Profile for Windows 7 SP1 x86 (6.1.7601.23418 / 2016-04-09)
Win7SP1x86_24000 - A Profile for Windows 7 SP1 x86 (6.1.7601.24000 / 2018-01-09)
Win81U1x64 - A Profile for Windows 8.1 Update 1 x64
Win81U1x86 - A Profile for Windows 8.1 Update 1 x86
Win8SP0x64 - A Profile for Windows 8 x64
Win8SP0x86 - A Profile for Windows 8 x86
Win8SP1x64 - A Profile for Windows 8.1 x64
Win8SP1x64_18340 - A Profile for Windows 8.1 x64 (6.3.9600.18340 / 2016-05-13)
Win8SP1x86 - A Profile for Windows 8.1 x86
WinXPSP1x64 - A Profile for Windows XP SP1 x64
WinXPSP2x64 - A Profile for Windows XP SP2 x64
WinXPSP2x86 - A Profile for Windows XP SP2 x86
WinXPSP3x86 - A Profile for Windows XP SP3 x86
Il n’y a aucun profil Linux, nous allons devoir le créer.
Création du profil OpenSuse
Afin de créer le profil OpenSuse, nous devons :
- créer une VM,
- installer volatility,
- créer le profil
Création de la VM
Nous téléchargeons l’iso correspondant à la description de l’épreuve : OpenSuse Leap 15.1
Nous créons une VM « classique » OpenSuse en mode serveur.
Construction du profil
Une fois la VM créée, on exécute les commandes suivantes :
root@Opensuse:~# apt install kernel-source
root@Opensuse:~# apt install libdwarf-tools
root@Opensuse:~# apt install git
root@Opensuse:~# git clone https://github.com/volatilityfoundation/volatility.git
root@Opensuse:~# cd volatility/tools/linux/
root@Opensuse:~# make
root@Opensuse:~# cd ../../..
root@Opensuse:~# zip OpenSUSE_$(uname -r)_profile.zip ./volatility/tools/linux/module.dwarf /boot/System.map-$(uname -r)
Le fichier OpenSUSE_4.12.14-lp151.28.32-default_profile.zip contient notre profil OpenSuse. Récuperez le sur votre poste pour l’insérer dans volatility.
Ajout du profil
Installation du profil
Il faut placer le fichier OpenSUSE_4.12.14-lp151.28.32-default_profile.zip dans $VOLATILITY_HOME/plugins/overlays/linux.
Vérification
Toujours à l’aide de la commande –info
LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 - A Profile for Linux OpenSUSE_4.12.14-lp151.28.32-default_profile x64
VistaSP0x64 - A Profile for Windows Vista SP0 x64
VistaSP0x86 - A Profile for Windows Vista SP0 x86
VistaSP1x64 - A Profile for Windows Vista SP1 x64
VistaSP1x86 - A Profile for Windows Vista SP1 x86
VistaSP2x64 - A Profile for Windows Vista SP2 x64
VistaSP2x86 - A Profile for Windows Vista SP2 x86
Win10x64 - A Profile for Windows 10 x64
Win10x64_10240_17770 - A Profile for Windows 10 x64 (10.0.10240.17770 / 2018-02-10)
Win10x64_10586 - A Profile for Windows 10 x64 (10.0.10586.306 / 2016-04-23)
Win10x64_14393 - A Profile for Windows 10 x64 (10.0.14393.0 / 2016-07-16)
Win10x64_15063 - A Profile for Windows 10 x64 (10.0.15063.0 / 2017-04-04)
Win10x64_16299 - A Profile for Windows 10 x64 (10.0.16299.0 / 2017-09-22)
Win10x64_17134 - A Profile for Windows 10 x64 (10.0.17134.1 / 2018-04-11)
Win10x86 - A Profile for Windows 10 x86
Win10x86_10240_17770 - A Profile for Windows 10 x86 (10.0.10240.17770 / 2018-02-10)
Win10x86_10586 - A Profile for Windows 10 x86 (10.0.10586.420 / 2016-05-28)
Win10x86_14393 - A Profile for Windows 10 x86 (10.0.14393.0 / 2016-07-16)
Win10x86_15063 - A Profile for Windows 10 x86 (10.0.15063.0 / 2017-04-04)
Win10x86_16299 - A Profile for Windows 10 x86 (10.0.16299.15 / 2017-09-29)
Win10x86_17134 - A Profile for Windows 10 x86 (10.0.17134.1 / 2018-04-11)
Win2003SP0x86 - A Profile for Windows 2003 SP0 x86
Win2003SP1x64 - A Profile for Windows 2003 SP1 x64
Win2003SP1x86 - A Profile for Windows 2003 SP1 x86
Win2003SP2x64 - A Profile for Windows 2003 SP2 x64
Win2003SP2x86 - A Profile for Windows 2003 SP2 x86
Win2008R2SP0x64 - A Profile for Windows 2008 R2 SP0 x64
Win2008R2SP1x64 - A Profile for Windows 2008 R2 SP1 x64
Win2008R2SP1x64_23418 - A Profile for Windows 2008 R2 SP1 x64 (6.1.7601.23418 / 2016-04-09)
Win2008R2SP1x64_24000 - A Profile for Windows 2008 R2 SP1 x64 (6.1.7601.24000 / 2016-04-09)
Win2008SP1x64 - A Profile for Windows 2008 SP1 x64
Win2008SP1x86 - A Profile for Windows 2008 SP1 x86
Win2008SP2x64 - A Profile for Windows 2008 SP2 x64
Win2008SP2x86 - A Profile for Windows 2008 SP2 x86
Win2012R2x64 - A Profile for Windows Server 2012 R2 x64
Win2012R2x64_18340 - A Profile for Windows Server 2012 R2 x64 (6.3.9600.18340 / 2016-05-13)
Win2012x64 - A Profile for Windows Server 2012 x64
Win2016x64_14393 - A Profile for Windows Server 2016 x64 (10.0.14393.0 / 2016-07-16)
Win7SP0x64 - A Profile for Windows 7 SP0 x64
Win7SP0x86 - A Profile for Windows 7 SP0 x86
Win7SP1x64 - A Profile for Windows 7 SP1 x64
Win7SP1x64_23418 - A Profile for Windows 7 SP1 x64 (6.1.7601.23418 / 2016-04-09)
Win7SP1x64_24000 - A Profile for Windows 7 SP1 x64 (6.1.7601.24000 / 2018-01-09)
Win7SP1x86 - A Profile for Windows 7 SP1 x86
Win7SP1x86_23418 - A Profile for Windows 7 SP1 x86 (6.1.7601.23418 / 2016-04-09)
Win7SP1x86_24000 - A Profile for Windows 7 SP1 x86 (6.1.7601.24000 / 2018-01-09)
Win81U1x64 - A Profile for Windows 8.1 Update 1 x64
Win81U1x86 - A Profile for Windows 8.1 Update 1 x86
Win8SP0x64 - A Profile for Windows 8 x64
Win8SP0x86 - A Profile for Windows 8 x86
Win8SP1x64 - A Profile for Windows 8.1 x64
Win8SP1x64_18340 - A Profile for Windows 8.1 x64 (6.3.9600.18340 / 2016-05-13)
Win8SP1x86 - A Profile for Windows 8.1 x86
WinXPSP1x64 - A Profile for Windows XP SP1 x64
WinXPSP2x64 - A Profile for Windows XP SP2 x64
WinXPSP2x86 - A Profile for Windows XP SP2 x86
WinXPSP3x86 - A Profile for Windows XP SP3 x86
Cool, le profil est apparu, il se nomme « LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 ». Nous allons pouvoir passer aux questions.
Question n°1
Quelle est la commande que noraj a utilisé à 2019-11-19 22:57:38 UTC+0000?
Pour répondre, il faut utiliser le plugin linux_bash.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_bash | grep 22:57:38
Volatility Foundation Volatility Framework 2.6
1498 bash 2019-11-19 22:57:38 UTC+0000 python3 -m http.server 1337
La réponse est « python3 -m http.server 1337 »
import hashlib
print("sigsegv{"+hashlib.sha1(b"python3 -m http.server 1337").hexdigest()+"}")
sigsegv{1d4893cc25cc5453be125227fb8ac34988c29ad0}
Le flag est donc sigsegv{1d4893cc25cc5453be125227fb8ac34988c29ad0}.
Question n°2
Quelle version de gcc a été utilisée pour compiler le kernel? (string entière)
Pour répondre, il faut utiliser le plugin linux_dmesg.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_dmesg | grep gcc
Volatility Foundation Volatility Framework 2.6
[0.0] Linux version 4.12.14-lp151.28.32-default (geeko@buildhost) (gcc version 7.4.1 20190905 [gcc-7-branch revision 275407] (SUSE Linux) ) #1 SMP Wed Nov 13 07:50:15 UTC 2019 (6e1aaad)
La réponse est « gcc version 7.4.1 20190905 [gcc-7-branch revision 275407] (SUSE Linux) ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"gcc version 7.4.1 20190905 [gcc-7-branch revision 275407] (SUSE Linux)").hexdigest()+"}")
sigsegv{524993e05b0ded8e112a134c68d04b319de13423}
Le flag est donc sigsegv{524993e05b0ded8e112a134c68d04b319de13423}.
Question n°3
Quel est le message de debug à 1105416124.1?
Pour répondre, il faut utiliser le plugin linux_dmesg.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_dmesg | grep 1105416124.1
Volatility Foundation Volatility Framework 2.6
[1105416124.1] Magic number: 11:134:907
La réponse est « Magic number: 11:134:907 ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"Magic number: 11:134:907").hexdigest()+"}")
sigsegv{77038af8d03d8b4cdb28e6e592b87a2c3195d1fe}
Le flag est donc sigsegv{77038af8d03d8b4cdb28e6e592b87a2c3195d1fe}.
Question n°4
Quelle est l’adresse IP de eth0 et son adresse MAC? (concatène la réponse)
Pour répondre, il faut utiliser le plugin linux_ifconfig.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_ifconfig
Volatility Foundation Volatility Framework 2.6
Interface IP Address MAC Address Promiscous Mode
---------------- -------------------- ------------------ ---------------
lo 127.0.0.1 00:00:00:00:00:00 False
eth0 192.168.1.94 08:00:27:93:fe:6c False
lo 127.0.0.1 00:00:00:00:00:00 False
La réponse est « 192.168.1.9408:00:27:93:fe:6c ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"192.168.1.9408:00:27:93:fe:6c").hexdigest()+"}")
sigsegv{cba34462a24124ada4e4882a4db5104b254343f8}
Le flag est donc sigsegv{cba34462a24124ada4e4882a4db5104b254343f8}.
Question n°5
Quelle est la 3ème bibliothèque chargée par sshd? (chemin entier)
Pour répondre, il faut utiliser le plugin linux_library_list.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_library_list | grep sshd
Volatility Foundation Volatility Framework 2.6
sshd 1271 0x00007f0e8ec8a000 /usr/lib64/libgpg-error.so.0
sshd 1271 0x00007f0e8eeaa000 /lib64/libresolv.so.2
sshd 1271 0x00007f0e8f0c1000 /usr/lib64/libkeyutils.so.1
...
La réponse est « /usr/lib64/libkeyutils.so.1 ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"/usr/lib64/libkeyutils.so.1").hexdigest()+"}")
sigsegv{bcf5ae7945ce4e711d11861ec2cc1f75efbe758b}
Le flag est donc sigsegv{bcf5ae7945ce4e711d11861ec2cc1f75efbe758b}.
Question n°6
Quels sont le système de fichier et les options de montage de /tmp? (concatène la réponse)
Pour répondre, il faut utiliser le plugin linux_mount.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_mount
Volatility Foundation Volatility Framework 2.6
tmpfs /@/sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec
proc /@/proc proc rw,relatime,nosuid,nodev,noexec
devtmpfs /@/dev devtmpfs rw,nosuid
/dev/sda2 /@/@/tmp/tmp btrfs rw,relatime
...
La réponse est « btrfsrw,relatime ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"btrfsrw,relatime").hexdigest()+"}")
sigsegv{d27802b77f4a14b3745ab47aaa86cfdc3c231394}
Le flag est donc sigsegv{d27802b77f4a14b3745ab47aaa86cfdc3c231394}.
Question n°7
Quels sont le nom/pid du processus qui utilise le socket UNIX 18707?
Pour répondre, il faut utiliser le plugin linux_netstat .
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_netstat | grep 18707
Volatility Foundation Volatility Framework 2.6
UNIX 18707 wickedd-nanny/866
...
La réponse est « wickedd-nanny/866 ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"wickedd-nanny/866").hexdigest()+"}")
sigsegv{6b95288247a023c860fe0848f3990cc25ce7d697}
Le flag est donc sigsegv{6b95288247a023c860fe0848f3990cc25ce7d697}.
Question n°8
Quelle est la commande entière du pid 364?
Pour répondre, il faut utiliser le plugin linux_psaux.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_psaux | grep 364
Volatility Foundation Volatility Framework 2.6
364 0 0 /usr/sbin/haveged -w 1024 -v 0 -F
La réponse est « /usr/sbin/haveged -w 1024 -v 0 -F ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"/usr/sbin/haveged -w 1024 -v 0 -F").hexdigest()+"}")
sigsegv{4c0bed3d6381e2014d77a35e6931d604e4bd8ec1}
Le flag est donc sigsegv{4c0bed3d6381e2014d77a35e6931d604e4bd8ec1}.
Question n°9
Quel est l’invocation id de bash?
Pour répondre, il faut utiliser le plugin linux_psenv.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_psenv | grep bash
Volatility Foundation Volatility Framework 2.6
systemd 1492 LANG=en_US.UTF-8 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin NOTIFY_SOCKET=/run/systemd/notify HOME=/home/noraj LOGNAME=noraj USER=noraj SHELL=/bin/bash INVOCATION_ID=4f7919c029f3456595df21dee5e3de44 JOURNAL_STREAM=9:21708 XDG_RUNTIME_DIR=/run/user/1000
bash 1498 LANG= PATH=/usr/local/bin:/bin:/usr/bin INVOCATION_ID=d6dd8e717833428bac595d565958fdf4 TERM=linux JOURNAL_STREAM=9:21427 LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= HOME=/home/noraj USER=noraj SHELL=/bin/bash MAIL=/var/mail/noraj LOGNAME=noraj XDG_SESSION_ID=1 XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_VTNR=1
La réponse est « d6dd8e717833428bac595d565958fdf4 ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"d6dd8e717833428bac595d565958fdf4").hexdigest()+"}")
sigsegv{a64603f7b14cdd948ab9f065befc350854e0a25d}
Le flag est donc sigsegv{a64603f7b14cdd948ab9f065befc350854e0a25d}.
Question n°10
Quel est le PPID of qmgr process?
Pour répondre, il faut utiliser le plugin linux_pslist.
root@kali:/mnt/hgfs/Partage VM# volatility -f chall.raw --profile=LinuxOpenSUSE_4_12_14-lp151_28_32-default_profilex64 linux_pslist | grep 'qmgr\|Offset\|- -'
Volatility Foundation Volatility Framework 2.6
Offset Name Pid PPid Uid Gid DTB Start Time
------------------ -------------------- --------------- --------------- --------------- ------ ------------------ ----------
0xffff88000a6f2180 qmgr 1371 1368 51 51 0x000000000d35c000 2019-11-19 22:53:07 UTC+0000
La réponse est « d6dd8e717833428bac595d565958fdf4 ».
import hashlib
print("sigsegv{"+hashlib.sha1(b"1368").hexdigest()+"}")
sigsegv{570722b44ec7003126d686b70703051e72ff7408}
Le flag est donc sigsegv{570722b44ec7003126d686b70703051e72ff7408}.
petit erreur de réponse à la question 10 (qui est la réponse de la 9)
La réponse est « d6dd8e717833428bac595d565958fdf4 ». au lieu de 1368
jolie boulot en tout cas