Definitely block requests to facebook from 3rd-party sites

Discussions about the Application Boundaries Enforcer (ABE) module
0xa3

Definitely block requests to facebook from 3rd-party sites

Post by 0xa3 »

The sample configuration on http://noscript.net/abe/ provides the following configuration to block requests to facebook from third-party sites:

Code: Select all

# This one allows Facebook scripts and objects to be included only
# from Facebook pages
Site .facebook.com .fbcdn.net
Accept from .facebook.com .fbcdn.net
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)
However, this still allows the inclusion of "Like" Buttons etc. and therefore also leads to critical privace leakage.

Changing the ruleset to

Code: Select all

# This one block all requests to Facebook 
# from third-party sites
Site .facebook.com .fbcdn.net
Accept from .facebook.com .fbcdn.net
Deny ALL
blocks these requests as well.

If anyone knows further URLs used by Facebook please post them to this thread.
Mozilla/5.0 (Windows NT 6.1; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Definitely block requests to facebook from 3rd-party sit

Post by Giorgio Maone »

0xa3 wrote: Changing the ruleset to

Code: Select all

# This one block all requests to Facebook 
# from third-party sites
Site .facebook.com .fbcdn.net
Accept from .facebook.com .fbcdn.net
Deny ALL
blocks these requests as well.
But it prevents you from following Facebook links in other pages.
Better this one:

Code: Select all

# This one block all the embedded requests to Facebook 
# from third-party sites
Site .facebook.com .fbcdn.net
Accept from .facebook.com .fbcdn.net
Deny INCLUSION
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
0xa3
Posts: 2
Joined: Thu Mar 10, 2011 10:45 am

Re: Definitely block requests to facebook from 3rd-party sit

Post by 0xa3 »

Thanks for your reply. However, I noticed that certain requests aren't blocked when using Deny INCLUSION.

Unfortunately, I don't understand enough about the feature to understand why this is so, but you might want to have a look at the following sample URL:

http://support.microsoft.com/kb/288792

When using Deny ALL, NoScript blocks a GET request to facebook, when using Deny INCLUSION, the same request is not blocked.

I haven't checked how the request to facebook is implemented in detail (from JavaScript?), but the GET request that gets issued certainly could cause privacy leakage, which I would like to prevent.
Mozilla/5.0 (Windows NT 6.1; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Definitely block requests to facebook from 3rd-party sit

Post by Giorgio Maone »

They're apparently using also facebook.net now.
Just add it to the rule and no request will pass.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
0xa3
Posts: 2
Joined: Thu Mar 10, 2011 10:45 am

Re: Definitely block requests to facebook from 3rd-party sit

Post by 0xa3 »

Thanks again. Seems it was even working before. I checked with Fiddler to see that there is no request sent to facebook with neither configuration.

However, I didn't get the ABE notification when using Deny INCLUSION so I got a little bit confused. Could this be a bug? Let me know if you need further information on my configuration.

Currently, I'm using Firefox 4 RC1 and NoScript 2.0.9.9. ABE notifications are switched on on the Notifications tab and the ABE configuration looks as follows:

Code: Select all

# Prevent Internet sites from requesting LAN resources.
Site LOCAL
Accept from LOCAL
Deny

# This one allows Facebook scripts and objects to be included only
# from Facebook pages
Site .facebook.com .fbcdn.net .facebook.net .facebook.de
Accept from .facebook.com .fbcdn.net .facebook.net .facebook.de
Deny INCLUSION
#Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

Site .twitter.com .twimg.com
Accept from .twitter.com .twimg.com
Deny INCLUSION
#Deny INCLUSION(SCRIPT, OBJ, SUBDOC)

Site .googlesyndication.com
Accept from .googlesyndication.com
Deny ALL
Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Definitely block requests to facebook from 3rd-party sit

Post by Giorgio Maone »

User-facing notifications happen for blocked document loads only.
All the other blocking activity is logged in Tools|Error Console as "[ABE]" message lines, to cut down the noise.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
dhouwn
Bug Buster
Posts: 968
Joined: Thu Mar 19, 2009 12:51 pm

Re: Definitely block requests to facebook from 3rd-party sit

Post by dhouwn »

Might be worth updating FAQ 8.10 to include "facebook.net".
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Definitely block requests to facebook from 3rd-party sit

Post by Giorgio Maone »

dhouwn wrote:Might be worth updating FAQ 8.10 to include "facebook.net".
I had actually done it, but forgot to upload the changes.
Thanks for noticing.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
tlu
Senior Member
Posts: 129
Joined: Fri Jun 05, 2009 8:01 pm

Re: Definitely block requests to facebook from 3rd-party sit

Post by tlu »

Giorgio Maone wrote:
dhouwn wrote:Might be worth updating FAQ 8.10 to include "facebook.net".
I had actually done it, but forgot to upload the changes.
Thanks for noticing.
Giorgio, including .mafiawars.com and .eamobile.com in the "Accept from" line is really no mistake? I'm asking as I'm not familiar with these sites. Are they related to Facebook?
Mozilla/5.0 (X11; Linux x86_64; rv:2.0b13pre) Gecko/20110317 Firefox/4.0b13pre
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Definitely block requests to facebook from 3rd-party sit

Post by Giorgio Maone »

tlu wrote: Giorgio, including .mafiawars.com and .eamobile.com in the "Accept from" line is really no mistake? I'm asking as I'm not familiar with these sites. Are they related to Facebook?
They're needed for some popular Facebook games to work.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
tlu
Senior Member
Posts: 129
Joined: Fri Jun 05, 2009 8:01 pm

Re: Definitely block requests to facebook from 3rd-party sit

Post by tlu »

Giorgio Maone wrote:
tlu wrote: Giorgio, including .mafiawars.com and .eamobile.com in the "Accept from" line is really no mistake? I'm asking as I'm not familiar with these sites. Are they related to Facebook?
They're needed for some popular Facebook games to work.
I see. Thanks!
Mozilla/5.0 (X11; Linux x86_64; rv:2.0b13pre) Gecko/20110317 Firefox/4.0b13pre
forfrom1337
Posts: 8
Joined: Wed Apr 13, 2011 6:01 am

Re: Definitely block requests to facebook from 3rd-party sit

Post by forfrom1337 »

I have a basic question about this:

Do I have to allow facebook.com (or .net) permanently to have the scripts on the Facebook page?? (or are they beeing allowed by the ABE-Rule?)
Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Definitely block requests to facebook from 3rd-party sit

Post by Giorgio Maone »

forfrom1337 wrote:I have a basic question about this:

Do I have to allow facebook.com (or .net) permanently to have the scripts on the Facebook page?? (or are they beeing allowed by the ABE-Rule?)
ABE and NoScript permissions are independent and orthogonal.
Therefore you have to Allow (in NoScript) for scripts to work, and DENY (in ABE) for facebook stuff not being loaded in 3rd party pages.
Mozilla/5.0 (Windows NT 5.2; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Newbee

Re: Definitely block requests to facebook from 3rd-party sit

Post by Newbee »

Hello my friends,

I have a quick question. There are also sites like

facebook.greenpeace.com

included in some websites. How can we block these sites? Is it correct, that we cannot use a logic like *.facebook*.com in the white list section, right? But in the ABE part the syntax *.facebook*.com would work?

Hope there is a solution for this...


Thanks in advance!
Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.10
Post Reply