A lot have been talks about IOS 9, and now looks like Apple included an ad-blocking feature in its OS, I would say it is a great news for its customers, but for the developers of applications like Adblock it could become a nightmare.
“The new Safari release brings Content Blocking Safari Extensions to iOS. Content Blocking gives your extensions a fast and efficient way to block cookies, images, resources, pop-ups, and other content.” States Apple.
The content blocking doesn’t came natively, users will need to install a blocking software that interacts with Safari (via JSON),
“Your app extension is responsible for supplying a JSON file to Safari. The JSON consists of an array of rules (triggers and actions) for blocking specified content. Safari converts the JSON to bytecode, which it applies efficiently to all resource loads without leaking information about the user’s browsing back to the app extension. Xcode includes a Content Blocker App Extension template that contains code to send your JSON file to Safari. Just edit the JSON file in the template to provide your own triggers and actions. The sample JSON file below contains triggers and actions that block images on webkit.org”
But why such feature can kill applications like AdBlock?
“In short, either this new API will improve Adblock Plus performance on Safari or it will force us to rely upon an inferior blocking format that would essentially kill adblocking on Safari.” States Sebastian Noack from AdBlock.
“So far very little is known about Content Blocking Extensions, available in Safari 9 and iOS 9. However, according to the announcements there are so called “block lists”, which are JSON files, that can be registered by the extension.”
“This mechanism is entirely different from the one used by Adblock Plus on any other platform (including current versions of Safari), where we can run arbitrary code on request, blocking requests depending on their URL and context.”
“With this new mechanism, we’d need to convert Adblock Plus filter lists to a block list like the one above. However, most of our filters aren’t as simple as the example above. So, we are nervously awaiting how powerful their block lists will be, most importantly when it comes to matching the document domain and request type, as well as regular expression matching of URLs and recursive exception rules.”
In this phase developers can only wait for Apple information on iOS 9 and its content-blocker working mode, either will help them to improve their adblocking software.
About the Author Elsio Pinto
Edited by Pierluigi Paganini
(Security Affairs – AdBlock, iOS 9)