Advertisement
Guest User

Untitled

a guest
Dec 27th, 2016
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. ##############################################################################
  2. # OpenVAS Vulnerability Test
  3. # $Id: gb_loxone_default_login.nasl 4015 2016-09-09 05:53:53Z teissa $
  4. #
  5. # NETGEAR WNR2000v5 - Remote Code Execution Vulnerability
  6. #
  7. # Authors:
  8. # Tameem Eissa <tameem.eissa@greenbone.net>
  9. #
  10. # Copyright:
  11. # Copyright (c) 2016 Greenbone Networks GmbH
  12. #
  13. # This program is free software; you can redistribute it and/or
  14. # modify it under the terms of the GNU General Public License
  15. # as published by the Free Software Foundation; either version 2
  16. # of the License, or (at your option) any later version.
  17. #
  18. # This program is distributed in the hope that it will be useful,
  19. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. # GNU General Public License for more details.
  22. #
  23. # You should have received a copy of the GNU General Public License
  24. # along with this program; if not, write to the Free Software
  25. # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  26. ###############################################################################
  27.  
  28. CPE = 'cpe:/a:loxone:loxone';
  29.  
  30. if (description)
  31. {
  32. script_oid("1.3.6.1.4.1.25623.1.0.107045");
  33. script_version ("$Revision$");
  34. script_tag(name:"cvss_base", value:"7.5");
  35. script_tag(name:"cvss_base", value:"6.0");
  36. script_tag(name:"cvss_base_vector", value:"AV:N/AC:M/Au:S/C:P/I:P/A:P");
  37. script_tag(name: "impact" , value:" .");
  38. script_tag(name: "vuldetect" , value:"Try to login with default credentials admin:password");
  39. script_tag(name: "solution" , value:"Change the username and password");
  40. script_tag(name: "summary" , value:"The installation has default credentials set.");
  41. script_tag(name:"solution_type", value: "Workaround");
  42.  
  43. script_tag(name:"qod_type", value:"remote_active");
  44.  
  45. script_tag(name:"last_modification", value:"$Date: 2016-09-09 07:53:53 +0200 (Fri, 09 Sep 2016) $");
  46. script_tag(name:"creation_date", value:"2016-12-27 13:00:00 +0100 (Thu, 27 Dec 2016)");
  47. script_xref(name : "URL" , value : "https://www.exploit-db.com/exploits/40949/");
  48. script_category(ACT_ATTACK);
  49. script_family("Web application abuses");
  50. script_copyright("This script is Copyright (C) 2016 Greenbone Networks GmbH");
  51. script_dependencies("find_service.nasl", "http_version.nasl");
  52. script_require_ports("Services/www", 8080, 80);
  53. script_exclude_keys("Settings/disable_cgi_scanning");
  54. exit(0);
  55. }
  56.  
  57. include("http_func.inc");
  58. include("http_keepalive.inc");
  59. include("host_details.inc");
  60. include("misc_func.inc");
  61.  
  62.  
  63. ## Get HTTP Port
  64. netport = get_http_port(default:80);
  65. display("hello\n");
  66. username = "admin";
  67. password = "password";
  68.  
  69. banner = get_http_banner(port:netport);
  70.  
  71. if('Basic realm="NETGEAR' >!< banner){
  72. exit(0);
  73. }
  74.  
  75. credentials = base64(str: username + ":" + password);
  76. req = 'GET / HTTP/1.1\r\n' +
  77. 'Host: ' + get_host_name() + '\r\n' +
  78. 'Authorization: Basic ' + credentials + '\r\n' +
  79. '\r\n';
  80.  
  81. res = http_send_recv( port:netport, data:req, bodyonly:FALSE );
  82.  
  83.  
  84.  
  85. if ( res =~ "HTTP/1\.. 200" && 'Server: uhttpd/1.0.0' >< res )
  86. {
  87. report = "It was possible to login into Loxone web interface using username `admin` and password `password` ";
  88. security_message ( port: http_port, data: report);
  89. exit(0);
  90. }
  91.  
  92. exit( 0 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement