{"href": "http://www.vulnerability-lab.com/get_content.php?id=1825", "sourceData": "Document Title:\r\n===============\r\nC & C++ for OS - Filter Bypass & Persistent Vulnerability\r\n\r\n\r\nReferences (Source):\r\n====================\r\nhttp://www.vulnerability-lab.com/get_content.php?id=1825\r\n\r\n\r\nRelease Date:\r\n=============\r\n2016-04-14\r\n\r\n\r\nVulnerability Laboratory ID (VL-ID):\r\n====================================\r\n1825\r\n\r\n\r\nCommon Vulnerability Scoring System:\r\n====================================\r\n4.2\r\n\r\n\r\nProduct & Service Introduction:\r\n===============================\r\nThis is an ios c app,you can learn,run,share c code. The software is a offline compiler for developers with apple iOS.\r\nCode templates,the contents of the new file is copy from contents of the template file.\r\n\r\n(Copy of the Homepage: https://itunes.apple.com/us/app/c-for-os-programming-language/id1016290003 )\r\n\r\n\r\nThis is an ios c/c++ app,you can learn,run,share c/c++ code. In(the built-in browser or the txt editor),Select the text to run.\r\nCode templates,the contents of the new file is copy from contents of the template file. \r\n\r\n(Copy of the Homepage: https://itunes.apple.com/us/app/c-c++-offline-compiler-for/id1016322367 )\r\n\r\n\r\nAbstract Advisory Information:\r\n==============================\r\nThe vulnerability laboratory core research team discovered an application-side validation vulnerability in the official C & C++ for OS web-application (api).\r\n\r\n\r\nVulnerability Disclosure Timeline:\r\n==================================\r\n2016-04-14: Public Disclosure (Vulnerability Laboratory)\r\n\r\n\r\nDiscovery Status:\r\n=================\r\nPublished\r\n\r\n\r\nAffected Product(s):\r\n====================\r\nXiaoWen Huang\r\nProduct: C for OS & C++ - Mobile API (Web-Application) 1.2\r\n\r\n\r\nExploitation Technique:\r\n=======================\r\nRemote\r\n\r\n\r\nSeverity Level:\r\n===============\r\nMedium\r\n\r\n\r\nTechnical Details & Description:\r\n================================\r\nA persistent input validation and mail encode web vulnerability has been discovered in the official C & C++ for OS web-application (api).\r\nThe persistent web vulnerability allows an attacker to inject malicious script codes on the application-side of the vulnerable modules context.\r\n\r\nThe basic validation of the code formular and mask allows to include any type of script codes or programming language without offensive input \r\nrestrictions. Attackers can inject code to a project to share it with another source. In the moment the code of the project is generated to as \r\nemail body, a persistent script code execution occurs.\r\n\r\nThere are two options to exploit, first is to send the malicious mail to the author of the program by the `Mail Author` function. Another possibility \r\nto execute code in the email body context is to share it with another code editor by email. In both email body message context the injected wrong \r\nfiltered script code execution occurs. The internal encoding of the formular is correctly done but in case of sharing by qr or via message body email \r\nthe execution occurs. The vulnerability is located on the application-side of the iOS application and the request method to inject requires physical \r\ndevice access or access to the share function. The bug is present in the C & C++ for OS 1.2 version of the mobile client. Attackers can for example \r\ngenerate a QR code with malicious context that is executed in the message body were the code is mainly displayed by the iOS application.\r\n\r\nThe security risk of the application-side vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 4.2. \r\nExploitation of the persistent vulnerability requires a low privileged ios device user account with restricted access and low user interaction. \r\nSuccessful exploitation of the vulnerabilities results in persistent phishing mails, session hijacking, persistent external redirect to malicious \r\nsources and application-side manipulation of affected or connected module context.\r\n\r\nVulnerable Module(s):\r\n\t\t\t\t[+] Share to Authors\r\n\t\t\t\t[+] Share by Email\r\n\t\t\t\t[+] Share via QR Code\r\n\r\nVulnerable Function(s):\r\n\t\t\t\t[+] Console\r\n\t\t\t\t[+] C or C++\r\n\r\n\r\nProof of Concept (PoC):\r\n=======================\r\nThe persistent vulnerability and mail encoding bug can be exploited by remote attackers with low privileged device user account and low user interaction.\r\nFor security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.\r\n\r\nManual steps to reproduce the vulnerability ...\r\n1. Install the perl app to your apple iOS device\r\n2. Start the mobile application\r\n3. Include to the first variable in the demo code java or html script code and save the entry as c or c++ script\r\n4. Open the saved entry again and click the top right arrow menu\r\n5. Now choose Create QR or Share menu button\r\n6. Open the menu `Mail to Author` or push the default `iOS Mail App` button\r\n7. Now the code of the formular gets transfered to the email message body context\r\nNote: The encoding does not parse or encode any inserted values\r\n8. The email arrives to the target inbox\r\n9. Open the email and the code executes directly in the message body or next to the generated qr code\r\n10. Successful reproduce of the filter and validation vulnerability in the c and c++ app api!\r\n\r\nNote: The bug can be exploited by sending to the author, by sending to another target mail or by transfer of a qr code.\r\n\r\n\r\nSolution - Fix & Patch:\r\n=======================\r\nThe vulnerability can be patched by a secure parse and encode of the vulnerable message body context.\r\nFilter and parse all code values that are included to the message body. Configure the code to plain text not html to prevent \r\nfurther persistent injection attacks. In case of emergency use the escape function to separate the mechanism permanently.\r\n\r\n\r\nSecurity Risk:\r\n==============\r\nThe security risk of the application-side mail encode web vulnerability in the mobile application api is estimated as medium. (CVSS 4.2)\r\n\r\n\r\nCredits & Authors:\r\n==================\r\nVulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com]\r\n\r\n\r\nDisclaimer & Information:\r\n=========================\r\nThe information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or implied, \r\nincluding the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any case of damage, \r\nincluding direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability-Lab or its suppliers have been advised \r\nof the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing \r\nlimitation may not apply. We do not approve or encourage anybody to break any licenses, policies, deface websites, hack into databases or trade with stolen data.\r\n\r\nDomains: www.vulnerability-lab.com \t\t- www.vuln-lab.com \t\t\t\t\t\t- www.evolution-sec.com\r\nContact: admin@vulnerability-lab.com \t- research@vulnerability-lab.com \t\t\t\t- admin@evolution-sec.com\r\nSection: magazine.vulnerability-lab.com \t- vulnerability-lab.com/contact.php \t\t\t\t- evolution-sec.com/contact\r\nSocial:\t twitter.com/vuln_lab\t\t- facebook.com/VulnerabilityLab \t\t\t\t- youtube.com/user/vulnerability0lab\r\nFeeds:\t vulnerability-lab.com/rss/rss.php \t- vulnerability-lab.com/rss/rss_upcoming.php \t\t\t- vulnerability-lab.com/rss/rss_news.php\r\nPrograms: vulnerability-lab.com/submit.php \t- vulnerability-lab.com/list-of-bug-bounty-programs.php \t- vulnerability-lab.com/register.php\r\n\r\nAny modified copy or reproduction, including partially usages, of this file requires authorization from Vulnerability Laboratory. Permission to electronically \r\nredistribute 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 \r\nits suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark of vulnerability-lab team & the specific \r\nauthors or managers. To record, list, modify, use or edit our material contact (admin@ or research@vulnerability-lab.com) to get a ask permission.\r\n\r\n\t\t\t\t Copyright \u00a9 2016 | Vulnerability Laboratory - [Evolution Security GmbH]\u2122\r\n\r\n\r\n\r\n", "bulletinFamily": "exploit", "modified": "2016-04-14T00:00:00", "title": "C & C++ for OS - Filter Bypass & Persistent Vulnerability", "cvss": {"vector": "NONE", "score": 0.0}, "cvelist": [], "description": "", "viewCount": 4, "published": "2016-04-14T00:00:00", "edition": 3, "id": "VULNERLAB:1825", "type": "vulnerlab", "lastseen": "2019-08-14T22:39:44", "reporter": "Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (bkm@evolution-sec.com) [www.vulnerability-lab.com]", "enchantments": {"dependencies": {"references": [], "modified": "2019-08-14T22:39:44", "rev": 2}, "score": {"value": -0.3, "vector": "NONE", "modified": "2019-08-14T22:39:44", "rev": 2}, "vulnersScore": -0.3}, "references": [], "scheme": null}