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 299 300 301 302 |
Document Title: =============== Vanctech File Commander 1.1 iOS - Multiple Vulnerabilities References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1235 Release Date: ============= 2014-03-28 Vulnerability Laboratory ID (VL-ID): ==================================== 1235 Common Vulnerability Scoring System: ==================================== 7.3 Product & Service Introduction: =============================== This is an app which can change the way you use your iphone/itouch. With this app , when you try to read a document or listen to music or even you want to watch some video,You don<code>t have to change the apps round by round.You can deal with them in one app with simple operation. And we can even provide the wifi share, you can share the files whatever you like with you friends or your PC/MAC. And of course you can send the files in your PC/MAC to your iphone/itouch. You can enjoy your files without change pages anywhere anytime you want. (Copy of the Homepage: https://itunes.apple.com/de/app/file-commander/id484450911 ) Abstract Advisory Information: ============================== The Vulnerability Laboratory Research Team discovered multiple high severity vulnerabilities in the official Vanctech File Commander v1.1 iOS mobile web-application. Vulnerability Disclosure Timeline: ================================== 2014-03-28: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Shanghai Fan Cheng Software Ltd Product: File Commander - iOS Mobile Web Application 1.1 Exploitation Technique: ======================= Remote Severity Level: =============== High Technical Details & Description: ================================ 1.1 A local file include web vulnerability has been discoveredin the official Vanctech File Commander v1.1 iOS mobile web-application. A file include web vulnerability allows remote attackers to unauthorized include local file/path requests or system specific path commands to compromise the web-application or mobile device. The web vulnerability is located in the </code>filename<code> value of the </code>upload<code> module POST methdo request. Remote attackers are able to inject own files with a malicious </code>filename<code> value in the upload POST method request to compromise the mobile web-application. The attack vector is on the application-side and the request method to inject is POST. The local file/path include execution occcurs in the index file commander dir listing. The security risk of the local file include web vulnerability is estimated as high(+) with a cvss (common vulnerability scoring system) count of 7.4(+)|(-)7.5. Exploitation of the local file include web vulnerability requires no user interaction or a privileged mobile web-application user account. Successful exploitation of the local file include web vulnerability results in mobile application or connected device component compromise. Request Method(s): [+] [POST] Vulnerable Module(s): [+] Select File > Upload Vulnerable Parameter(s): [+] filename Affected Module(s): [+] Index File Dir List (http://localhost:8080/) 1.2 An arbitrary file upload web vulnerability has been discoveredin the official Vanctech File Commander v1.1 iOS mobile web-application. The arbitrary file upload issue allows remote attackers to upload files with multiple extensions to bypass the web-server or system validation. The vulnerability is located in the </code>select file<code> function of the upload resource module. Remote attackers are able to upload a php or js web-shells by renaming the file with multiple extensions to bypass the file restriction mechanism. The attacker uploads for example a web-shell with the following name and extension </code>ptest.png.html.php.js.aspx.png<code>. After the upload the attacker needs to open the file with the path value in the web application. He deletes the .png file extension and can access the application with elevated executable access rights. The attack vector is on the application-side of the vulnerable wifi interface service and the request method is POST. To access the file the attacker needs to request the public </code>./Download` path. There are two ways to include local files. The first is to sync with a local user account at the affected device with the vulnerable software. The second possibility is to access the wifi interface and upload (remote) the files in the local or public network. The security risk of the arbitrary file upload web vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 7.1(+)|(-)7.2. Exploitation of the arbitrary file upload web vulnerability requires no user interaction or privileged application user account with password. Successful exploitation of the vulnerability results in unauthorized file access because of a compromise after the upload of web-shells. Request Method(s): [+] [POST] Vulnerable Module(s): [+] Select File > Upload Vulnerable Parameter(s): [+] filename (multiple extensions) Affected Module(s): [+] Downloads File Dir (http://localhost:8080/files?x) Proof of Concept (PoC): ======================= 1.1 The local file include web vulnerability can be exploited by local attackers without privileged web-application user account or user interaction. For security demonstration or to reproduce the local web vulnerability follow the provided information and steps below to continue. PoC: http://localhost:8080/files?./[LOCAL FILE INCLUDE VULNERABILITY!] http://localhost:8080/files/[UPLOAD PATH VALUE]/[LOCAL FILE INCLUDE VULNERABILITY!] --- PoC Session Logs [POST] --- 12:01:20.676[96ms][total 96ms] Status: 302[Found] POST http://localhost:8080/files Load Flags[LOAD_DOCUMENT_URILOAD_INITIAL_DOCUMENT_URI] Gr��e des Inhalts[67] Mime Type[text/html] Request Header: Host[localhost:8080] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Accept-Language[de-de,de;q=0.8,en-us;q=0.5,en;q=0.3] Accept-Encoding[gzip, deflate] Referer[http://localhost:8080/] Connection[keep-alive] POST-Daten: POST_DATA[-----------------------------245932080324620 Content-Disposition: form-data; name="newfile"; filename="2.png" Content-Type: image/png Source:File Management - Index <table style="background-image: url('border-1.png');" border="0" cellpadding="0" cellspacing="0"> <tbody><tr><td height="1" width="5"> </td><td> </td><td width="5"> </td></tr> <tr><td> </td><td align="center"> <table style="background-image: url('bg-1.png');" border="0" cellpadding="0" cellspacing="0" width="100%"> <thead> <tr><th>Name</th><th>Size</th><th>Date Modified</th></tr> </thead> <tbody id="filelist">./[LOCAL FILE INCLUDE VULNERABILITY VIA FILENAME VALUE!]; </tbody> </table></td><td> </td></tr> <tr><td height="1"> </td><td> </td><td> </td></tr> </tbody></table> <table style="border-top:1px solid #ccc;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr><td height="20" align="center">Powered by Vanctech</td></tr></tbody></table></div> PoC: Vulnerable Fil�e Item List JScript <script type="text/javascript" charset="utf-8"> var now = new Date(); $.getJSON("/files?"+ now.toString(), function(data){ var shadow = false; $.each(data, function(i,item){ var trclass=''; if (shadow) trclass= " class='shadow'"; encodeName = encodeURI(item.name).replace("'", "'"); $("<tr" + trclass + "><td><a href='https://www.exploit-db.com/files/" + encodeName + "' class='file'>" + item.name + "</a></td> <td>" + item.size + "</td><td>" + item.modDate + "</td></tr>").appendTo("#filelist"); shadow = !shadow; }); }); </script> Reference(s): http://localhost:8080/files/ 1.2 The arbitrary file upload web vulnerability can be exploited by remote attackers without privileged application user account or user interaction. For security demonstration or to reproduce the local web vulnerability follow the provided information and steps below to continue. PoC: Upload Path (Download) http://localhost:8080/Download/test.jpg.html.php.asp.html.jpg http://localhost:8080/Download/[ARBITRARY FILE UPLOAD VULNERABILITY!] --- PoC Session Logs [POST] --- 12:02:44.901[543ms][total 543ms] Status: 302[Found] POST http://localhost:8080/files Load Flags[LOAD_DOCUMENT_URILOAD_INITIAL_DOCUMENT_URI] Gr��e des Inhalts[67] Mime Type[text/html] Request Header: Host[localhost:8080] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0] Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] Accept-Language[de-de,de;q=0.8,en-us;q=0.5,en;q=0.3] Accept-Encoding[gzip, deflate] Referer[http://localhost:8080/] Connection[keep-alive] POST-Daten: POST_DATA[-----------------------------36532693528160 Content-Disposition: form-data; name="newfile"; filename="test.jpg.html.php.asp.html.jpg[ARBITRARY FILE UPLOAD VULNERABILITY!]" Content-Type: image/jpeg Source: File Management - Downloads <table style="background-image: url('border-1.png');" border="0" cellpadding="0" cellspacing="0"> <tbody><tr><td height="1" width="5"> </td><td> </td><td width="5"> </td></tr> <tr><td> </td><td align="center"> <table style="background-image: url('bg-1.png');" border="0" cellpadding="0" cellspacing="0" width="100%"> <thead> <tr><th>Name</th><th>Size</th><th>Date Modified</th></tr> </thead> <tbody id="filelist"> [ARBITRARY FILE UPLOAD VULNERABILITY!]</tbody> </table></td><td> </td></tr> <tr><td height="1"> </td><td> </td><td> </td></tr> </tbody></table> <table style="border-top:1px solid #ccc;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr><td height="20" align="center">Powered by Vanctech</td></tr></tbody></table></div> Reference(s): http://localhost:8080/Download/ Solution - Fix & Patch: ======================= 1.1 The local file include web vulnerability can be patched by a secure parse and encode of the vulnerable filename value in the upload file POST method request. Filter and encode also the filename output in the index js item script to prevent injection or code execution attacks in the name context listing. 1.2 Filter and restrict the file name validation on uploads to prevent arbitrary file upload attacks. Implement a secure own exception-handling to restrict and disallow files with multiple extensions. Reset the executable rights for html and php codes in the little web-server settings config for /files. Security Risk: ============== 1.1 The security risk of the local file include web vulnerability in the file commander interface is estimated as high. 1.2 The security risk of the arbitrary file upload web vulnerability in the file commander interface is estimated as high(+). Credits & Authors: ================== Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com] Disclaimer & Information: ========================= The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability- Lab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any vendor licenses, policies, deface websites, hack into databases or trade with fraud/stolen material. Domains:www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com Contact:admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com Section:www.vulnerability-lab.com/dev - forum.vulnerability-db.com - magazine.vulnerability-db.com Social: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php Any modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by Vulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact (admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission. Copyright � 2014 | Vulnerability Laboratory [Evolution Security] -- VULNERABILITY LABORATORY RESEARCH TEAM DOMAIN: www.vulnerability-lab.com CONTACT: research@vulnerability-lab.com |