Forgotten
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 256 e9:51:db:ce:d7:b5:54:d4:76:26:d1:32:83:f3:89:8a (ECDSA)
|_ 256 03:ec:bc:3c:5c:c7:2b:46:8b:a6:f0:a7:f7:b0:58:b0 (ED25519)
80/tcp open http Apache httpd 2.4.56
|_http-title: 403 Forbidden
|_http-server-header: Apache/2.4.56 (Debian)Using gobuster:
There is a limesurvey installer on /survey

Now trying to install limesurey with our host as the database.
Editing /etc/mysql/mariadb.conf.d/50-server.cnf
so that it is available in all interfaces
To start mysql service:
Then connect to mysql:
Now we have created the database and completed the setup:
Now using this exploit: https://github.com/Y1LD1R1M-1337/Limesurvey-RCE/tree/main and changing config.xml so that the version matches we get a reverse shell: 
Now checking env variables:
We can use the password to switch to root and to login through ssh to limesvc user.
Now we can use: https://github.com/cdk-team/CDK
Now this is unusual af
Being root, and heading to the web path ==/var/www/html/survey== if we create a test file: hello.txt and then verify with the user limesvc that we are via SSH, in ==/opt/limesurvey==, is assembled the same website. And we see that the file created hello.txt is with ROOT permits:
So dropping a bash file with SUID: cp /bin/bash . chmod u+s ./bash Now executing it with ./bash -p 
Or use:
Last updated
Was this helpful?