Lucene search
K

PBLGuestbook132.txt

🗓️ 09 Jul 2006 00:00:00Reported by PaisteristType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 29 Views

PBL Guestbook v1.32 and lower - XSS & SQL Querys Vulnerabilitie

Code
`/*  
--------------------------------------------------------  
[N]eo [S]ecurity [T]eam [NST]? - Advisory #23 - 07/07/06  
--------------------------------------------------------  
Program: PBL Guestbook  
Homepage: www.pixelatedbylev.com  
Vulnerable Versions: 1.32 and lower.  
Risk: High!  
Impact: Critical Risk  
  
-==PBL Guestbook <= 1.32 XSS & SQL Querys Vulnerabilities==-  
---------------------------------------------------------  
  
- Description  
---------------------------------------------------------  
PBL Guestbook fully functional guestbook loaded with tons of features and packed for premium optimization and performance.  
  
- Tested  
---------------------------------------------------------  
PBL Homepage & other sites  
  
- Explotation  
---------------------------------------------------------  
  
1)  
  
Vulnerable code:  
  
  
==[ pblguestbook.php 164-183 ]==========================  
[...]  
if ($id){  
foreach ($_POST as $name => $value)  
{  
$_POST["$name"] = str_replace("\n","<BR>",$value);  
}  
foreach ($_POST as $name => $value)  
{  
$_POST["$name"] = str_replace("\t","",$value);  
}  
foreach ($_POST as $name => $value)  
{  
$_POST["$name"] = str_replace("\r","",$value);  
}  
foreach ($_POST as $name => $value)  
{  
$_POST["$name"] = str_replace('|',"¦",$value);  
}  
foreach ($_POST as $name => $value)  
{  
$_POST["$name"] = preg_replace("/\<SCRIPT(.*?)\>(.*?)\<\/SCRIPT(.*?)\>/i", "SCRIPT BLOCKED", $value);  
}  
[...]   
==[ end pblguestbook.php ]==========================  
  
How we can see the script only do some replaces. Only the <script> tag is filtered, but we can include javascript code with   
other tags.  
  
Here you have some values for the name, message, website and e-mail.  
  
PoC:  
---------------------------------------------------------  
  
value: <a onMouseOver="javascript: location.href='http://google.com';" href="#"><h1>TOUCH ME</h1></a>  
value: <iframe src="http://somesite.com"></iframe>   
  
2)  
  
The PBL Guestbook don't use MySQL databases to save the admin info, so it's no very useful give many importance. However, p.e.  
in the next code there's no simple quotes filtering ('). The used variables are the same that we saw in the pasted code:  
  
==[ pblguestbook.php 220-224 ]==========================  
[...]  
$query = "INSERT INTO `pblguestbook_posts` (`name`,`email`,`ip`,`time`,`website`,`customq1`,`customq2`,";  
$query .= "`customq3`,`customq4`,`customq5`,`rate`,`comments`,`private`,`app`) VALUES('$_POST[name]',";  
$query .= "'$_POST[email]','$_SERVER[REMOTE_ADDR]','$time','$_POST[website]',";  
$query .= "'$conqd1','$conqd2','$conqd3','$conqd4','$conqd5',";  
$query .= "'$_POST[rate]','$_POST[comments]','$_POST[private]','$appmode')"  
[...]  
==[ end pblguestbook.php ]==========================  
  
If magic_quotes_gpc is off, just add one simple quote at the final of the name, email, web or message and you'll see that the  
script can add the post because there was a problem with the sql query.  
  
- How to fix it? More information?  
--------------------------------------------------------  
Visit our forum to know how to fix it or to get more information.  
http://www.neosecurityteam.net/foro/  
  
- References  
--------------------------------------------------------  
http://www.neosecurityteam.net/index.php?action=advisories&id=23  
  
- Credits  
--------------------------------------------------------  
Discovered by Paisterist -> paisterist.nst [at] gmail [dot] com  
  
[N]eo [S]ecurity [T]eam [NST] - http://www.neosecurityteam.net/  
  
  
- Greets  
--------------------------------------------------------  
HaCkZaTaN  
K4P0  
Daemon21  
Link  
LINUX  
m0rpheus  
  
Argentina, Colombia, Chile, Bolivia, Uruguay EXISTS!!  
  
@@@@'''@@@@'@@@@@@@@@'@@@@@@@@@@@  
'@@@@@''@@'@@@''''''''@@''@@@''@@  
'@@'@@@@@@''@@@@@@ @@@'''''@@@  
'@@'''@@@@'''''''''@@@''''@@@  
@@@@''''@@'@@@@@@@@@@''''@@@@@  
  
/* EOF */  
`

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

09 Jul 2006 00:00Current
7.4High risk
Vulners AI Score7.4
29