1. include("compat.inc");
  2. if(description)
  3. {
  4. script_id(990678);
  5. script_version ("$Revision: 1.25 $");
  6. #script_osvdb_id(562);
  7. #script_cvs_date("$Date: 2013/01/25 01:19:07 $");
  8. script_name(english:"Apache /awstats Information Disclosure");
  9. script_set_attribute(attribute:"synopsis", value:
  10. "The remote web server discloses information about visitors to the host.." );
  11. script_set_attribute(attribute:"description", value:
  12. "It is possible to obtain details of the visitors to the Apache web server
  13. by requesting the URL '/awstats/'. This overview
  14. includes information such as visitor counts, and requested URLs." );
  15. script_set_attribute(attribute:"see_also", value:"http://awstats.sourceforge.net/docs/awstats_setup.html" );
  16. script_set_attribute(attribute:"solution", value:
  17. "Limit access to /awstats by enforcing IP restrictions or authentication." );
  18. script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
  19. #script_set_attribute(attribute:"plugin_publication_date", value: "2001/05/28");
  20. #script_set_attribute(attribute:"vuln_publication_date", value: "1999/01/01");
  21. script_set_attribute(attribute:"plugin_type", value:"remote");
  22. script_set_attribute(attribute:"cpe",value:"cpe:/a:apache:http_server");
  23. script_end_attributes();
  24. summary["english"] = "Requests /awstats/";
  25. script_summary(english:summary["english"]);
  26. script_category(ACT_GATHER_INFO);
  27. #script_copyright(english:"This script is Copyright (C) 2001-2013 StrongHoldNet");
  28. family["english"] = "Web Servers";
  29. script_family(english:family["english"]);
  30. script_dependencie("find_service1.nasl", "http_version.nasl");
  31. script_require_ports("Services/www", 80);
  32. script_require_keys("www/apache");
  33. exit(0);
  34. }
  35. #
  36. # The script code starts here
  37. #
  38. include("global_settings.inc");
  39. include("http_func.inc");
  40. include("http_keepalive.inc");
  41. port = get_http_port(default:80);
  42. str = "AWStats";
  43. if(get_port_state(port) )
  44. {
  45. buffer = http_get(item:"/awstats/", port:port);
  46. data = http_keepalive_send_recv(port:port, data:buffer);
  47. if( str >< data )
  48. {
  49. security_warning(port);
  50. }
  51. }