OSCP PREPROTİONS – HTB Cronos

Cronos machine is a vulnerable machine with Linux operating system among retired machines. It is expected to obtain user and root flags using these vulnerabilities.
We perform a network scan with nmap to recognize the target machine.
Classic Scan

Full Port Scan

As a result of network scanning, 22/tcp ssh OpenSSH 7.2p2, 53/tcp domain ISC BIND, 80/tcp http Apache httpd ports are open.
Because of the http port, when we look at the relevant ip address from the browser, we see default apache. In the source code, we could not find any information from developer mode and wepanalayzer. Since there may be hidden files and directories, we performed a file directory scan with gobuster.
Gobuster scan

Gobuster scan resulted in no valuable information.
With dns port 53 open, let’s run a dns scan.

We have detected Domain and Subdomain. We wrote the information in /etc/hosts file.
Let’s log in to these subdomains
The admin.cronos.htb subdomain is attractive because the admin login screen comes up.

We tried to log in with default passwords and did not get successful results. We tried Sql injection. We were able to log in successfully.

We can run traceroute and ping commands. And we can use

We made sure that it works this way, let’s try to intervene with burpsuite and see if we can create a revershell for ourselves.
We’ve got our dll here.

In this way we obtained our user flag. But we did not access the root directory because we do not have root authorization. We provide local enumeration to obtain root authorization.
When we look at the crontab saved as scheduled tasks, we see /var/www/laravel/artisan crotnab in php language.

What draws our attention here is that the www-data user can also make changes to this file. Now we will look at what happens if we take php revershell and replace it with this crontab place.
We get the pentestmpnkey php revershell and forward it to the target machine after editing the ip and port.
We replace the php revershell we transmitted with /var/www/laravel/artisan.

This is how we got our shelter
We got our root flag here in this shelle root authorization.

Comments

  1. Pingback: OSCP Prep – HTB all Linux Machine – Muhammed AYGÜN

  2. DanielVoite

    ivermectin nz ivermectin 0.08% or <a href=" http://www.kansai-sheet.jp/cgi-local/contact_check.cgi?name=Trevorhox&tantou=&mail=trevoridest%40ivermectin.store&mail2=trevoridest%40ivermectin.store&comment=+Its+such+as+you+learn+my+thoughts%21+You+appear+to+know+so+much+approximately+this%2C+such+as+you+wrote+the+ebook+in+it+or+something.+I+feel+that+you+just+can+do+with+a+few+%25+to+pressure+the+message+house+a+little+bit%2C+but+instead+of+that%2C+this+is+fantastic+blog.+A+fantastic+read.+I+will+definitely+be+back.+buy+cialis+online+%0D%0A+%0D%0Acutting+a+cialis+pill+in+half+cialis+generic+dur%84Ce+d%27effet+cialis+cialis+generic+cialis+reflusso+%0D%0A+%0D%0Ayoung+men+take+viagra+viagra+uk+viagra+cost+compare+viagra+tesco+which+is+best+viagra+livetra+cialis+%0D%0A+%0D%0Acanadian+online+pharmacy+canadian+pharmacies+that+ship+to+us+online+canadian+discount+pharmacy+canada+online+pharmacies+online+pharmacy+reviews&submit=m%81hF%20 “>ivermectin 1mg
    http://www.mejtoft.se/research/?page=redirect&link=http://ivermectin.store ivermectin 3mg for lice
    ivermectin 6 mg tablets ivermectin over the counter canada and ivermectin virus ivermectin 4000 mcg