Document Title: =============== My PDF Creator & DE DM v1.4 iOS - Multiple Vulnerabilities References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1201 Release Date: ============= 2014-02-16 Vulnerability Laboratory ID (VL-ID): ==================================== 1201 Common Vulnerability Scoring System: ==================================== 7.3 Product & Service Introduction: =============================== My PDF Doc is the all-in-one document management solution for iPhone, iPod touch and iPad. It can catch documents from PC or Mac via USB cable or WIFI, email attachments, Dropbox and box and save it on your iPhone, iPod Touch or iPad locally. Cool app that allow you to create PDF from Map, Website and any other text files. My PDF Doc supports PDF, MS Office, iWorks and the most common file types. (Copy of the Vendor Homepage: https://itunes.apple.com/us/app/my-pdf-creator-document-editor/id725481535 ) Abstract Advisory Information: ============================== The Vulnerability Laboratory Research Team discovered multiple web vulnerabilities in the official My PDF Creator & Document Editor (Document Manager) v1.4 iOS mobile web-application. Vulnerability Disclosure Timeline: ================================== 2014-02-16: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Apple AppStore Product: My PDF Creator & Document Editor (Document Manager) - iOS 1.4 Exploitation Technique: ======================= Remote Severity Level: =============== High Technical Details & Description: ================================ 1.1 A local file include- and an arbitrary file upload vulnerability has been discovered in the official My PDF Creator & Document Editor (Document Manager) v1.4 iOS mobile web-application. The local file include web vulnerability allows remote attackers to unauthorized include local file/path requests or system specific path commands to compromise the web-application/device. The vulnerability is located in the upload file > submit module of the mobile web-application interface. Remote attackers can manipulate the `upload > submit` POST method request with the vulnerable `filename` value to compromise the application or connected device components. The issue allows remote attackers to include local app path values or wifi web-server files. The exploitation appears on the application-side and the inject request method is POST. The exection occurs in the main index file dir list or in the selected sub category folder/path. The security risk of the local file include web vulnerability is estimated as high(+) with a cvss (common vulnerability scoring system) count of 7.3(+)|(-)7.4. Exploitation of the vulnerability requires no user interaction or privileged mobile application user account. Successful exploitation of the file include web vulnerability results in mobile application compromise, connected device compromise or web-server compromise. Request Method(s): [+] POST Vulnerable Module(s): [+] Upload File Vulnerable Procedure(s): [+] Submit Vulnerable Parameter(s): [+] filename Affected Module(s): [+] File Dir Index Listing (http://localhost:50496) [+] Sub Category (Path) Listing (http://localhost:50496/.xpath) 1.2 An arbitrary file upload web vulnerability has been discovered in the official My PDF Creator & Document Editor (Document Manager) v1.4 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. As result the attacker is mostly able to execute the uploaded malicious file. The vulnerability is located in the upload file module with the submit procedure. Remote attackers are able to upload a php or js web-shells by a rename of 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 `image.jpg.gif.js.php.jpg`. After the upload the attacker needs to open the file in the web application. He deletes the .jpg & . gif file extension and can access the application with elevated access rights. The security risk of the arbitrary file upload web vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 6.7(-). Exploitation of the arbitrary file upload web vulnerability requires no user interaction or privileged mobile 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): [+] Upload File Vulnerable Parameter(s): [+] filename (multiple extensions) Affected Module(s): [+] File Dir Index Listing (http://localhost:50496) [+] Sub Category (Path) Listing (http://localhost:50496/.xpath) Proof of Concept (PoC): ======================= 1.1 The arbitrary file upload web vulnerability can be exploited by remote attackers without user interaction or privileged mobile application user account. For security demonstration or to reproduce the vulnerability follow the information and steps below. PoC: File Dir Index Listing - filename <div id="module_main">​​​​​<h2>Wi-Fi File Transfer</h2> <hr><div class="files"><bq>Files</bq> <p><a href="..">..</a><br> </p><a href="TESTER23.jpg">TESTER23</a> ( 23.8 Kb, 2014-02-15 13:45:00 +0000)<br> <a href="<[LOCAL FILE INCLUDE VULNERABILITY!]>"><[LOCAL FILE INCLUDE VULNERABILITY!]"></a> ( 23.8 Kb, 2014-02-15 13:45:46 +0000)<br /> </p><form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> <label>upload file<input type="file" name="file" id="file" /></label><label><input type="submit" name="button" id="button" value="Submit" /></label></form> <hr></div></div></div></center></body></html></iframe>​​​​​</a></div></div> PoC URL: http://localhost:50496/Box/[LOCAL FILE!] --- PoC Session Logs [POST] --- Status: 200[OK] POST http://localhost:50496/Box/ Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Größe des Inhalts[6660] Mime Type[application/x-unknown-content-type] Request Header: Host[localhost:50496] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.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:50496/Box/] Connection[keep-alive] POST-Daten: POST_DATA[-----------------------------102971529617546 Content-Disposition: form-data; name="file"; filename="./[LOCAL FILE INCLUDE VULNERABILITY!]" Content-Type: image/jpeg 1.2 The arbitrary file upload web vulnerability can be exploited by remote attackers without user interaction or privileged mobile application user account. For security demonstration or to reproduce the vulnerability follow the information and steps below. PoC: File Dir Index Listing - filename (multiple extensions) <div id="module_main">​​​​​<h2>Wi-Fi File Transfer</h2> <hr><div class="files"><bq>Files</bq> <p><a href="..">..</a><br> </p><a href="TESTER23.jpg">TESTER23</a> ( 23.8 Kb, 2014-02-15 13:45:00 +0000)<br> <a href="<%20image[ARBITRARY FILE UPLOAD VULNERABILITY!].jpg.gif.js.php.jpg>"><%20image[ARBITRARY FILE UPLOAD VULNERABILITY!].jpg.gif.js.php.jpg"></a> ( 23.8 Kb, 2014-02-15 13:45:46 +0000)<br /> </p><form action="" method="post" enctype="multipart/form-data" name="form1" id="form1"> <label>upload file<input type="file" name="file" id="file" /></label><label><input type="submit" name="button" id="button" value="Submit" /></label></form> <hr></div></div></div></center></body></html></iframe>​​​​​</a></div></div> PoC URL: http://localhost:50496/Box/%20image[ARBITRARY FILE UPLOAD VULNERABILITY!].jpg.gif.js.php --- PoC Session Logs [POST] --- Status: 200[OK] POST http://localhost:50496/Box/ Load Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Größe des Inhalts[6660] Mime Type[application/x-unknown-content-type] Request Header: Host[localhost:50496] User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.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:50496/Box/] Connection[keep-alive] POST-Daten: POST_DATA[-----------------------------102971529617546 Content-Disposition: form-data; name="file"; filename="%20image[ARBITRARY FILE UPLOAD VULNERABILITY!].jpg.gif.js.php.jpg" Content-Type: image/jpeg Solution - Fix & Patch: ======================= 1.1 The vulnerability can be patched by a secure encode and parse of the vulnerable filename value in the upload file post submit method request. Encode also the vulnerable filename value in the file dir index output list to prevent future lfi attacks. 1.2 Setup a file filter mechanism and restrict the filename input in the vulnerable upload POST method request. Reconfigure the uplaod file access right to prevent future arbitrary file uplaod with unauthorized executable access. Security Risk: ============== 1.1 The security risk of the local file include web vulnerability is estimated as high. 1.2 The security risk of the arbitrary file upload web vulnerability is estimated as high(-). Credits & Authors: ================== Vulnerability Laboratory [Research Team] - Katharin S. L. (CH) (research@xxxxxxxxxxxxxxxxxxxxx) [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@xxxxxxxxxxxxxxxxxxxxx - research@xxxxxxxxxxxxxxxxxxxxx - admin@xxxxxxxxxxxxxxxxx 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@xxxxxxxxxxxxxxxxxxxxx or research@xxxxxxxxxxxxxxxxxxxxx) to get a permission. Copyright © 2014 | Vulnerability Laboratory [Evolution Security] -- VULNERABILITY LABORATORY RESEARCH TEAM DOMAIN: www.vulnerability-lab.com CONTACT: research@xxxxxxxxxxxxxxxxxxxxx