MyScript Memo 3.0 Persistent Script Insertion
Posted on 12 February 2016
Document Title: =============== MyScript Memo v3.0 iOS - (Mail) Persistent Vulnerability References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1706 Release Date: ============= 2016-02-10 Vulnerability Laboratory ID (VL-ID): ==================================== 1706 Common Vulnerability Scoring System: ==================================== 3.6 Product & Service Introduction: =============================== With MyScript Memo, take your notes on the go using your handwriting and convert them to digital text that you can export and share with Evernote®, Facebook®, Twitter®, Gmail or copy/paste to any other text application. MyScript Memo is available in 63 recognition languages (including Chinese, Korean, Japanese, Arabic, Russian, English, Spanish, French and many more). (Copy of the Homepage: https://itunes.apple.com/us/app/myscript-memo/id446368116 ) Abstract Advisory Information: ============================== The Vulnerability Laboratory Core Research Team discovered a persistent mail encoding web vulnerability in the official MyScript Memo iOS mobile web-application. Vulnerability Disclosure Timeline: ================================== 2016-02-10: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== MyScript Product: MyScript Memo - iOS (Web-Application) 3.0.0.363 Exploitation Technique: ======================= Remote Severity Level: =============== Medium Technical Details & Description: ================================ A persistent mail encoding and file extension validation vulnerability has been discovered in the official MyScript Memo v3.0.0 iOS mobile web-application. The vulnerability allows an remote attacker or local privileged user account to inject own malicious script codes to the application-side of the affected modules. The issue is located in the notes-filename and document text context of the export module. Local low privileged web-application user accounts are able to inject own malicious persistent script codes to the mail body context of the `share` function. Attacker can manipulate the notes files as extension or the main document context to send malicious mails with persistent injected script codes. The request method to inject is POST and the attack vector of the issue is located on the application-side of the iOS mobile web-application. The security risk of the application-side input web vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.6. Exploitation of the persistent web vulnerability requires a low privileged ios device account with restricted access and low or medium user interaction. Successful exploitation of the vulnerability results in persistent phishing mails, session hijacking, persistent external redirect to malicious sources and application-side manipulation of affected or connected module context. Vulnerable Module(s) [+] Export Vulnerable File(s) [+] *.notes Affected Module(s) [+] Email Proof of Concept (PoC): ======================= The vulnerability can be exploited by remote attackers and local low privileged user accounts with low or medium user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability ... 1. Install the mobile web-application 2. Start the mobile web-application 3. Add a new `Notizen` item via (+) 4. Use now a payload (script codes) as notiz name 5. Save the entry and open the document 6. Write with your finger a script code payload in the document and save it 7. Click (top|left) the export function 8. Use the function `As MyScript-File` 9. Now click the email button Note: The file generates a notes file with the malicious payload for import/export. It also uses the file input payload of the document. 10. Successful reproduce of the persistent mail encoding web vulnerability and notes file validation issue! PoC: Source <html> <head> <title>memo script app ios</title> <link rel="important stylesheet" href="chrome://messagebody/skin/messageBody.css"> </head> <body><table border=0 cellspacing=0 cellpadding=0 width="100%" class="header-part1"><tr><td><b>Betreff: </b>memo script app ios</td></tr> <tr><td><b>Von: </b>Benjamin Mejri Kunz <vulnlabstars@icloud.com></td></tr><tr><td><b>Datum: </b>31.01.2016 14:08</td></tr></table> <table border=0 cellspacing=0 cellpadding=0 width="100%" class="header-part2"><tr><td><b>An: </b>bkm@evolution-sec.com</td></tr></table><br> <div class="moz-text-plain"><pre wrap> Angehängt: ">"<[PERSISTENT INJECTED SCRIPT CODE VIA MEMO!] </pre></div><BR><FIELDSET CLASS="mimeAttachmentHeader"></FIELDSET><BR/><div class="moz-text-plain"><pre wrap> Von meinem iPad gesendet</pre></div></body> </html> PoC: poc.notes v3.0 VO_INK_DOCUMENT 1180 ÃÂÂ’ 3 «Wq€ šüX·QÃ2† ÃA˜ÅÂÂ’ÃÂÂŒÅÂÂ’##fI´•]Ã¥qN~wWU¾ÃŠ± ˆÃÂÂŒ†!ÅÂÂ’F#6Ñ2l™2bF&fDi“$Å¡M„a m(CÃÂ…î… ’<µahWyÃÂÂ’rÅ“«H,®Ã®¡Ã‹B 0€«Wr€ šüÊ¢vY”‘2m$FC(ã s»¢—5‚٠€J€«Wr€ šüfÃÂÂ…8ìÈÿþ,Cçp‚Å S++颢8-ž &Â`5«Ws€ šü FQ‹2©Ã¢”(§8§r•Ã¯Ã²I$Ä ÆÂÂ’a„‚“$]„c1b™"dÙ2hˆÄa„!ÃÂΘHxÈðXpg]Õ-[Z8 Ã(B„ ÃÂϕ™Ã–ÔµR¾!îBÀ ˆ«Wt šüê5ELÈ C' üÚœQ„qŽBÈêì‚jBçMó‚[ ›¡‚êìºÃ›@€«Wu šü Ô2c™'·1ÃÂÂŽ Æ#ªøTѬüT!8«Wu€ šü–ô–Ve 8pà PPãŽw‹'–I3ÃÂÂŒC„bh¤–;BÅ“Y‡(hà ¢ÃÂÂ…Å $P‘'Å“ AÆšYd÷µŠJ«Ã€@aØf„ç™Ã¤!jÚ4´Ã«ÅÂÂ’BÃÂ’Õ1 qÈ @«Wv šü+ NlÃÂÂŒ,Â8Y†KV• æžIw3_´Ã”M†× ¬/«Wv€ šü6¾¡Ve±Ã„AVwTeeDDB(ÆÂÂ’r;¦ÃšYÇ4ÃÅÂÂ’,–¹iQ[.T™Ã¿ÃÂÂœÃÂÂŽ„(µ¼„ä÷iÂSr‘Ç– : *«Ww šü<ZQ«2ڶ¼KÃÂÂ,ÃÂ’Ú¿˜Å C(ã…æuVDDD!Ž(ÃÂÂ9™Ã™Ã–…1äI§Å“ AÆ–÷-A7Û.U•{›Ã‡Ã‹iÂDQZP5;¦§Ã£yò¹ÃÂÂ…gªK¬+[ÃÂÂ…Yj Yd ѵÑ•o$±¥ À«Wx šüü®P³2éLs†#«+¹ ¢ ‚†r²¢#fâ10Â!Ž!HUTDNÃÂÂŒL4ñ"Ä ,¦-H&ø™Ã²Ã«Ã¶p¢Ã‹iç AOXéóåßm[ÃÂŽâŠ$ÃEˆq¤1I0<ÃÂÂc*%§Â½Ã‹ —ÃÃÃÂÂ…’ä0ÃÂÂS¸N–£4ÃÂÂŽB8j˜†JW?¶T²@0€«Wx€ šüÃÂÂ’£Ã¦f(ðAK-ÉAv]t©vÛ_©§»Ã–`‘B†„ÅÂÂ’<âZnˆ…¯Ã–÷’{S10pÀ` `ÆÂÂ’ QNrYY @¤Å¡ÃÂÂŒO˜~W ÃÂÂÃ¥pÆ=„þr¾ÃÂ’õ l«Wy€ šü=,&f) kÞiEòˆ!伂æ©)_)ºD™räÈ“UÃÂÂŽ9ï ³8ñad÷9ÃÂÂŽbÕ%Ži%”YµÃ‰BÀPwýÆÂÂ’:Å“yQ+âô,ÃÂÂ’UVì¯[ÞRÄÃÂψ LÀ VO_DOCUMENT 317 <Document version="1.0"><DateCreated>2016-01-31T14:06:40</DateCreated><DateModified>2016-01-31T14:06:59</DateModified><Height>263.200012</Height><Width>210.000000</Width><PredefinePaper>horizontalLinePaper</PredefinePaper><LinePatternUnit>13.210000</LinePatternUnit><PrimaryLanguage>en_US</PrimaryLanguage></Document> D938BA68-4505-47CB-BFEE-DADC1E5ED150 79 <Page version="1.0"><PredefinePaper>horizontalLinePaper</PredefinePaper></Page> VO_DOCUMENT_STRUCTURE 128 <Document version="1.0"><Pages><Page id="D938BA68-4505-47CB-BFEE-DADC1E5ED150"><PageItems></PageItems></Page></Pages></Document> Solution - Fix & Patch: ======================= The vulnerability can be patched by a secure parse and encode of the filename variable and the document input text context. Restrict the input and disallow special chars. Encode the mail context input next to the attachment. Disallow note files with specialchars to prevent a malicious import/export. Filter the filename validation to approve for malicious context and to prevent further script code injection attacks. Security Risk: ============== The security risk of the persistent mail encoding web vulnerability in the notes file extension and mail is estimated as medium. (CVSS 3.6) Credits & Authors: ================== Vulnerability Laboratory [Research Team] - Benjamin Kunz Mejri (research@vulnerability-lab.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: magazine.vulnerability-db.com - vulnerability-lab.com/contact.php - evolution-sec.com/contact 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 Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register/ 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 © 2016 | Vulnerability Laboratory - [Evolution Security GmbH]™ -- VULNERABILITY LABORATORY - RESEARCH TEAM SERVICE: www.vulnerability-lab.com CONTACT: research@vulnerability-lab.com