{"id":838,"date":"2022-01-25T13:00:00","date_gmt":"2022-01-25T20:00:00","guid":{"rendered":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/?p=838"},"modified":"2022-01-23T15:31:41","modified_gmt":"2022-01-23T22:31:41","slug":"apple-we-have-standards-for-a-reason","status":"publish","type":"post","link":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/2022\/01\/25\/apple-we-have-standards-for-a-reason\/","title":{"rendered":"Apple, we have standards for a reason&#8230;"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/findlogovector.com\/wp-content\/uploads\/2018\/11\/webkit-logo-vector.png\" alt=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    So Apple, one of the largest corporations in the world, leaders in technology, full of some of the smartest people ever born, have been building software for decades. Obviously Apple knows about modern security protocols and Policies in their field, using them adequately whenever needed&#8230; right?<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    This was a bug discovered at the end of November last year by the developers of FingerprintJS, A library used to identify specific machines better then with cookies or local files. When the developers discovered this bug, they had reported it to Apples bug tracker. <\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Some of the Background Information<\/h2>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    The bug itself is relatively harmless, but due to how it has violated a standard in internet protocol, many issues have arisen because of it, some of them leading to you being able to be identified, even across different accounts. To talk about this bug, first we need to talk about Same-Origin Policy(SOP).<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    Websites, will use databases, usually implemented with IndexedDB (IDB), to store information on your computer, like preferences, details about what you did and other information. The information stored in these databases does not particularly matter for the bug, but the important thing is that any website can only see the databases that is in its tab. This means that if you have Facebook in one tab and Twitter in another, then they cannot see that there is another database, since they are in different frames.<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Now the issue&#8230;<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" data-src=\"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-content\/uploads\/sites\/115\/2022\/01\/dataleak.jpg\" alt=\"\" class=\"wp-image-852 lazyload\" width=\"790\" height=\"781\" data-srcset=\"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-content\/uploads\/sites\/115\/2022\/01\/dataleak.jpg 939w, https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-content\/uploads\/sites\/115\/2022\/01\/dataleak-300x296.jpg 300w, https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-content\/uploads\/sites\/115\/2022\/01\/dataleak-768x759.jpg 768w\" data-sizes=\"(max-width: 790px) 100vw, 790px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 790px; --smush-placeholder-aspect-ratio: 790\/781;\" \/><figcaption>Data Leak: Source: https:\/\/www.flickr.com\/photos\/111692634@N04\/15857168437\/<\/figcaption><\/figure>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    On Webkit 15, Apples browser engine, it stores data using an implementation of IDB. The people that found this bug put it quite well saying <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>&#8220;Every time a website interacts with a database, a new (empty) database with the same name is created in all other active frames, tabs, and windows within the same browser session.&#8221;<\/p><cite>FingerprintJS: https:\/\/fingerprintjs.com\/blog\/indexeddb-api-browser-vulnerability-safari-15\/<\/cite><\/blockquote>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Why was it designed this way?<\/h2>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">Now the question is why engineers at Apple made this decision? I am going to give some ideas on what thought processes may have lead to this, but do note that these are just theories, any of which are incredible unlikely to be accurate. These kinds of issues are not usually caused by one decision but a multitude of decisions and reasons.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The first, and less likely of the two options, is that when apple intends to initialize a database they put it in every frame with its name, but only populate the right frames database. This is a very simplistic explanation of why there are multiple instances of empty databases and only one filled.<\/li><li>The other, slightly more likely option, is that this was done intentionally as a security mechanism. By initializing an empty database sharing a name with a populated database in a different frame, should any origin attempt to modify another origins database, they will end up modifying the empty database instead, leaving the populated one unchanged.<\/li><\/ul>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">Now Onto the Problem With This<\/h2>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    The issue with this may not yet be apparent, what could the issue be a database as long as it&#8217;s empty. No data is being leaked. Well the issue come in with the name of the databases, especially when it comes to some of the biggest websites, like Google and YouTube.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    The way that some of the websites have named their databases, they contain, for the example of Google, the user&#8217;s Google ID. This is a number uniquely identified to every google account, now able to be seen by any website running on Webkit 15. This is bad as any website can check the name of the the databases in its tab using the function <a rel=\"noreferrer noopener\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/IDBFactory\/databases\" data-type=\"URL\" data-id=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/IDBFactory\/databases\" target=\"_blank\">IndexedDB.databases(<\/a>) which lists every database in it&#8217;s frame. <\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    The issue is now uncomfortably clear. Any website that regularly checks that name of IDB databases in it&#8217;s frame will see not only a complete list of other websites the user is currently looking at, but is some cases, the Google ID of users, allowing them to uniquely identify someone.<\/p>\n\n\n\n<h2 class=\"has-text-align-center wp-block-heading\">So, What&#8217;s happening now?<\/h2>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    Now this bug was reported at the end of November and recently Apple merged some proposed solution on the git page for their version of IDB, marking the bug as solved. However FingerprintJS has tested it and seen that this leak has not been fixed at all, while apple says it is working on a solution.  <\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    This bug in Webkit 15 shows why it is vital to keep up with standard practices, and to follow them, because when services have assumed this standard is in place, ignoring it can cause huge issues for both the sevice and the user.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">    If you have an IOS Device or a Mac with Safari 15 on it, they have made a demo for you to try the details of this bug and see it&#8217;s effects: <a rel=\"noreferrer noopener\" href=\"https:\/\/safarileaks.com\" data-type=\"URL\" data-id=\"https:\/\/safarileaks.com\" target=\"_blank\">Demo<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References:<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/fingerprintjs.com\/blog\/indexeddb-api-browser-vulnerability-safari-15\/\">https:\/\/fingerprintjs.com\/blog\/indexeddb-api-browser-vulnerability-safari-15\/<\/a><\/li><li><a href=\"https:\/\/www.macworld.com\/article\/605562\/safari-15-bug-expose-browsing-activity-personal-data.html\">https:\/\/www.macworld.com\/article\/605562\/safari-15-bug-expose-browsing-activity-personal-data.html<\/a><\/li><li><a href=\"https:\/\/nakedsecurity.sophos.com\/2022\/01\/18\/serious-security-apple-safari-leaks-private-data-via-database-api-what-you-need-to-know\/\">https:\/\/nakedsecurity.sophos.com\/2022\/01\/18\/serious-security-apple-safari-leaks-private-data-via-database-api-what-you-need-to-know\/<\/a><\/li><li><a href=\"https:\/\/portswigger.net\/daily-swig\/same-origin-violation-vulnerability-in-safari-15-could-leak-a-users-website-history-and-identity\">https:\/\/portswigger.net\/daily-swig\/same-origin-violation-vulnerability-in-safari-15-could-leak-a-users-website-history-and-identity<\/a><\/li><li><a href=\"https:\/\/safarileaks.com\">https:\/\/safarileaks.com <\/a><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So Apple, one of the largest corporations in the world, leaders in technology, full of some of the smartest people ever born, have been building software for decades. Obviously Apple knows about modern security protocols and Policies in their field, using them adequately whenever needed&#8230; right? This was a bug discovered at the end of &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/2022\/01\/25\/apple-we-have-standards-for-a-reason\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Apple, we have standards for a reason&#8230;&#8221;<\/span><\/a><\/p>\n","protected":false},"author":367,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-838","post","type-post","status-publish","format-standard","hentry","category-cpsc-329-602-w22","entry"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Tyson Hartley","author_link":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/author\/tyson-hartley\/"},"_links":{"self":[{"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/posts\/838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/users\/367"}],"replies":[{"embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/comments?post=838"}],"version-history":[{"count":4,"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/posts\/838\/revisions"}],"predecessor-version":[{"id":854,"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/posts\/838\/revisions\/854"}],"wp:attachment":[{"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/media?parent=838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/categories?post=838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpsites.ucalgary.ca\/isec-601-f21\/wp-json\/wp\/v2\/tags?post=838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}