Cockpit - OffSec PG Walkthrough
Machine Summary: Cockpit demonstrates how a SQLi vulnerability and insecure credential storage can allow an attacker to move laterally into the system, gaining user-level write access and exploiting weak SSH security to obtain a fully interactive shell. As the compromised user, a sudo backup command containing a wildcard injection vulnerability can then be found and exploited, leading to full root access. Recon Nmap Scan Results PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 3072 98:4e:5d:e1:e6:97:29:6f:d9:e0:d4:82:a8:f6:4f:3f (RSA) | 256 57:23:57:1f:fd:77:06:be:25:66:61:14:6d:ae:5e:98 (ECDSA) |_ 256 c7:9b:aa:d5:a6:33:35:91:34:1e:ef:cf:61:a8:30:1c (ED25519) 80/tcp open http Apache httpd 2.4.41 ((Ubuntu)) |_http-server-header: Apache/2.4.41 (Ubuntu) |_http-title: blaze 9090/tcp open http Cockpit web service 198 - 220 |_http-title: Did not follow redirect to https://192.168.210.10:9090/ Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel HTTP Port 9090 HTTP on port 9090 leads to a Cockpit administration page for the web service. No immediate vulnerabilities can be found, so we’ll move on for now. ...