Monday 4 July 2016

Apple and the 5 XSSes

Hello guys and welcome back,

On the 10th of March, 2016 I decided to start looking for Cross Site Scripting vulnerabilities in Apple's websites, I really can't remember what motives drove me to start looking for bugs there, but it was a good idea anyways.

I first started enumerating the targets as usual, found a big list of subdomains and started to look for XSS bugs on each of them.

Spending a couple of hours looking for XSSes and finding nothing at all, I started to notice that most of the subdomains need the users to be logged in first to start using them, so I created an Apple ID and started logging in each of the subdomains to have some deeper look into each of them.

The first XSS I found was a reflective XSS on the subdomain https://checkcoverage.apple.com, which is designed for users that want to check their Apple products' warranty status and whether they are eligible for support and extended coverage or not.

While surfing the subdomain I just mentioned, I found a GET parameter called "sn", which is -obviously- the placeholder of the serial number of the product the user wants to check, I started probing to see if the parameter's value gets reflected in the page, so I used a string as simple as <"xss' to check if any of those special characters gets removed or encoded. See the following screenshot:


The injected payload is reflected inside a <script> tag with no encoding or sanitization of the special characters at all, thus injecting "-alert(document.domain)-" was enough to trigger the following alert box:


The second XSS is a stored one and lies in the subdomain https://iadworkbench.apple.com/, this subdomain is for advertising purposes and business related stuff, where I found that the organization's name gets reflected inside a <script> tag without any sanitization.

Again, using "-alert(document.domain)-", I was able to come up with the following alert box:


The third XSS I found was on the subdomain https://appleid.apple.com, if you click on that link, you will find the message "Your account for everything Apple." written between two <h2> tags. Yes, this subdomain is there for users to manage their Apple IDs, which allows them to access everything they use, related to Apple.

I started missing around with the parameters I see, until I came across the GET parameter "key", which over and over again, gets reflected inside a <script> context without any cleansing, leaving one of Apple's most important online services vulnerable to one of the simplest, yet very devastating attacks. See the following screenshot:


This time, just to change the XSS vector, I decided to close the <script> tag prematurely and inject my own <script> tag, and I noticed that <script> and </script> were getting removed completely from the input, but </script/strukt> for example is not removed, so I tried to inject </script/x><script/x>alert(1)</script/x>, but the alert box didn't appear.

I found out that <script/x> was still removed, so I tried </script/x><scr<script>ipt>alert(1)</script/x> and this time it worked, showing that Apple was protecting one of their most important online services with one of the worst approaches ever.


The fourth XSS affects the subdomain http://mynews.apple.com, and honestly, this is one of the weirdest and easiest XSSes I have ever met.

Developers often do some mistakes, like getting parameter values and letting them into the page source with inappropriate handling first. But in this case, the case was pretty different, the developers were getting he value of the "locale" GET parameter, appending it to some URL, and then using it as the action attribute of a <form> on the page, nothing strange, right ?!

Actually no, the very bizarre thing here was that they were correctly encoding the " and < of the injected payload correctly, but they used the value of the action parameter unquoted. See the following screenshot for more understanding:

Breaking out of the action attribute then was a piece of cake, adding a %20 (space) after the value of the "locale" parameter and adding an event handler with a payload such as "onmouseover=alert(document.domain)" was all that is needed to do the job.


The fifth and last XSS in this series was found on the subdomain https://atlaslms.apple.com, this XSS was pretty straight forward, a GET parameter called "criteria" was being inserted as the value attribute of some hidden <input> tag and no sanitization at all was there, so I just injected the string "><svg onload=alert(document.domain)> to alert.





Conclusion:

While Apple may be doing a good job securing their OSs and devices, they fail big time when it comes to protecting their own online services, including those who are somewhat critical to users.
The other thing I'd like to mention is that Apple, being a tech giant, doesn't pay bounties to whitehats. Which, from my point of view, is the main reason why they're not well secured, as well as the reason why a blackhat was happy to get paid to hack into the iPhone the U.S government was trying to convince Apple to get them access to.

Finally, I would like to mention that, after more than 3 months of reporting the issues, some of the bugs are still reproducible at the time this post is released. Also, I was asked to provide my information on the 23rd of March to enter Apple's Hall of Fame for https://appleid.apple.com's XSS, yet my name still doesn't appear there.

Thanks for reading, see you in another post.

12 comments:

  1. Good work man !
    And nice write-up ! Continue this kind of articles, it's very interesting the manner that you find XSS. :)

    ReplyDelete
  2. It amazes me how shoddy the approach towards infosec is. Companies this big, such as Apple, Micrososft, banks, etc, shouldn't be so easily exploited!

    ReplyDelete
    Replies
    1. Correct, but securing stuff is not easy too.

      Delete
  3. You Explain It With A Great Way ^^ Good work And keep It Up For More Stuff And Articles Like That :)

    ReplyDelete
  4. I am very glad to get this information. I hope you will send me again... Thank you it is so helpfull. Get Free Music for iPhone and iTunes

    ReplyDelete
  5. Your content helped me a lot to take my doubts, amazing content, thank you very much for sharing.
    I want to share this site for netflix gift code hack

    ReplyDelete
  6. Thanks for sharing your thoughts. I truly appreciate your efforts and I will be waiting for your further post thank you once again. Nice article and pleasant arguments commented here, I am genuinely enjoying by these. And don't forgrt to give your valuable review on my work

    ReplyDelete
  7. 4 จุดเด่นของการเลือกล่นเกม สล็อต pussy888
    สำหรับผู้ที่ชื่อนถูกใจการเล่นเกมคาสิโนออนไลน์ และก็ดูเกมคสิโนออนไลน์ เกิดเรื่องไม่ดี ไม่สมควรที่จะเข้ามาเล่น จำต้องพูดว่า ในสำหรับบางบุคคลแล้ว การเล่นเกมคาสิโนออนไลน์สล็อต pussy888 บางทีก็อาจจะเป็นอีกหนึ่งตัวช่วย อีกหนึ่งหนทางสำหรับเพื่อการทำเงินที่สามารถจะช่วยให้ผู้เล่นเกม สามารถหาเงินเพิ่มให้กับครอบครัวตนเองให้มีชีวิตที่ดียิ่งขึ้นได้ โดยเหตุนั้นเพื่อไม่ให้กำเนิดปัญหาตามมา ผู้เล่นเกมก็เลยจึงควรเรียนรู้แนวทางการเล่นเกมคาสิโนออนไลน์ให้เข้าใน และก็เลือกเล่นเกมคาสิโนสล็อต pussy888 ที่เหมาะสมกับตนเอง ก็เลยจะช่วยเพิ่มจังหวะสำหรับในการทำเงินได้มากขึ้น และก็ถ้าหากคุณยงลังเลที่จะเข้ามาเล่นเกมคาสิโนออนไลน์ สามารถเข้ามามอง 4 จุดเด่นของดารเล่นเกมคาสิโนออนไลน์สล็อต pussy888 ที่พวกเราได้จัดเตรียมไว้ให้ท่านนี้ ค้ำประกันได้เลยว่า มันจะช่วยทำให้ลุกรตกลงใจเข้ามาเล่นกมคาสิโน สล็อต pussy888 ได้ง่ายมากยิ่งกว่าเดิม
    4 จุดเด่นที่คุณจำเป็นต้องทราบก่อนเข้ามาเล่นเกมสล็อต pussy888
    วันนี้พวกเราจะพาคุณไปดู 4 จุดเด่นของการเลือกเข้ามาเล่นเกมสล็อต pussy888 ซึ่งป็นหนึ่งในเกมคาสิโนออนไลน์ที่ได้รับความนิยม และก็เป็นที่ชอบใจ ของเหล่านักเล่นเกมอย่างยิ่ง ถ้าเกิดต้องการรูแล้วว่าจุดเด่นที่ว่านั้น เป็นอย่างไร ตามพวกเราไปดูกันได้เลย
    • เกมสล็อต pussy888 เป็นเกมคาสิโนออนไลน์ที่เล่นง่าย โดยเหตุนั้นถ้าเกิดระอุรไม่เคยเล่นเกมคาสิโนออนไลน์มาก่อน หรือยังไม่มีความรู้เกี่ยวกับเกมคาสิโนมาก่อนก็สามารถเล่นเกมสล็อต pussy888ได้ ไม่ต้องวิตกกังวล
    • คุณสามารถเลือกจ่ายเงินเกิมพันได้เองตามปรารถนา เพราะเหตุว่าเกม สล็อต pussy888 ไม่จำกัดเงินสำหรับในการวางเดิมพัน ทำให้ผู้เล่นเกมสามารถจำกัดวงเงินที่เอามาเล่นเกมคาสิโนออนไลน์นี้ได้
    • มีแนวทางสำหรับในการเล่นเกม สล็อต pussy888 หลายแบบอย่าง ซึ่งจะช่วยเพิ่มจังหวะสำหรับในการทำเงินให้กับผู้เล่นได้อย่างดีเยี่ยม ทำให้มีบุคคลที่พอใจเข้ามาเล่นเกมคาสิโนสล็อต pussy888เพิ่มขึ้นเรื่อยๆ
    • ผู้เล่นเกมได้โอกาสทำเงินได้ง่าย ด้วยระบบเกมที่ปรับปรุงขึ้น ทำให้ผู้เล่นเกมมีรายได้ แล้วก็ได้โอกาสที่จะถูกแจ็ตพอเพียงตเกมสล็อต pussy888มากยิ่งกว่าเดิม
    เพียงเท่านี้ มั่นใจว่าผู้คนจำนวนมากที่กำลังตกลงใจว่าจะเข้ามาเล่นเกมสล็อต pussy888ดีไหม ก็บางทีอาจจะตกลงใจแล้ว ซึ่งถ้าคุณตกลงใจที่จะเช้าตรู่มาทดลองเล่นเกมคาสิโนออนไลน์นี้มอง อย่าลืมที่จะระวัง และก็เลือกเล่นเกมสล็อต pussy888อย่างมีสติสัมปชัญญะ คิดอย่างละเอียดก่อนจะจ่ายเงินพนัน หรือเริ่มพนัน ศึกษาเล่าเรียนวิธีการเล่นเกมให้รู้เรื่อง รวมทั้งให้มากมายมากขึ้นเรื่อยๆ สรุปเป็น ผู้เล่นเกมควรต้องเรียนจัดแจงเล่นเกมคาสิโนออนไลน์ของตัวคุณเองให้ดีเยี่ยมที่สุด เพื่อความบรรลุเป้าหมายสำหรับในการเล่นปนคาสิโนออนไลน์ขอทุกคน
    pussy888

    ReplyDelete
  8. Entrance to pg slot Play PG SLOT 100% harmless online slot game at Always by your side for 1 day, easy to play, real money giveaway. each game to bet As many as you can, including a good reason. ทางเข้า pg slot

    ReplyDelete
  9. pg ยอดเยี่ยมเกมออนไลน์สล็อตบนมือถือแบบใหม่ปัจจุบันของโลกสมัครเล่น PG SLOT วันนี้ไม่มีเบื่อไม่ซ้ำซากในแบบการเล่นเดิมๆอีกต่อไปเป็นเกมสล็อตที่แจ๊คพอตแตกหลายครั้งที่สุดลองเลย

    ReplyDelete