PG Zino

21  | FTP | vsftpd 3.0.3 | DDoS No Vulns, No Login
22  | SSH | OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
139 | SMB | Samba smbd 3.X - 4.X | Connected
445 | SMB | Samba smbd 4.9.5-Debian | Connected
3306 | MySQL | Cannot Connect
8003 | Web | Booked Scheduler 2.7.5 RCE

Visit /zino on SAMBA. The misc.log file will reveal the username and password for the Booked site.

I was stuck with the manual exploit because I still did not know port 80/443 was an issue. Metasploit would have worked fine if reverse shell was set on port 21.

Linpeas immediately finds the priv esc. The root user is running /var/www/html/booked/cleanup.py every 3 minutes. The www-data user can edit that file.

Struggles

I got killed by the port blocking again. My usual plan failed. If port 443 fails, I go to 80. 80 Failed. I had a php GET[cmd] shell on the box. I tried spawning different shells with no luck. Even wget and curl wouldn't retrieve files. NOTE: If you do a wget -v or wget --version, it is THERE, and it is NOT working, YOU HAVE A FIREWALL ISSUE, NOT A CODE ISSUE. TRY port 21, 22, (mirror the service on the box) especially if that service (ftp, ssh) is running on the target box. Looking at iptables after obtaining root, ports 21, 22, 3306, 8003, and the SAMBA ports would have worked.

Lessons Learned

  1. My way of handling connection issues updated.
  2. Accidentally remembered sqsh is the program for mysql!
  3. Add %20 for space if using Burp Suite on a PHP[cmd] shell.

Comments

Popular posts from this blog

HTB - Jarvis MySQL

Palo Alto for GNS3 CCDC Tutorial

Trace Labs Global Missing Persons CTF V