Contact us in messengers or by phone.

whatsapp telegram viber phone email
+79214188555

Anonymity methods on the net. Part 1. Just about complicated

DronVR

Private access level
Joined
Jun 1, 2014
Messages
284
Reaction score
263
Points
63
Anonymity methods on the net. Part 1. Just about complicated
001.jpg


Proxies
Globally, when they say a proxy server, they mean something that acts as an intermediary between the client and the recipient.

In terms of ensuring anonymity, proxy servers are:

  • HTTP (web) proxy servers. Such servers pass only HTTP traffic through themselves, by default adding proxy usage data to the transmitted traffic;
  • SOCKS proxies. Unlike HTTP proxies, SOCKS transfers all the information without adding anything from itself. The SOCKS protocol is at the session level of the OSI model, this ensures independence from high-level protocols: HTTP, FTP, POPZ, etc., which allows SOCKS to pass through all traffic, not just HTTP;
  • Separately, it is worth mentioning CGI proxies or "anonymizers", which are essentially a web server with a form where the client enters the address of the desired site. After that, the page of the requested resource opens, but the address of the CGI proxy is visible in the address bar of the browser. CGI proxy, like any web server, can use https to protect the communication channel between itself and the client.
You see the scheme of proxy servers in the picture, everything is simple:
002.jpg

Proxy server advantages:

  • proxies are cheap, you can find many free proxies on the network.


Cons of proxies:

  • Trust proxy server
  • for http proxies, you need to filter HTTP headers: "HTTP_X_FORWARDED_FOR: client, ip1 ...", HTTP_VIA, HTTP_FORWARDED, etc .;
  • proxy protocols (http, SOCKSx) DO NOT support encryption between HTTP / SOCKS / Elite / Anonymous proxies and the client. And an SSL proxy means only that the client can work with https resources;
  • proxy chains are ineffective: " Hi Proxy1, send my message: “forward to Proxy3; forward to proxy4; forward to [DLMURL="https://anonym.to?https://encrypted.google.com/c8e8df895c2cae-%D1%87%D1%82%D0%BE-%D0%BD%D0%B8%D0%B1% D1% 83% D0% B4% D1% 8C-% D0% B5% D1% 89% D1% 91-% D0% B7% D0% B4% D0% B5% D1% 81% D1% 8C-% D0% B7 % D0% B0% D1% 88% D0% B8% D1% 84% D1% 80% D0% BE% D0% B2% D0% B0% D0% BD% D0% BD% D0% BE% D0% B5-166baf "] encrypted.google.com/c8e8df895c2cae- anything- else-here- encrypted-166baf [/ DLMURL] 'for proxy2? " Thank!;
  • the need to configure a proxy server for each application or the use of separate socksifier programs, for example, Proxifier.
VPN / SSH
I will talk about VPNs, meaning SSH tunnels as well. Since, despite some differences, the basic principle is the same.

The VPN operation scheme is shown in the picture:
003.jpg

Currently, commercial VPN providers offer the following VPN protocols:

  • PPTP - the most widely used, fast, easy to configure, but it is considered the "least secure" compared to the rest;
  • L2TP + IPSec. L2TP provides transport, and IPSec is responsible for encryption. This bundle has stronger encryption than PPTP, it is resistant to PPTP vulnerabilities, it also provides message integrity and authentication of the parties;
  • OpenVPN - safe, open, and therefore widespread, allows you to bypass many locks, but requires a separate software client;
  • SSTP is as secure as OpenVPN, it does not require a separate client, but it is very limited on the platforms: Vista SP1, Win7, Win8.


Almost all commercial VPN providers offer a choice of two protocols: OpenVPN and PPTP. Less commonly, the L2TP + IPSec protocol is offered. And quite a few offer SSTP.

Separately, it is worth noting the services that provide DoubleVPN, when before going to the Internet, traffic passes through 2 different VPN servers in different countries, or even QuadVPN, when 4 servers are used, which the user can choose and arrange in any okay.

A curious study regarding the anonymity and reliability of commercial VPN servers was conducted by torrentfreak.com: torrentfreak.com/vpn-services-that-take-your-anonymity-seriously-2013-edition-130302

VPN providers were asked questions:

  • Do you keep logs that allow you or third parties to map the IP address or timestamp with your client? If so, what data do you store?
  • Under what jurisdiction does your company operate, and under what circumstances will you disclose data to a third party?
  • If you receive a DMCA notice or its European equivalent, what will you do with it?
  • What payment systems do you work with, and how are they related to user accounts?


Summarizing, it is worth noting that most VPN providers in their answers are unanimous: “Logs are not stored, and if they are stored, then very briefly, it is impossible to calculate the subscriber from them. It’s very difficult to put pressure on us and make us give out at least something. ” Of course, you should not expect other answers from services whose main purpose is to ensure anonymity of users.

VPN / SSH advantages:

  • fast and convenient, no need to separately configure applications.
Cons of VPN / SSH:

  • you need to trust the VPN / SSH server / provider.


I note that most of the thematic add-ons for browsers and “programs for anonymity” use proxy servers and VPN servers to hide the client’s IP address.

Tor Great and terrible


Much has been said about Tor, but I will try to tell you simply :)

Tor is a router system in which a client connects to the Internet through a chain of nodes. As a rule, a chain consists of three nodes, each of them does not know the addresses of the client and resource at the same time. In addition, Tor encrypts messages separately for each node, and open traffic is visible only to the output router.

Now Tor is 10 authoritative (control) nodes, about 4200 intermediary nodes, including about 900 output nodes.

In the picture a simplified scheme of the operation of Tor
004.jpg


I note that the traffic goes back in open form, on the output node it is encrypted with a temporary symmetric key and transmitted along the chain (yes, the traffic itself is encrypted on symmetric keys, and these keys are encrypted on asymmetric keys).

They criticize because they demand too much from him: it is safe to transfer the traffic of any applications to the network, protection from a global observer, confidentiality of transmitted data, etc. But he solves the main problem with his threat model: a rather high level of client anonymity during transmission http traffic only subject to all mandatory rules: www.torproject.org/download/download-easy.html.en

Pros of Tor
:
  • a high degree of customer anonymity, subject to all the rules;
  • ease of use (downloaded Tor Browser Bundle, launched and use).


Cons Tor:
  • output traffic is tapped;
  • low speed;
  • availability of management servers.
In one of the forums I found a poll regarding Tor. The number of respondents does not indicate the reliability of the results, but the winning answer is very correct :)
005.jpg

Tor's work is invariably accompanied by people's doubts about its reliability and anonymity. Now we will not disassemble it in detail, I promise to do this in the next articles of the series, where I will describe in detail some important Tor details and try to answer all the questions.

I2P

A lot of words have been said about I2P, I will be concise and try to explain everything clearly.

I2P is an anonymous network running on top of the Internet. It has its own sites, forums and other services. By its architecture, it is completely decentralized, and IP addresses are not used anywhere in I2P.

I2P has two main concepts:

  • A “tunnel” is a temporary unidirectional path through a list of nodes. Tunnels are incoming and outgoing;
  • "NetDb network base", which is more or less distributed across all I2P clients. Its purpose is to store information about how a client can connect to a specific recipient.
NetDb database contains:

  • RouterInfos - contact details of routers (clients) are used to build tunnels (simplifying, they are cryptographic identifiers of each node);
  • LeaseSets - contact details of recipients used to communicate outgoing and incoming tunnels.
At the beginning of 2013, I2P included 25,000 routers and 3,000 LeaseSets.

I'll tell you about the node interaction algorithm:

Step one. The Kate node builds outgoing tunnels. She turns to NetDb for data on routers and builds a tunnel with their participation.
006.jpg


Step Two Boris builds an input tunnel in the same way as an outgoing tunnel. Then he publishes his coordinates or the so-called “LeaseSet” in NetDb (here, note that the LeaseSet is transmitted through the outgoing tunnel).

007.jpg


Step Three When Kate wants to send a message to Boris, it requests Boris to NetDb LeaseSet. And through outgoing tunnels it forwards the message to the destination gateway.
008.jpg


I2P has the ability to access the Internet through special Outproxy, but they are unofficial and, in combination of factors, are even worse than Tor output nodes. I2P developers say: " Want Internet - Use Thor ".

Pros of I2P:

  • high degree of customer anonymity;
  • full decentralization, which leads to network stability;
  • data confidentiality: end-to-end encryption between the client and the recipient.
Cons of I2P:
  • low speed;
  • "Your internet."
Details about I2P, including protection mechanisms, and I2P is doing fine with them, I will also discuss in the following articles of the series.

Other means
In fact, there were and are dozens of individual projects dedicated to anonymity on the Internet, this is not counting the "add-ons in browsers" and "programs for anonymity." Just other, less popular, solutions are either already compromised, or not yet so popular, and therefore not studied by the global expert community to talk about their sufficient reliability. The following most promising projects are being actively developed:

  • Freenet freenetproject.org
  • GNUnet gnunet.org
  • JAP (aka John Donym, based on Tor) anon.inf.tu-dresden.de/index_en.html
  • RetroShare retroshare.sourceforge.net
  • Perfect Dark www21.atwiki.jp/botubotubotubotu


A separate interesting example of anonymous networks is Wi-Fi-based networks. Whereas with the traditional approach, the Internet performs the transport functions of any anonymous network, the use of wireless solutions allows you to achieve independence from Internet providers:

  • Byzantium project: project-byzantium.org
  • Netsukuku project - Networked Electronic Technician Skilled in Ultimate Killing, Utility and Kamikaze Uplinking: netsukuku.freaknet.org
  • BATMAN project - Better Approach To Mobile Ad-hoc Networking: [DLMURL] https://www.open-mesh.org/projects/open-mesh/wiki [/ DLMURL]
Centralized means of "anonymity"
Immediately, I note the main thing: no centralized solution can provide a high level of anonymity, since it is necessary trust central node.

We will not discuss organizational, political, and bureaucratic difficulties in disclosing anonymity.

Perhaps the VPN server in Panama is indeed more secure than the same server in Spain. Or maybe not.

As well as we will not talk about chains of nodes, since their reliability is difficult to evaluate. On the one hand, in view of organizational difficulties, the risk of disclosure is lower, and on the other, we must be confident enough in each node.

Let's move on to the specifics.



Proxies: http and SOCKSx
Let's take a closer look at http headers in http proxies.

An HTTP header is a string in an http message with some parameters of the form: " Name: Value ". There are quite a few headers; they are exchanged between clients and servers during interaction.

For example, the following field: " Date: Sat, 12 Dec 2012 15:41:52 GMT »Returns the current time and date from the server to the client.

One of these headers: X-Forwarded-For, in fact, is the standard for the server to obtain the original client address when accessing the server through an HTTP proxy. And here in this header, if you do not filter it, the entire chain of proxy servers is transferred from beginning to end, for example:

  • X-Forwarded-For: client1, proxy1, proxy2 ...
  • X-Forwarded-For: 169.78.138.66, 169.78.64.103 ...


Also, headers that disclose deanonymizing information include: HTTP_VIA, HTTP_FORWARDED, etc.



HTTP proxies that hide the client’s IP address are called anonymous. Such servers are divided into types, this division is very arbitrary, but, nevertheless, there are:

  • Simple anonymous proxies (anonymous). These servers do not hide the fact of using the http proxy, however, they replace the client's IP address with their own.
  • Elite anonymous (high anonymous / elite). Such servers also hide the fact of using http proxies.


SOCKS proxies, as you recall, do not transmit any headers.



Consider the difference between SOCKS 4, 4a, and 5. There are different versions of SOCKS:

  • SOCKS4. Such servers require the client, for example, a web browser, only the IP address of the resource to which it refers (the recipient). Therefore, the client needs to find out this ip-address somehow, and the client can only find out its direct DNS query bypassing the proxy. This can lead to de-anonymization, since the Internet provider can see DNS queries in the clear, this vulnerability is called DNS-leaks, it is described later in the second part of the article.
  • SOCKS4a. It is an extension of SOCKS4. The main difference is that the SOCKS4a server accepts from the client only the DNS name of the recipient, and not its IP address. This is necessary when the client cannot independently determine the IP address of the recipient by the DNS name.
  • SOCKS5. It is also an extension of SOCKS4. The SOCKS5 server supports UDP, IPv6, authorization, etc. And although SOCKS5 proxies can receive both the IP address and the DNS name of the target resource from the client, some applications that support SOCKS5 can themselves receive the destination IP address before contact the SOCKS5 proxy, which can also lead to a leak of DNS queries.


Ssh. Comparing SSH and VPN
An SSH tunnel is a tunnel created through an SSH connection and used to encrypt transmitted data. As the Wikipedia article of the same name states: “ SSH (Secure SHell) is an application-level network protocol that allows remote control of the operating system and tunneling of TCP connections (for example, for file transfer) ".

When using the SSH tunnel, the open traffic of a protocol is encrypted on one end of the SSH connection, the client, and decrypted on the other, SSH server.

The operation scheme of the SSH tunnel is shown in the figure:
009.jpg

SSH protocol supports several options:

  • In the first embodiment, the tunneled application must have the HTTP / SOCKS proxy settings for directing traffic through the local proxy server to the SSH tunnel. If there are no such settings, then you can use socksifier programs that send traffic through a proxy server.
  • In the second case, you can organize an almost full-fledged VPN connection and do without setting up SOCKS. Starting with version 4.3, the open implementation of SSH, OpenSSH, can use the tunnel network interfaces of the 2nd and 3rd levels of the OSI model, that is, organize analogs of VPN connections.


Compare VPN and SSH in terms of anonymity.



Goals

Historically, VPN and SSH have been designed for different purposes, which explains their pros and cons.

  • VPN is designed to provide secure remote access to corporate network resources. As soon as the computer connects to the VPN server, it becomes part of the “local” network and, therefore, can receive all its services: shared resources, local VoIP service, NetBios-, UDP-, and broadcast requests, single VPN- also become possible politics etc In most cases, a traffic of the entire operating system and applications is sent via VPN.
  • SSH was originally designed for secure remote device management. An SSH connection is a connection to a “specific device”, not a “network”. Although SSH masters can do a lot of cool things with it.
Safety

The VPN and SSH protocols are fairly secure except for PPTP. Most possible attacks boil down to [DLMURL="https://anonym.to?https://en.wikipedia.org/wiki/Man-in-the-middle_attack"] Man-in-the-middle [/ DLMURL] and substitution of certificates or keys, however, this is a problem of authentication and user attentiveness.

Convenience

Convenience is a conditional and subjective concept, it depends on your goals and experience.

010.jpg


It’s easy to connect to a VPN server, but for beginners it can be difficult to configure it.

While the SSH server is easier to configure, but, for example, manually setting up the SSH tunnel for each application may not seem convenient to someone.



Speed

The speed of each tool depends on the particular implementation and protocols used. If we compare SSH and OpenVPN, I will share the research [DLMURL="https://anonym.to?https://inportb.com/2009/09/04/ssh-or-vpn/"] [/ DLMURL]:

  • network - 96.5 Mbps.
  • network / SSH - 94.2 Mbps.
  • network / VPN - 32.4 Mbps.


To summarize, it is worth noting that VPN servers are more popular than SSH. There are many commercial VPN providers on the Internet. However, SSH tunnels are also sold in abundance on specialized forums.

What to deploy on your server in Antarctica is your business.



Useful advice


Sometimes there is a situation when the VPN connection for some reason can be broken. If in the case of a proxy server, network communication is terminated, then in the case of a VPN, traffic will continue to go directly. The most reliable option to prevent this is to use a routing table where only the VPN server gateway is specified as the default default gateway.

This is done simply:

1. We remove any default routes:
011.jpg


2. Allow access to the Internet only to the address of the VPN server:
012.jpg


3. Add the default route with the gateway - VPN server:
013.jpg


Where: 192.168.0.1 - Internet gateway, 55.55.55.55 - VPN gateway.

Another way is to install non-existent DNS servers in the properties of an open Internet connection, for example, 127.0.0.1. In this case, web surfing and other similar tasks become impossible without connecting to a VPN server.

There are also special programs, for example, VPN-watcher, which for given applications checks the VPN connection several times per second and stops their work if the VPN connection is disconnected.

Thanks for another way. [DLMURL="https://anonym.to?https://habrahabr.ru/users/Pongo/"] Pongo [/ DLMURL]: " Another way to protect yourself from breaking vpn is to configure a firewall. Suitable including the standard windows firewall. there is [DLMURL="https://anonym.to?https://practicalrambler.blogspot.ru/2011/05/how-to-block-all-internet-traffic.html"] instruction with pictures [/ DLMURL] . Moreover, blocking rules can not be created, but limited to the 10th paragraph. For individual programs (for example, for openvpn), you can separately create enabling rules so that these programs work even if the VPN is not connected. "

Thanks for another way. [DLMURL="https://anonym.to?https://habrahabr.ru/users/amarao/"] amarao [/ DLMURL]: " I think, if you build a secure structure, then you just need to distinguish two sessions - secure and not secure. The session leader is put in cgroups, from where the non-vpn interface is simply not available for use - in this case information will be sent only through this interface. "

Deanonymizing data and possible vulnerabilities

Let's see what identification information about ourselves we can transfer to the Internet. I will not consider vulnerabilities (including 0day) in programs whose operation can lead to complete control over the computer in general.

014.jpg

General


IP address . The most "popular" identifier on the network. Its value may be different in different situations, but as a rule, it is customary to frighten the network “anonymuses” by disclosing the IP address.

Decision : the means described in the first part of this article cope with hiding the ip address

DNS leaks occurs [DLMURL="https://anonym.to?https://www.dnsleaktest.com/what-is-a-dns-leak.php"] then [/ DLMURL] when the application can send its DNS queries using the DNS servers of the Internet service provider. This often happens when people through a local proxy server (hi, SOCKS 4, 5!) Try to send traffic to the Tor network of various applications that resolve DNS names bypassing Tor.

You can check if you are affected by this leak here: [DLMURL] https://www.dnsleaktest.com [/ DLMURL]

Decision : when working with a VPN connection, the most convenient option is to use static DNS servers of the VPN provider or, if you have a personal VPN server, use OpenDNS (208.67.222.222, 208.67.222.220) or Google DNS (8.8.8.8, 8.8.4.4).

To prevent such leaks in Tor, it is recommended to use the Tor Browser Bundle or, if you really want to send traffic to another application to Tor, then the most safe and universal option is the isolation proxy, which will be discussed in one of the following articles.

There are no DNS queries on the I2P network. When working with outproxy, DNS queries are performed on outproxy itself.

thanks for the advice [DLMURL="https://anonym.to?https://habrahabr.ru/users/Rulin/"] Rulin [/ DLMURL]: " ... when using the Socks proxy in Firefox, DNS-leaks will happen by default, to get rid of it, you need: In the address bar, type about: config, click "I'll be careful, I promise!",

We find the option network.proxy.socks, Double-click to change the value to true,

Everything, now when using socks proxy, dns requests will also go through socks "

The “network.proxy.socks_remote_dns” setting determines where DNS queries will be executed when using SOCKS5. A value of “True” sets that they will be executed through a SOCKS proxy, and not on the client.



Profiling arises when most of the traffic goes online for a long time through one node, for example, Tor. Then it becomes possible to attribute the activity seen to one alias. The output host may not know your ip address, but it will know what you are doing.

Decision : Do not use Tor constant chains, regularly change output nodes (VPN servers, proxies), or, looking ahead, use the distribution [DLMURL="https://anonym.to?https://sourceforge.net/projects/ whonix / "] Whonix [/ DLMURL].

MitM attacks aimed at listening and modifying traffic on the output node, such as Tor or any proxy server. An interesting option is the modification by the output node of digital signatures, GPG or SSL fingerprints, hashes of downloaded files.

Decision : Be careful when warnings about the validity of certificates and keys appear.

Deanonymizing activity in an anonymous session . For example, when a client from an anonymous session visits his page on the social network, his Internet provider will not know about it. But the social network, despite the fact that it does not see the real IP address of the client, knows exactly who has logged in.

Decision : Do not allow any left activity in an anonymous session.

Simultaneous connection via anonymous and open channel . In this case, for example, when the Internet connection is cut off, both client connections with the same resource will break. By this fact, it will be easy for the server to calculate and match two simultaneously completed connections and calculate the real address.

Decision : Prevent simultaneous connection to the resource via anonymous and open channel.



Text attribution . More details [DLMURL="https://anonym.to?https://habrahabr.ru/post/165435/"] here [/ DLMURL]. The application can compare the text written anonymously and other plain text, exactly belonging to the author, and determine with a high degree of probability the authorship coincides.

Decision : jokes, jokes, but this topic has not yet been sufficiently studied. You can advise to hide the text, which can be uniquely associated with you. Then there will be nothing to compare with the anonymous text.



MAC address The network interface becomes known to the Wi-Fi access point when a client connects to it.

Decision : if you worry that the access point will remember the MAC address of your interface, just change it before connecting.

On this resource dedicated to our “digital shadow”: myshadow.org/trace-my-shadow, among other things, we can see what data we transmit about ourselves to the network:
015.jpg


What can Browsers say?


Cookies - these are text files with any values stored by the application (often the browser) for various tasks, for example, authentication. It often happens that the client first visited the resource from an open session, the browser saved cookies, and then the client connected from an anonymous session, then the server can match cookies and calculate the client.

Moreover, there are so-called 3rd-party cookies that are stored with us, for example, after viewing an advertising banner from another site (3rd-party). And the website owner of this banner is able to track us on all the resources where its banners are located.

For those who want to learn more about cookies, I advise you to read the articles:

  • [DLMURL="https://anonym.to?https://habrahabr.ru/post/190488/"] Cookie without cookies [/ DLMURL].
  • [DLMURL="https://anonym.to?https://habrahabr.ru/post/126643/"] Permanent non-blocking cookies using HTTP headers [/ DLMURL].
  • [DLMURL="https://anonym.to?https://habrahabr.ru/post/104725/"] Evercookie are the most persistent cookies [/ DLMURL].

Flash, Java, Adobe . These plugins are essentially separate applications that run on behalf of the user. They can bypass proxy settings, store their separate long-lived cookies (Flash - Local Shared Objects), etc. It is unnecessary to talk about vulnerabilities published regularly in them.

Browser fingerprint . The browser provides the server with dozens of categories of data, including the so-called [DLMURL="https://en.wikipedia.org/wiki/User_agent"] user agent [/ DLMURL]. All this can form a rather unique “digital fingerprint of the browser”, by which it can be found among many others already in an anonymous session.

What kind of data your browser sends to the server can be viewed, for example, here, here (aka panopticlick.eff.org) and here .

Javascript Scripts executable on the client side can collect even more information for the server, including clearly identifying it. Moreover, if the site we visit is subject to [DLMURL="https://en.wikipedia.org/wiki/Cross-site_scripting"] XSS [/ DLMURL], then the included Javascript scripts will help the attacker to conduct a successful attack with all the ensuing consequences .

Web bugs - these are invisible details of web pages used to monitor site visits, they can additionally send different data about the client to the server. Google Web Bugs are widespread all over the Internet.

HTTP referer - This is the http header with which the website can determine where the traffic is coming from. That is, if you clicked on the link that the http referer passes, then the site to which the link leads will be able to find out which site you went to from.

Decision : about the secure configuration of each browser, including blocking each of the above categories of identifying data, is written in great detail and clearly on the resource: fixtracking.com, from the wonderful DuckDuckGo search engine:
016.jpg

Applications


It is important to understand that initially many applications were conceived and designed not so much to ensure anonymity, but rather for normal and efficient operation in “difficult” network conditions: bypassing blocking firewalls, proxies.

As an example, I will give only a small part of applications that can independently transmit data identifying us to the network.

  • Some BitTorrent clients ignore proxy settings, sending traffic over open channels.
  • Windows Update sends a dozen categories of data to the server, including a unique 128-bit identifier (GUID). Windows Update is also vulnerable to MitM, and therefore, an output node, such as Tor, can be a source of attack.
  • License keys of paid or serial numbers of free applications can also be transferred to the Internet, for example, during activation or updating, thereby identifying the user.
  • Windows Media Player can independently request music information or exchange service data.
  • Time zone data can be transmitted using IRC chat via the CTCP protocol, Client-to-client protocol.
  • The Windows RAM dump sent in case of an error also contains identifying data.
  • File metadata can include important data: creation date, authorship, etc.
Decision : Do not use any untrusted and unverified application in an anonymous session.
 
Original message
Методы анонимности в сети. Часть 1. Просто о сложном
001.jpg


Прокси-серверы
Глобально, когда говорят прокси-сервер, то имеют в виду что-то, выступающее посредником между клиентом и адресатом.

В разрезе же обеспечения анонимности прокси-серверы бывают:

  • HTTP-(веб)-прокси-серверы. Такие серверы пропускают через себя только HTTP-траффик, по умолчанию добавляя в передаваемый траффик данные о применении прокси;
  • SOCKS-прокси-серверы. В отличие от HTTP-прокси-серверов, SOCKS передаёт всю информацию, ничего не добавляя от себя. Протокол SOCKS находится на сеансовом уровне модели OSI, этим достигается независимость от высокоуровневых протоколов: HTTP, FTP, РОРЗ и др., что и позволяет SOCKS пропускать через себя весь траффик, а не только HTTP;
  • отдельно стоит упомянуть CGI-прокси или «анонимайзеры», которые по сути представляют собой web-сервер с формой, где клиент вводит адрес нужного сайта. После чего открывается страница запрошенного ресурса, но в адресной строке браузера виден адрес CGI-прокси. CGI-прокси, как и любой web-сервер может использовать https для защиты канала связи между собой и клиентом.
Схему работы прокси-серверов вы видите на картинке, тут всё просто:
002.jpg

Плюсы прокси-серверов:

  • прокси дешевы, в сети можно найти много бесплатных прокси.


Минусы прокси-серверов:

  • надо доверять прокси-серверу;
  • для http-прокси надо фильтровать HTTP-заголовки: «HTTP_X_FORWARDED_FOR: client, ip1...», HTTP_VIA, HTTP_FORWARDED и др.;
  • протоколы прокси (http, SOCKSx) НЕ поддерживают шифрование между HTTP/SOCKS/Elite/Anonymous-прокси и клиентом. А SSL-прокси означает лишь то, что клиент может работать с https-ресурсами;
  • цепочки прокси неэффективны: "Привет Proxy1, отправишь моё сообщение:«forward to Proxy3; forward to Proxy4; forward to [DLMURL="https://anonym.to?https://encrypted.google.com/c8e8df895c2cae-%D1%87%D1%82%D0%BE-%D0%BD%D0%B8%D0%B1%D1%83%D0%B4%D1%8C-%D0%B5%D1%89%D1%91-%D0%B7%D0%B4%D0%B5%D1%81%D1%8C-%D0%B7%D0%B0%D1%88%D0%B8%D1%84%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%BD%D0%BE%D0%B5-166baf"]encrypted.google.com/c8e8df895c2cae-что-нибудь-ещё-здесь-зашифрованное-166baf[/DLMURL]' для Proxy2?» Спасибо!;
  • необходимость настройки прокси-сервера для каждого приложения либо использование отдельных программ-соксификаторов, например, Proxifier.
VPN/SSH
Я буду говорить о VPN, подразумевая также и SSH-туннели. Так как, несмотря на некоторые различия, основной принцип у них одинаков.

Схема работы VPN показана на картинке:
003.jpg

В настоящее время коммерческими провайдерами предлагаются следующие протоколы VPN:

  • PPTP – используется наиболее широко, быстрый, легко настраивается, однако считается «наименее защищённым» по сравнению с остальными;
  • L2TP + IPSec. L2TP обеспечивает транспорт, а IPSec отвечает за шифрование. Данная связка имеет более сильное шифрование, чем PPTP, устойчива к уязвимостям PPTP, обеспечивает также целостность сообщений и аутентификацию сторон;
  • OpenVPN – безопасный, открытый, а следовательно, распространённый, позволяет обходить многие блокировки, но требует отдельного программного клиента;
  • SSTP – такой же безопасный, как и OpenVPN, отдельного клиента не требует, однако сильно ограничен в платформах: Vista SP1, Win7, Win8.


Практически все коммерческие VPN-провайдеры предлагаю выбор из двух протоколов: OpenVPN и PPTP. Реже предлагается протокол L2TP+IPSec. И совсем единицы предлагают протокол SSTP.

Отдельно стоит отметить сервисы, предоставляющие «DoubleVPN», когда перед тем, как выйти в Интернет, траффик проходит 2 разных VPN-сервера в разных странах, или даже «QuadVPN», когда используется 4 сервера, которые пользователь может выбрать сам и расположить в произвольном порядке.

Любопытное исследование, касающееся анонимности и надёжности коммерческих VPN-серверов, было проведено ресурсом torrentfreak.com: torrentfreak.com/vpn-services-that-take-your-anonymity-seriously-2013-edition-130302

VPN-провайдерам были заданы вопросы:

  • Храните ли вы журналы, позволяющие вам или третьим лицам сопоставить ip-адрес или временную отметку с вашим клиентом? Если да, то какие данные вы храните?
  • Под какой юрисдикцией работает ваша компания, и при каких обстоятельствах вы раскроете данные третьей стороне?
  • В случае, если вы получите DMCA-уведомление или его европейский аналог, что вы с ним сделаете?
  • С какими платежными системами Вы работаете, и как они связаны с учетными записями пользователей?


Резюмируя, стоит отметить, что большинство VPN-провайдеров в своих ответах единодушны: «Журналы не хранятся, а если и хранятся, то очень недолго, по ним вычислить абонента нельзя. На нас очень трудно надавить и заставить выдать хоть что-то». Разумеется, других ответов от сервисов, главной целью которых является обеспечения анонимности пользователей, ожидать не приходится.

Плюсы VPN/SSH:

  • быстро и удобно, не надо отдельно настраивать приложения.
Минусы VPN/SSH:

  • нужно доверять VPN/SSH-серверу/провайдеру.


Отмечу, что большинство тематических дополнений для браузеров и «программ для анонимности» используют в своей основе именно прокси-серверы и VPN-серверы для скрытия ip-адреса клиента.

Tor. Великий и ужасный


О Tor говорилось уже много, но я попытаюсь рассказать просто :)

Tor — это система маршрутизаторов, в которой клиент соединяется с Интернетом через цепочку узлов. Как правило, цепочка состоит из трех узлов, каждому из них неизвестны адреса клиента и ресурса одновременно. Кроме того, Tor шифрует сообщения отдельно для каждого узла, а открытый трафик виден только выходному роутеру.

Сейчас Tor — это 10 авторитетных (управляющих) узлов, около 4200 узлов-посредников, в том числе примерно 900 выходных узлов.

На картинке упрощённая схема работы Тоr
004.jpg


Отмечу, что обратно траффик идет в открытом виде, на выходном узле он зашифровывается временным симметричным ключом и передается по цепочке (да-да, непосредственно сам траффик шифруется на симметричных ключах, а эти ключи шифруются уже на ассиметричных ключах).

Тоr ругают потому, что требуют от него слишком многого: безопасно передавать в сеть траффик любых приложений, защиты от глобального наблюдателя, конфиденциальности передаваемых данных и пр. Но он решает главную задачу при своей модели угроз: достаточно высокий уровень анонимности клиента при передаче только http-траффика при соблюдении всех обязательных правил: www.torproject.org/download/download-easy.html.en

Плюсы Tor
:
  • высокая степень анонимности клиента при соблюдении всех правил;
  • простота использования (скачал Tor Browser Bundle, запустил и пользуйся).


Минусы Tor:
  • выходной траффик прослушивается;
  • низкая скорость;
  • наличие управляющих серверов.
На одном из форумов я нашёл опрос, касающийся Tor. Количество опрошенных не говорит о достоверности результатов, однако победивший ответ весьма правильный :)
005.jpg

Работу Tor неизменно сопровождают сомнения людей в его надежности и анонимности. Сейчас мы не будем его подробно разбирать, я обещаю сделать это в следующих статьях цикла, где подробно опишу некоторые важные детали Tor и постараюсь ответить на все вопросы.

I2P

Про I2P было сказано много слов, буду лаконичен и постараюсь объяснить все наглядно.

I2P — это анонимная сеть, работающая поверх Интернета. В ней есть свои сайты, форумы и другие сервисы. По своей архитектуре она полностью децентрализована, также в I2P нигде не используются ip-адреса.

В I2P есть два главных понятия:

  • «туннель» – это временный однонаправленный путь через некоторый список узлов. Туннели бывают входящие и исходящие;
  • «сетевая база NetDb», которая в той или иной мере распределена по всем клиентам I2P. Её цель – хранение информации о том, как клиенту соединиться с определенным адресатом.
База NetDb хранит в себе:

  • RouterInfos – контактные данные роутеров (клиентов), используются для построения туннелей (упрощая, они представляют собой криптографические идентификаторы каждого узла);
  • LeaseSets – контактные данные адресатов, используются для связи исходящих и входящих туннелей.
На начало 2013 года I2P включала в себя 25.000 роутеров и 3.000 LeaseSets.

Расскажу про алгоритм взаимодействия узлов:

Шаг первый. Узел «Kate» строит исходящие туннели. Она обращается к NetDb за данными о роутерах и строит туннель с их участием.
006.jpg


Шаг второй. «Boris» строит входной туннель аналогично тому, как и строится исходящий туннель. Затем он публикует свои координаты или так называемый «LeaseSet» в NetDb (здесь отметьте, что LeaseSet передается через исходящий туннель).

007.jpg


Шаг третий. Когда «Kate» хочет оправить сообщение «Boris’у», она запрашивает в NetDb LeaseSet «Boris’а». И по исходящим туннелям пересылает сообщение к шлюзу адресата.
008.jpg


У I2P есть возможность выхода в Интернет через специальные Outproxy, но они неофициальные и по совокупности факторов даже хуже выходных узлов Тоr. Разработчики I2P говорят: «Хотите Интернет – используйте Тоr».

Плюсы I2P:

  • высокая степень анонимности клиента;
  • полная децентрализация, что ведёт к устойчивости сети;
  • конфиденциальность данных: сквозное шифрование между клиентом и адресатом.
Минусы I2P:
  • низкая скорость;
  • «свой Интернет».
Подробно об I2P, в том числе и о механизмах защиты, а с ними у I2P всё хорошо, я тоже расскажу в следующих статьях цикла.

Иные средства
На самом деле существовали и существуют десятки отдельных проектов, посвященных анонимности в Интернете, это не считая «дополнений в браузерах» и «программ для анонимности». Просто другие, менее популярные, решения либо уже скомпрометированы, либо еще не так популярны, а следовательно — и не изучены мировым экспертным сообществом, чтобы говорить об их достаточной надежности. Сейчас активно развиваются следующие наиболее перспективные проекты:

  • Freenet freenetproject.org
  • GNUnet gnunet.org
  • JAP (Он же — John Donym, в основе — Tor) anon.inf.tu-dresden.de/index_en.html
  • RetroShare retroshare.sourceforge.net
  • Perfect Dark www21.atwiki.jp/botubotubotubotu


Отдельным интересным примером анонимных сетей являются сети, построенные на основе Wi-Fi. Тогда как при традиционном подходе транспортные функции любой анонимной сети выполняет Интернет, использование беспроводных решений позволяет достичь независимости от Интернет-провайдеров:

  • проект Byzantium: project-byzantium.org
  • проект Netsukuku — Networked Electronic Technician Skilled in Ultimate Killing, Utility and Kamikaze Uplinking: netsukuku.freaknet.org
  • проект B.A.T.M.A.N — Better Approach To Mobile Ad-hoc Networking: [DLMURL]https://www.open-mesh.org/projects/open-mesh/wiki[/DLMURL]
Централизованные средства «анонимности»
Сразу отмечу главное: никакое централизованное решение высокий уровень анонимности обеспечить не может, так как необходимо доверять центральному узлу.

Мы не будем рассуждать об организационных, политических и бюрократических сложностях на пути раскрытия анонимности.

Возможно, VPN-сервер в Панаме действительно более безопасен, чем такой же сервер в Испании. А возможно — нет.

Также как и не будем говорить про цепочки узлов, так как их надежность с трудом поддаётся оценке. С одной стороны, в виду организационных сложностей, риск раскрытия ниже, а с другой — мы должны быть достаточно уверены в каждом узле.

Перейдём к конкретике.



Прокси-серверы: http и SOCKSx
Рассмотрим подробнее http-заголовки в http-прокси.

HTTP-заголовок – это строка в http-сообщении с некоторыми параметрами вида: «Имя: Значение». Заголовков существуют достаточно много, ими при взаимодействии обмениваются между собой клиенты и серверы.

Например, следующее поле: «Date: Sat, 12 Dec 2012 15:41:52 GMT» возвращает от сервера клиенту текущее время и дату.

Один из таких заголовков: X-Forwarded-For, по сути, является стандартом для получения сервером оригинального адреса клиента при доступе к серверу через HTTP-прокси. И вот в этом заголовке, если его не фильтровать, передаётся вся цепочка прокси-серверов от начала до конца, например:

  • X-Forwarded-For: client1, proxy1, proxy2 …
  • X-Forwarded-For: 169.78.138.66, 169.78.64.103...


Также к заголовкам, разглашающим деанонимизирующую информацию, относятся: HTTP_VIA, HTTP_FORWARDED и др.



HTTP-прокси-серверы, которые скрывают ip-адрес клиента, называют анонимными. Такие серверы подразделяются на виды, деление это весьма условно, но, тем не менее, существуют:

  • Простые анонимные прокси (anonymous). Эти серверы не скрывают факта использования http-прокси, однако они подменяют ip-адрес клиента на свой.
  • Элитные анонимные (high anonymous/elite). Такие серверы ещё скрывают и сам факт использования http-прокси.


SOCKS-прокси, как вы помните, никаких заголовков не передают.



Рассмотрим разницу между SOCKS 4, 4a и 5. Существуют разные версии SOCKS:

  • SOCKS4. Такие серверы требуют от клиента, например, веб-браузера, только ip-адрес ресурса, к которому он обращается (адресата). Следовательно, клиенту надо как-то этот ip-адрес узнать, а узнать его клиент может только прямым DNS-запросом в обход прокси. Это может привести к деанонимизации, так как интернет-провайдер может видеть DNS-запросы в открытом виде, данная уязвимость называется DNS-leaks, она описана далее, во второй части статьи.
  • SOCKS4a. Является расширением SOCKS4. Главное отличие состоит в том, что SOCKS4a-сервер принимает от клиента только DNS-имя адресата, а не его ip-адрес. Это бывает необходимо, когда клиент не может самостоятельно определить ip-адрес адресата по DNS-имени.
  • SOCKS5. Также является расширением SOCKS4. Сервер SOCKS5 поддерживает UDP, IPv6, авторизацию и пр. И хотя SOCKS5-прокси могут принимать от клиента как ip-адрес, так и DNS-имя целевого ресурса, некоторые приложения, поддерживающие SOCKS5, могут сами получать ip-адрес адресата до того, как обратиться к SOCKS5-прокси, что также может привести к утечке DNS-запросов.


SSH. Сравнение SSH и VPN
SSH туннель — это туннель, создаваемый посредством SSH-соединения и используемый для шифрования передаваемых данных. Как гласит одноимённая статья в Википедии: «SSH (англ. Secure SHell — «безопасная оболочка») — сетевой протокол прикладного уровня, позволяющий производить удалённое управление операционной системой и туннелирование TCP-соединений (например, для передачи файлов)».

При использовании SSH-туннеля открытый траффик какого-либо протокола шифруется на одном конце SSH-соединения, клиенте, и расшифровывается на другом, SSH-сервере.

Схема работы SSH-туннеля показана на рисунке:
009.jpg

Протокол SSH поддерживает несколько вариантов работы:

  • В первом варианте туннелируемое приложение должно иметь настройки HTTP/SOCKS-прокси для направления траффика через локальный прокси-сервер в SSH-туннель. Если таких настроек нет, то можно использовать программы-соксификаторы, которые отправляют траффик через прокси-сервер.
  • Во втором случае можно организовать практически полноценное VPN-соединение и обойтись без настройки SOCKS. Начиная с версии 4.3, открытая реализация SSH, OpenSSH, может использовать туннельные сетевые интерфейсы 2-го и 3-го уровней модели OSI, то есть организовывать аналоги VPN-соединений.


Сравним VPN и SSH с точки зрения анонимности.



Цели

Исторически VPN и SSH предназначались для разных целей, что и объясняет их плюсы и минусы.

  • VPN призван обеспечить защищённый удалённый доступ к ресурсам корпоративной сети. Как только компьютер подключается к VPN-серверу, он становится частью «локальной» сети, а, следовательно, может получать все её сервисы: общие ресурсы, локальный сервис VoIP, также становятся возможными NetBios-, UDP-, и широковещательные запросы, единые VPN-политики и т.д. Через VPN в большинстве случаев отправляется траффик всей операционной системы и приложений.
  • SSH изначально предназначался для защищенного удаленного управления устройствами. SSH-соединение — это соединение с «конкретным устройством», а не с «сетью». Хотя мастера SSH могут делать с помощью него много крутых вещей.
Безопасность

Протоколы VPN и SSH достаточно безопасны за исключением разве что PPTP. Большинство возможных атак сводится к [DLMURL="https://anonym.to?https://en.wikipedia.org/wiki/Man-in-the-middle_attack"]Man-in-the-middle[/DLMURL] и подмене сертификатов или ключей, однако это проблема аутентификации и внимательности пользователя.

Удобство

Удобство — понятие условное и субъективное, оно зависит от ваших целей и опыта.

010.jpg


К VPN-серверу легко подключиться, но для новичков может быть непросто его настроить.

Тогда как SSH-сервер более прост в настройке, но, например, вручную настраивать SSH-туннель для каждого приложения кому-то может показаться не совсем удобным.



Скорость

Скорость каждого средства зависит от конкретной реализации и используемых протоколов. Если сравнивать SSH и OpenVPN, поделюсь уже проведённым [DLMURL="https://anonym.to?https://inportb.com/2009/09/04/ssh-or-vpn/"]исследованием[/DLMURL]:

  • network — 96.5 Mbps.
  • network/SSH — 94.2 Mbps.
  • network/VPN — 32.4 Mbps.


Подводя итог, стоит отметить, что VPN-серверы более популярны, чем SSH. В интернете существует много коммерческих VPN-провайдеров. Однако и SSH-туннели тоже продаются в избытке на специализированных форумах.

Что разворачивать на своём сервере в Антарктиде — дело ваше.



Полезный совет


Иногда бывает ситуация, когда VPN-соединение по каким-либо причинам может разрываться. Если в случае с прокси-сервером, сетевое взаимодействие прекращается, то в случае с VPN траффик продолжит идти напрямую. Наиболее надёжным вариантом для недопущения этого является использование таблицы маршрутизации, где в качестве основного шлюза по умолчанию указан только шлюз VPN-сервера.

Делается это просто:

1. Удаляем любые маршруты по умолчанию:
011.jpg


2. Разрешаем доступ в интернет только к адресу VPN-сервера:
012.jpg


3. Добавляем маршрут по умолчанию со шлюзом – VPN-сервером:
013.jpg


Где: 192.168.0.1 — шлюз интернета, 55.55.55.55 — VPN-шлюз.

Еще одним способом является установка в свойствах открытого интернет-соединения несуществующих DNS-серверов, например, 127.0.0.1. В таком случае веб-сёрфинг и другие подобные задачи становятся невозможными без подключения к VPN-серверу.

Также существуют специальные программы, например, VPN-watcher, которые для заданных приложений проверяет VPN-соединение несколько раз в секунду и приостанавливает их работу, если VPN-соединение обрывается.

Спасибо за еще один способ [DLMURL="https://anonym.to?https://habrahabr.ru/users/Pongo/"]Pongo[/DLMURL]: "Еще один способ обезопасить себя от разрыва vpn — это настройка файрвола. Подойдет в том числе и стандартный windows firewall. Есть [DLMURL="https://anonym.to?https://practicalrambler.blogspot.ru/2011/05/how-to-block-all-internet-traffic.html"]инструкция с картинками[/DLMURL]. Причем блокирующие правила можно не создавать, а ограничиться 10-м пунктом. Для отдельных программ (например для openvpn) можно отдельно создать разрешающие правила, чтобы эти программы работали даже если впн не подключен."

Спасибо за еще один способ [DLMURL="https://anonym.to?https://habrahabr.ru/users/amarao/"]amarao[/DLMURL]: "Я думаю, если строить защищённую конструкцию, то следует просто выделять две сессии — защищённую и не защищённую. Лидера сессии положить в cgroups, откуда не-vpn интерфейс просто не доступен для использования — в этом случае информация будет отправляться только через этот интерфейс."

Деанонимизирующие данные и возможные уязвимости

Посмотрим, какую идентификационную информацию о себе мы можем передать в интернет. Я не буду рассматривать уязвимости (в том числе и 0day) в программах, эксплуатация которых может привести вообще к полному контролю за компьютером.

014.jpg

Общее


IP-адрес. Самый «популярный» идентификатор в сети. Его ценность может быть разной в различных ситуациях, но как правило именно раскрытием ip-адреса принято пугать сетевых «анонимусов».

Решение: со скрытием ip-адреса справляются средства, описанные в первой части этой статьи

DNS-leaks возникает [DLMURL="https://anonym.to?https://www.dnsleaktest.com/what-is-a-dns-leak.php"]тогда[/DLMURL], когда приложение может отправлять свои DNS-запросы, используя DNS-серверы интернет-провайдера. Так часто бывает, когда люди через локальный прокси-сервер (привет, SOCKS 4, 5!) пытаются отправить в сеть Tor траффик различных приложений, которые резолвят DNS-имена в обход Tor.

Проверить, подвержены ли вы этой утечке можно здесь: [DLMURL]https://www.dnsleaktest.com[/DLMURL]

Решение: при работе с VPN-соединением наиболее удобным вариантом является принудительное использование статических DNS-серверов VPN-провайдера либо, если VPN-сервер у вас личный, использование серверов OpenDNS (208.67.222.222, 208.67.222.220) или DNS Google (8.8.8.8, 8.8.4.4).

Чтобы не допустить подобных утечек в Tor, рекомендуется использовать Tor Browser Bundle либо, если уж хочется отправить в Tor траффик другого приложения, то наиболее безопасным и универсальным вариантов является изолирующий прокси, который будет рассмотрен в одной из следующих статей.

В сети I2P DNS-запросов нет. При работе с outproxy DNS-запросы выполняются на самом outproxy.

Спасибо за совет [DLMURL="https://anonym.to?https://habrahabr.ru/users/Rulin/"]Rulin[/DLMURL]: "… при использовании Socks прокси в Firefox, DNS-leaks будет по умолчанию происходить, чтоб от этого избавиться, надо: В адресной строке набираем about:config, Жмем «I'll be careful, I promise!»,

Находим опцию network.proxy.socks, Двойным кликом меняем значение на true,

Все, теперь при использовании socks прокси, dns запросы будут тоже ходить через socks".

Настройка «network.proxy.socks_remote_dns» определяет, где будут выполняться DNS-запросы при использовании SOCKS5. Значение «True» устанавливает, что они будут выполняться через SOCKS-прокси, а не на клиенте.



Профилирование возникает, когда большая часть траффика долго выходит в интернет через один узел, например, Тоr. Тогда появляется возможность отнести увиденную активность к одному псевдониму. Выходной узел может и не знать ваш ip-адрес, но будет знать, что вы делаете.

Решение: не использовать постоянные цепочки Tor, регулярно менять выходные узлы (VPN-серверы, прокси-серверы), либо, забегая вперёд, использовать дистрибутив [DLMURL="https://anonym.to?https://sourceforge.net/projects/whonix/"]Whonix[/DLMURL].

MitM-атаки направлены на прослушивание и модификацию траффика на выходном узле, например Tor или любом прокси-сервере. Интересным вариантом является модификация выходным узлом цифровых подписей, GPG- или SSL-отпечатков, хеш-сумм скачиваемых файлов.

Решение: быть внимательным при появлении предупреждений о валидности сертификатов и ключей.

Деанонимизирующая активность в анонимном сеансе. Например, когда клиент из анонимного сеанса заходит на свою страницу в соцети, то его интернет-провайдер об этом не узнает. Но соцсеть, несмотря на то, что не видит реальный ip-адрес клиента, точно знает, кто зашёл.

Решение: не допускать никакой левой активности в анонимном сеансе.

Одновременное подключение по анонимному и открытому каналу. В таком случае, например, при обрыве интернет-соединения, оборвутся оба соединения клиента с одним ресурсом. По данному факту серверу будет нетрудно вычислить и сопоставить два одновременно завершенных соединения и вычислить реальный адрес.

Решение: не допускать одновременного подключения к ресурсу по анонимному и открытому каналу.



Определение авторства текста. Подробнее [DLMURL="https://anonym.to?https://habrahabr.ru/post/165435/"]здесь[/DLMURL]. Приложение может сравнить текст написанный анонимно и другой открытый текст, точно принадлежащий автору, и определить с высокой степень вероятности совпадение авторства.

Решение: шутки-шутками, но эта тема пока не достаточно изучена. Можно посоветовать прятать текст, который можно однозначно связать с вами. Тогда не с чем будет сравнивать и анонимный текст.



MAC-адрес сетевого интерфейса становится известен wi-fi точке доступа при подключении к ней клиента.

Решение: если переживаете за то, что точка доступа запомнит MAC-адрес вашего интерфейса, просто поменяйте его до подключения.

На этом ресурсе, посвящённом нашей «цифровой тени»: myshadow.org/trace-my-shadow , помимо всего прочего, мы можем увидеть, какие данные передаём о себе в сеть:
015.jpg


Что могут рассказать Браузеры?


Cookies — это текстовые файлы с какими-либо значениями, хранимые приложением (часто — браузером) для разных задач, например, аутентификации. Часто бывает, что клиент сначала посетил ресурс из открытого сеанса, браузер сохранил cookies, а потом клиент соединился из анонимного сеанса, тогда сервер может сопоставить cookies и вычислить клиента.

Более того, существуют так называемые 3rd-party cookies, которые сохраняются у нас, например, после просмотра рекламного баннера с другого сайта (3rd-party). И сайт-владелец этого баннера способен отслеживать нас на всех ресурсах, где размещёны его баннеры.

Тем, кто хочет изучить тему cookies подробнее, советую почитать статьи:

  • [DLMURL="https://anonym.to?https://habrahabr.ru/post/190488/"]Cookie без куков[/DLMURL].
  • [DLMURL="https://anonym.to?https://habrahabr.ru/post/126643/"]Постоянные неблокируемые cookie с использованием HTTP-заголовков[/DLMURL].
  • [DLMURL="https://anonym.to?https://habrahabr.ru/post/104725/"]Evercookie — самые устойчивые куки[/DLMURL].

Flash, Java, Adobe. Эти плагины являются по сути отдельными приложениями, которые запускаются от имени пользователя. Они могут обходить настройки прокси, хранить свои отдельные долгоживущие cookies (Flash — Local Shared Objects) и пр. О регулярно публикуемых в них уязвимостях говорить излишне.

Fingerprint (отпечаток) браузера. Браузер предоставляет серверу десятки категорий данных, в том числе и так называемый [DLMURL="https://en.wikipedia.org/wiki/User_agent"]user agent[/DLMURL]. Всё это может сформировать достаточно уникальный «цифровой отпечаток браузера», по которому его можно найти среди многих других уже в анонимном сеансе.

Какие именно данные отправляет ваш браузер серверу, можно посмотреть, например, здесь, здесь (он же panopticlick.eff.org) и здесь.

Скрипты Javascript, исполняемые на стороне клиента, могут собрать для сервера еще больше информации, в том числе и явно его идентифицирующей. Более того, если посещаемый нами сайт подвержен [DLMURL="https://en.wikipedia.org/wiki/Cross-site_scripting"]XSS[/DLMURL], то включенные на нём скрипты Javascript помогут злоумышленнику провести успешную атаку со всеми вытекающими последствиями.

Web Bugs — это невидимые детали веб-страниц, используемые для мониторинга посещений сайта, способны дополнительно отсылать серверу разные данные о клиенте. Web Bugs от Гугла широко распространены по всему интернету.

HTTP-referer — это http-заголовок, с помощью которого веб-сайт может определить, откуда к нему идёт траффик. То есть, если вы кликнули по ссылке, которая передает http referer, то сайт, на который данная ссылка ведёт, сможет узнать, с какого именно сайта вы на него перешли.

Решение: про безопасную настройку каждого из браузеров, включая блокировку каждой из вышеописанных категорий идентифицирующих данных, очень подробно и ясно написано на ресурсе: fixtracking.com, от замечательного поисковика DuckDuckGo:
016.jpg

Приложения


Важно понимать, что изначально многие приложения задумывались и проектировались не столько для обеспечения анонимности, сколько для нормальной и эффективной работы в «трудных» сетевых условиях: обхода блокирующих межсетевых экранов, прокси-серверов.

В качестве примера я приведу лишь малую часть приложений, которые могут самостоятельно передавать в сеть идентифицирующие нас данные.

  • Некоторые клиенты BitTorrent игнорируют настройки прокси, отправляя траффик по открытым каналам.
  • Windows Update отсылает серверу десяток категорий данных, включая уникальный 128-битный идентификатор (GUID). Windows Update также уязвим к MitM, а следовательно, выходной узел, например, Tor, может быть источником атаки.
  • Лицензионные ключи платных или серийные номера бесплатных приложений также могут передаваться в интернет, например, при активации или обновлении, тем самым идентифицируя пользователя.
  • Windows Media Player может самостоятельно запрашивать информацию о музыке или обменивается служебными данными.
  • Данные о часовом поясе могут передаваться при использовании IRC-чата через протокол CTCP, Client-to-client protocol.
  • Дамп оперативной памяти ОС Windows, отправляемый в случае ошибки, также содержит идентифицирующие данные.
  • Метаданные файлов могут включать важные данные: дата создания, авторство и пр.
Решение: не использовать в анонимном сеансе любое недоверенное и непроверенное приложение.