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

📄 mssql_ping.nasl

📁 漏洞扫描源码,可以扫描linux,windows,交换机路由器
💻 NASL
字号:
 desc["english"] = "Synopsis :It is possible to determine remote SQL server versionDescription :Microsoft SQL server has a function wherein remote users canquery the database server for the version that is being run.The query takes place over the same UDP port which handles themapping of multiple SQL server instances on the same machine.CAVEAT: It is important to note that, after Version 8.00.194,Microsoft decided not to update this function.  This means thatthe data returned by the SQL ping is inaccurate for newer releasesof SQL Server.Solution :filter incoming traffic to this portRisk factor :None / CVSS Base Score : 0 (AV:R/AC:L/Au:NR/C:N/A:N/I:N/B:N)";if(description){ script_id(10674); script_version ("$Revision: 118 $"); name["english"] = "Microsoft's SQL UDP Info Query"; script_name(english:name["english"]);  script_description(english:desc["english"]);  summary["english"] = "Microsoft's SQL UDP Info Query"; script_summary(english:summary["english"]);  script_category(ACT_GATHER_INFO);  script_copyright(english:"This script is Copyright (C) 2001 H D Moore"); family["english"] = "Windows"; script_family(english:family["english"]); exit(0);}## The script code starts here#### data returned will look like:##   xServerName;REDEMPTION;InstanceName;MSSQLSERVER;IsClustered;No;Version;8.00.194;tcp;1433;np;\\REDEMPTION\pipe\sql\query;;#### this magic info request packetreq = raw_string(0x02);if(!get_udp_port_state(1434))exit(0);soc = open_sock_udp(1434);if(soc){	send(socket:soc, data:req);	r  = recv(socket:soc, length:4096);	close(soc);	if(!r)exit(0);	set_kb_item(name:"MSSQL/UDP/Ping", value:TRUE);        r = strstr(r, "Server");        r = str_replace(find:";", replace:" ", string:r);	if(r)	{ 		report += string("OpenVAS sent an MS SQL 'ping' request. The results were : \n", r, "\n\n");                report += string("If you are not running multiple instances of Microsoft SQL Server\n");                report += string("on the same machine, It is suggested you filter incoming traffic to this port");		 report = string (desc["english"],				"\n\nPlugin output :\n\n",				report);		security_note(port:1434, protocol:"udp", data:report);		set_kb_item(name:"mssql/udp/1434", value:TRUE);	}}

⌨️ 快捷键说明

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