Hi All
lets play with admirer after namp i have foud 3 services :
i want to try access to ftp same time dir bruteforce in web
so anonymous acces not working in FTP
so brute force result was as follow :
Yes i found the file of credential so lets check :
Great lets see what i can find in the ftp server :
so let s download the two file and check what s inside :
let's verify those files to found more information :
also it s seems that their s another website under utility-scripts:
ok , Great i have noticed that all file are accessible but except db_admin.php
their's a todo in the buttom of the file so i think it s done:
i found this simple interface i don't if it will be usefull for me :
I have tried to use passwords for waldo for ssh acces not working in the same time
still brute forcing file and directory that i have found in the server so after some hour i have found :
yes adminer let's look what's this file :
it s seems a known framework to connect to database adminer v4.6.2 huuuum now i have to look for any known vulnerability in google
https://www.foregenix.com/blog/serious-vulnerability-discovered-in-adminer-tool
as they said that i can connect to my mysql instance and then use LOAD DATA LOCAL INFILE statement to read file from the system great let s read a little about this command to understand :
https://dev.mysql.com/doc/refman/8.0/en/load-data.html
OK, great . firstly i have to configure my mysql instance to be accessible from outside so i have made some change in mysql configuration file then connected to my instance, next i have created a test database :
then i created a test table with test columun where i m going to store the result
of LOAD DATA LOCAL INFILE
Great ,then i executed this sql command :
Great now it s simple let s look at content of this file :
Nice the waldo password found i m in the right path so ssh to the server bingo
i have user acces
user flag found :
so let s move to get root acces i used to begin this by running sudo -l :
Here we are dealing with a python script inside a script shell beside that we have this Setenv in the sudo result as a offensive noob i have no idea about that what it mean so i googled a lots to understand huuum it mean that you can set environment variable for the execution of this script
this script call this python script backup.py
I think we can have privilege escalation using python lib hijacking using PYTHONPATH while executing the script , so i can give it a custom lib shutil.py lib with my custom function make_archive that do another thing like doing a reverse shell to my call machine
a simple nc to my kali machine and same time i have already nc -nlvp 12340 in my kali
After number 6 that lunch the python script it s done root flaag in the hand I have learned à lots in this box in the same time i have to advance my knowledge in linux
See you next time for another box do not forget to submit a comment for me
Kind regards
Abdel