############################################################################# # # IceBB Avatar SQL Injection and PHP Code Execution Vulnerability # # Copyright: OS2A and it's member companies # # Date Written: 2007/03/28 # # $Revision: 1.1 $ # # $Log: os2a_icebb_sql_inj_and_code_exec_603159.nasl,v $ # Revision 1.1 2007/03/29 13:08:56 shraddha # To Production Issue #3905 # # # Revision 1.1 2007/03/28 08:05:52 schandan # ------------------------------------------------------------------------ # This program was written by OS2A and/or it's member companies and is # licensed under the GNU GPL license. Please see below for details. This # header contains information regarding licensing terms under the GPL, and # information regarding obtaining source code from the Author. Consequently, # pursuant to section 3(c) of the GPL, you must accompany the information # found in this header with any distribution you make of this Program. # ------------------------------------------------------------------------ ############################################################################## if(description) { script_id(603159); script_bugtraq_id(23151, 23158); script_copyright(english:"Copyright (C) 2007 OS2A"); script_version("$Revision: 1.1 $"); script_category(ACT_GATHER_INFO); script_family(english:"CGI abuses"); script_name(english:"IceBB Avatar SQL Injection and PHP Code Execution Vulnerability"); script_summary(english:"Check for vulnerable version of IceBB"); desc["english"] = " Overview : This host has IceBB installed, which is prone to SQL Injection and PHP code execution vulnerabilities. These issues are due to, - avatar upload function does not properly verify the file type of uploaded avatars. - filename of uploaded avatars is not properly sanitized before being used in SQL queries. Impact : Successful exploitation leads to execution of arbitrary PHP code and manipulation of SQL queries by injecting SQL code. Affected Software : IceBB version 1.0-rc5 and prior. Affected Platform : Any system running the affected software. Solution : No vendor supplied patch/solution is available as on 28 March 2007. Information regarding this issue will be updated once the solution details are available. For updates refer, http://icebb.net/ References : http://www.frsirt.com/english/advisories/2007/1116 CVSS Score : CVSS Base Score : 7.0 (AV:R/AC:L/Au:NR/C:P/I:P/A:P/B:N) CVSS Temporal Score : 6.3 Risk factor : Medium"; script_description(english:desc["english"]); script_dependencies("http_version.nasl"); script_require_ports("Services/www", 80); exit(0); } include("http_func.inc"); include("http_keepalive.inc"); port = get_http_port(default:80); if(!port){ exit(0); } foreach dir (make_list("/icebb", cgi_dirs())) { sndReq = http_get(item:string(dir, "/index.php"), port:port); rcvRes = http_keepalive_send_recv(port:port,data:sndReq, bodyonly:1); if(rcvRes == NULL){ exit(0); } if(egrep(pattern:"Powered by.*IceBB", string:rcvRes)) { if(egrep(pattern:"IceBB.* (0\..*|1\.0-rc5)[^.0-9]", string:rcvRes)){ security_hole(port); } exit(0); } }