⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netscaler_web_cookie_crypto.nasl

📁 漏洞扫描源码,可以扫描linux,windows,交换机路由器
💻 NASL
字号:
# netscaler_web_cookie_crypto.nasl# GPLv2## History:## 1.00, 11/21/07# - Initial release# kst-depend-rpc    desc["english"]="Synopsis :The remote web server is prone to an information disclosure attack. Description :The version of the Citrix NetScaler web management interface on theremote host uses weak encryption for protecting the HTTP cookiecontent by XORing sensitive values, including the username andpassword, with a fixed key stream. See also :http://www.securityfocus.com/archive/1/484182/100/0/threadedSolution :Do not stay logged into the NetScaler web management interface whilebrowsing other web sites.Risk factor : Medium / CVSS Base Score : 4.3(CVSS2#AV:N/AC:M/Au:N/C:P/I:N/A:N)";if (description)    {    script_id(80022);    script_version("$Revision: 1.2 $");    name["english"]="NetScaler web management cookie cipher weakness";    summary["english"]="Tests NetScaler web management cookie encryption";    family["english"]="Web Servers";    script_name(english:name["english"]);    script_description(english:desc["english"]);    script_summary(english:summary["english"]);    script_family(english:family["english"]);    script_category(ACT_GATHER_INFO);    script_cve_id("CVE-2007-6192");    script_copyright(english:"This script is Copyright (c) 2007 nnposter");    script_dependencies("netscaler_web_login.nasl");    script_require_keys("www/netscaler","http/password");    script_require_ports("Services/www",80);    exit(0);    }if (!get_kb_item("www/netscaler")) exit(0);if (!get_kb_item("http/password")) exit(0);include("misc_func.inc");include("url_func.inc");include("http_func.inc");function cookie_decode (cookie,parm){local_var match;match=eregmatch(string:cookie,pattern:' '+parm+'=([^; \r\n]*)',icase:TRUE);if (isnull(match)) return NULL;return base64_decode(str:urldecode(estr:match[1])-'\n');}function str_xor (){local_var nargs,result,len,arg1,arg2,i,j;nargs=max_index(_FCT_ANON_ARGS);if (nargs==0) return NULL;result=_FCT_ANON_ARGS[0];len=strlen(result);for (i=1; i<nargs; ++i)    {    arg1=result;    arg2=_FCT_ANON_ARGS[i];    if (len!=strlen(arg2)) return NULL;    result="";    for (j=0; j<len; ++j) result+=raw_string(ord(arg1[j])^ord(arg2[j]));    }return result;}function strleft (){return substr(_FCT_ANON_ARGS[0],0,_FCT_ANON_ARGS[1]-1);}port=get_http_port(default:80);if (!get_kb_item("www/netscaler/"+port)) exit(0);cookie=get_kb_item("/tmp/http/auth/"+port);if (!cookie) exit(0);hostname=get_host_name();if (!hostname) hostname=get_host_ip();keystream=str_xor(hostname,cookie_decode(cookie:cookie,parm:"ns3"));if (!keystream || strlen(keystream)==0) exit(0);ns2=cookie_decode(cookie:cookie,parm:"ns2");ns2len=strlen(ns2);keylen=strlen(keystream);if (ns2len<keylen) len=ns2len;else len=keylen;guess=str_xor(strleft(ns2,len),strleft(keystream,len));if (!guess || strlen(guess)==0) exit(0);if (strleft(get_kb_item("http/password"),len)!=guess) exit(0);report = string(    desc["english"],    "\n\n",    "Plugin output :\n",    "\n",    "Sensitive values, including the username and password, can be\n",    "decrypted by XORing the plaintext with the following fixed key\n",    "stream :\n",    "\n",    hexstr(keystream), "...");security_warning(port:port,data:report);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -