# Check all open TCP sudo rustscan 10.10.11.47 -r 1-65535 --ulimit 5000 # Nmap scan with script on open TCP port sudo nmap 10.10.11.47 -sCV -Pn -sT -p 22,80 # Nmap scan vulnerability sudo nmap -sT -p 22,80 --script=vuln -O -Pn 10.10.11.47 # Nmap scan with UDP port sudo nmap -sU --top-ports 20 -Pn 10.10.11.47
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 256 3e:f8:b9:68:c8:eb:57:0f:cb:0b:47:b9:86:50:83:eb (ECDSA) |_ 256 a2:ea:6e:e1:b6:d7:e7:c5:86:69:ce:ba:05:9e:38:13 (ED25519) 80/tcp open http Apache httpd |_http-title: Did not follow redirect to http://linkvortex.htb/ |_http-server-header: Apache Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Inside the git file, found a number of user credentials.
From the author we know it is using the admin as username. Inside the js file found a number of password.
Arbitrary File Read
Interesting information of Ghost CMS is using v5.58.0. Based on the OSINT findings, Ghost ≤ 5.59.0 having the Arbitrary file read vulnerability. Site administrators can check for exploitation of this issue by looking for unknown symlinks within Ghost’s content/ folder
if [ -z $CHECK_CONTENT ];then CHECK_CONTENT=false fi
LINK=$1
if ! [[ "$LINK" =~ \.png$ ]]; then /usr/bin/echo "! First argument must be a png file !" exit 2 fi
if /usr/bin/sudo /usr/bin/test -L $LINK;then LINK_NAME=$(/usr/bin/basename $LINK) LINK_TARGET=$(/usr/bin/readlink $LINK) if /usr/bin/echo "$LINK_TARGET" | /usr/bin/grep -Eq '(etc|root)';then /usr/bin/echo "! Trying to read critical files, removing link [ $LINK ] !" /usr/bin/unlink $LINK else /usr/bin/echo "Link found [ $LINK ] , moving it to quarantine" /usr/bin/mv $LINK$QUAR_DIR/ if$CHECK_CONTENT;then /usr/bin/echo "Content:" /usr/bin/cat $QUAR_DIR/$LINK_NAME 2>/dev/null fi fi fi
The script /opt/ghost/clean_symlink.sh contains a potential vulnerability through the environment variable CHECK_CONTENT, which controls whether cat is executed on a quarantined file.