Lazy Admin
Room Covers:
Service Discovery
Finding Vulnerabilities
Exploitation
Privilege Escalation
Target Details
IP: 10.10.209.190
Service Discovery
Using nmap
nmap -sV -sC -Pn -oN nmap.txt 10.10.209.190Services Discovered
ServicePortVersionSSH
22
OpenSSH 7.2p2
HTTP
80
Apache httpd 2.4.18
Finding Directories on HTTP server using GoBuster
gobuster dir -u http://10.10.209.190/ -w /usr/share/wordlists/SecLists/Discovery/Web-Content/directory-list-2.3-small.txt -t 40 --no-error -o web-dirs.txtDirectories Discovered:
/contentOn visiting /content page, the server's using Basic CMS with Sweet Rice installed
Finding Vulnerabilities
From 1st vulnerability, after visting
/content/inc/mysql_backup/link we get SQL database file, from where we get username and password hash, which can be easily cracked online using various tools such as crackstationusernamepassword hashpasswordmanager
42f749ade7f9e195bf475f37a44cafcb
Passwordxxx
we don't know login page yet!
Moving to parent directory
/content/inc/, we get access to all the files , from where we get Sweet Rice version/content/inc/lastest.txtwhich is 1.5.1On Searching for
Sweet Rice 1.5.1 vulnerabilitieson Search Engine, it leads to File UploadOn reading the exploit, we get the admin page link as
/asbut admin page is different which is/content/asVisit
/content/aswith the admin credentials aboveWe can add custom php code from ADS tab
TL;DR;
ServiceVulnerability
Exploitation
Create an evil reverse shell adversitement
Using PentestMonkey php reverse shell template, we can get access to shell, by chaning
ipvariable to our attacker's vpn ip, and then uploadStart listener using netcat
From
content/inc/ads/we can execute the uploaded reverse shellWe have access to the shell
We can run perl and /home/itguy/backup.pl as root
Privilege Escalation
Finding Escalation Vectors
We can run perl and /home/itguy/backup.pl as root
Victim's shell
Root Shell on Attacker's machine
Get Flags
User Flag
Root Flag
Last updated
Was this helpful?