Websites use third-party ads and tracking services to deliver targeted ads
and collect information about users that visit them. These services put users'
privacy at risk, and that is why users' demand for blocking these services is
growing. Most of the blocking solutions rely on crowd-sourced filter lists
manually maintained by a large community of users. In this work, we seek to
simplify the update of these filter lists by combining different websites
through a large-scale graph connecting all resource requests made over a large
set of sites. The features of this graph are extracted and used to train a
machine learning algorithm with the aim of detecting ads and tracking
resources. As our approach combines different information sources, it is more
robust toward evasion techniques that use obfuscation or changing the usage
patterns. We evaluate our work over the Alexa top-10K websites and find its
accuracy to be 96.1% biased and 90.9% unbiased with high precision and recall.
It can also block new ads and tracking services, which would necessitate being
blocked by further crowd-sourced existing filter lists. Moreover, the approach
followed in this paper sheds light on the ecosystem of third-party tracking and
advertising.