MorbidFractal
(usa Ubuntu)
Enviado em 21/06/2012 - 18:53h
Ola Leandro
Sorry for not replying to your thread.
We have seen two types of redirect
http://a.oix.net/services/obind?eorig=<value>tok=<value>">
http://a.oix.net/services/obind?eorig=<value>tok=<value>
http://a.oix.net/services/invite?eorig=<value>tok=<value>">
http://a.oix.net/services/invite?eorig=<value>tok=<value>
The first acts on pictures within a web page, or as you have seen, sometimes if you click on a link to a picture. The second acts on a web page itself. Instead of going to the page you wish to view you are taken to a page inviting you to join the service. Naturally you tell them to 'get lost'..
As you have seen you can use the hosts file to block them but unfortunately it means you have to list each domain separately and then you may miss some... or in fact, as they have recently done, Phorm can invent some more in order to avoid you avoiding them.
It's a stupid game.
Recently *.phormlabs.com has been seen. The Dephormation tool is being updated. Unfortunately, if I understand correctly, the hosts file will not accept wildcards or IP addresses. You have to specify exact URLs.
4vndnawjto mentioned the Firewall so I thought I would try looking into Iptables.
Do not trust me on this. I am not an expert.
I would ask Fabio Brito,
http://br.linkedin.com/in/fbrito
Who is a Linux Expert but he is the 'Enemy'...
I hope someone else will be able to advise and improve the following if it is possible.
Please read the following completely and print it for reference before breaking things. Changes to Iptables are stored in memory and will be lost if you restart your computer without saving them. If it goes wrong restart your computer.
In a terminal, Applications|Accessories|Terminal
keith@keith-desktop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
keith@keith-desktop:~$
Now add a New, -N, Chain
keith@keith-desktop:~$ sudo iptables -N KillPHORM
keith@keith-desktop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain KillPHORM (0 references)
target prot opt source destination
keith@keith-desktop:~$
Add a Rule to that Chain with the Target REJECT
keith@keith-desktop:~$ sudo iptables -A KillPHORM -p all -s 0.0.0.0/0 -d 91.205.220.0/22 -j REJECT
keith@keith-desktop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain KillPHORM (0 references)
target prot opt source destination
REJECT all -- anywhere 91.205.220.0/22 reject-with icmp-port-unreachable
keith@keith-desktop:~$
-A Adds, To KillPHORM
-p is protocol, set to all
-s is source, 0.0.0.0/0 is all
-d is destination, 91.205.220.0/22 is Phorm's NetBlock
-j sets the target to REJECT
Now add KillPHORM as a Target under Chain OUTPUT
keith@keith-desktop:~$ sudo iptables -A OUTPUT -j KillPHORM
keith@keith-desktop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
KillPHORM all -- anywhere anywhere
Chain KillPHORM (1 references)
target prot opt source destination
REJECT all -- anywhere 91.205.220.0/22 reject-with icmp-port-unreachable
keith@keith-desktop:~$
-A Adds, To OUTPUT
-j sets the Target to KillPHORM
Now in your browser try,
http://navegador.oi.com.br
http://navegador.telefonica.com.br
http://a.oix.net
http://a.phormlabs.com
After a possible delay your browser should tell you it is unable to connect.
If the above has not interfered with your general browsing then you might choose to save the results..
keith@keith-desktop:~$ sudo iptables-save
# Generated by iptables-save v1.4.4 on Thu Jun 21 22:23:12 2012
*filter
:INPUT ACCEPT [2225:850706]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [8003:716151]
:KillPHORM - [0:0]
-A OUTPUT -j KillPHORM
-A KillPHORM -d 91.205.220.0/22 -j REJECT --reject-with icmp-port-unreachable
COMMIT
# Completed on Thu Jun 21 22:23:12 2012
keith@keith-desktop:~$
And wave a middle finger at Fabio and Phorm...
If something goes wrong later then
keith@keith-desktop:~$ sudo iptables -D KillPHORM 1
keith@keith-desktop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
KillPHORM all -- anywhere anywhere
Chain KillPHORM (1 references)
target prot opt source destination
keith@keith-desktop:~$
-D To remove the Rule, 1, from The KillPHORM Chain
keith@keith-desktop:~$ sudo iptables -D OUTPUT 1
keith@keith-desktop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain KillPHORM (0 references)
target prot opt source destination
keith@keith-desktop:~$
-D To remove the KillPHORM rule, 1, from The OUTPUT Chain
keith@keith-desktop:~$ sudo iptables -X KillPHORM
keith@keith-desktop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
keith@keith-desktop:~$
-X To remove The User Defined KillPHORM Chain
keith@keith-desktop:~$ sudo iptables-save
# Generated by iptables-save v1.4.4 on Thu Jun 21 22:40:31 2012
*filter
:INPUT ACCEPT [3108:1368380]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [8891:789824]
COMMIT
# Completed on Thu Jun 21 22:40:31 2012
keith@keith-desktop:~$
To Save the Result.