Exploit for windows platform in category dos / poc
{"id": "1337DAY-ID-18960", "type": "zdt", "bulletinFamily": "exploit", "title": "IE9 / SharePoint / Lync toStaticHTML HTML Sanitizing Bypass", "description": "Exploit for windows platform in category dos / poc", "published": "2012-07-11T00:00:00", "modified": "2012-07-11T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "cvss2": {}, "cvss3": {}, "href": "https://0day.today/exploit/description/18960", "reporter": "Adi Cohen", "references": [], "cvelist": [], "immutableFields": [], "lastseen": "2018-01-01T17:15:12", "viewCount": 6, "enchantments": {"score": {"value": -1.0, "vector": "NONE"}, "dependencies": {}, "backreferences": {"references": [{"type": "cve", "idList": ["CVE-2012-1858"]}]}, "exploitation": null, "vulnersScore": -1.0}, "sourceHref": "https://0day.today/exploit/18960", "sourceData": "toStaticHTML: The Second Encounter (CVE-2012-1858)\r\n\r\n*HTML Sanitizing Bypass -\r\n*CVE-2012-1858<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-1858>\r\n\r\nOriginal advisory -\r\nhttp://blog.watchfire.com/wfblog/2012/07/tostatichtml-the-second-encounter-cve-2012-1858-html-sanitizing-information-disclosure-introduction-t.html\r\n\r\nIntroduction\r\n\r\nThe *toStaticHTML* component, which is found in Internet Explorer > 8,\r\nSharePoint and Lync is used to sanitize HTML fragments from dynamic and\r\npotentially malicious content.\r\n\r\nIf an attacker is able to break the filtering mechanism and pass malicious\r\ncode through this function, he/she may be able to perform HTML injection\r\nbased attacks (i.e. XSS).\r\n\r\nIt has been a year since the first\r\nencounter<http://blog.watchfire.com/wfblog/2011/07/tostatichtml-html-sanitizing-bypass.html>\r\nwas\r\npublished, we've now returned with a new bypass method.\r\n\r\nVulnerability\r\n\r\nAn attacker is able to create a specially formed CSS that will overcome *\r\ntoStaticHTML*'s security logic; therefore, after passing the specially\r\ncrafted CSS string through the *toStaticHTML* function, it will contain an\r\nexpression that triggers a JavaScript call.\r\n\r\nThe following JavaScript code demonstrates the vulnerability:\r\n\r\n*<script>document.write(toStaticHTML(\"<style>\r\ndiv{font-family:rgb('0,0,0)'''}foo');color=expression(alert(1));{}\r\n</style><div>POC</div>\"))</script>*\r\n\r\nIn this case the function's return value would be JavaScript executable:\r\n\r\n*<style>\r\ndiv{font-family:rgb('0,0,0)''';}foo');color=expression(alert(1));{;}</style>\r\n<div>POC</div>*\r\n\r\n\r\n\r\nThe reason this code bypasses the filter engine is due to two reasons:\r\n\r\n 1. The filtering engine allows the string \"expression(\" to exists in\r\n \"non-dangerous\" locations within the CSS.\r\n 2. A bug in Internet Explorer's CSS parsing engine doesn't properly\r\n terminate strings that are opened inside brackets and closed outside of\r\n them.\r\n\r\nWhen combining these two factors the attacker is able to \"confuse\" the\r\nfiltering mechanism into \"thinking\" that a string is open when in fact it\r\nis terminated and vice versa. With this ability the attacker can trick the\r\nfiltering mechanism into entering a state of the selector context which is\r\nconsidered safer where in fact the code is just a new declaration of the\r\nsame selector, thus breaking the state machine and bypassing the filter.\r\n\r\n\r\n\r\nImpact\r\n\r\nEvery application that relies on the *toStaticHTML* component to sanitize\r\nuser supplied data had probably been vulnerable to XSS.\r\n\r\n\r\n\r\nRemediation\r\n\r\nMicrosoft has issued several updates to address this vulnerability.\r\n\r\nMS12-037 - http://technet.microsoft.com/en-us/security/bulletin/ms12-037\r\n\r\nMS12-039 - http://technet.microsoft.com/en-us/security/bulletin/ms12-039\r\n\r\nMS12-050 - http://technet.microsoft.com/en-us/security/bulletin/MS12-050\r\n\r\n\n\n# 0day.today [2018-01-01] #", "_state": {"dependencies": 1647589307, "score": 1659703426, "epss": 1678811959}}