Обновить

Analysis of an attack on an I2P user

Время на прочтение 7 min
Количество просмотров 15K

The history of the I2P network dates back to 2003, and therefore has become overgrown with rumors, speculation and articles about vulnerabilities, some of which are no longer relevant. Before starting the main story, we will identify solved problems, the mention of which you can still find. Don't let them bother you.

Common Misconceptions

Tale number one: I2P does not scale well and with a large increase in nodes the network will be paralyzed, because reference nodes - floodfills - cannot cope with the flow of information. They say I2P only works until it’s popular, but as soon as the total load grows, the network will collapse.

F - floodphiles
F - floodphiles

In fact, the number of floodfills grows along with the network, and to access a specific hidden service, all floodfills are not required at all. Each hidden service publishes its full address (called a LeaseSet) on the two floodfills that are closest in DHT. In turn, the DHT coordinates change every day almost randomly.
When receiving a published LeaseSet, each of the two floodfills duplicates the information to the other three floodfills, which are the closest in a logical sense. In total, the LeaseSet is published on no less than four almost random routers, which are accessed when searching for the address of a specific site or other hidden resource. In short: the network is distributed and the resources for processing LeaseSets grow along with the total number of nodes. Since the beginning of the story about the poor scalability of I2P, the network has grown many times and still remains functional without any hint of floodfill overload. It’s also worth adding that a transition to new encryption is underway, designed to reduce the load on floodfills.

Tale number two: The router on which a particular hidden service is located can be determined by the router's encryption key in the LeaseSet of the hidden resource. The model is based on the fact that onion encryption used in tunnels is not sufficient, and first of all, end-to-end encryption is applied to the message with the router key, which must decrypt the message and transmit it to the local endpoint.

It is understood that the keys for hidden services are unique, but the router has only one and, having the identifier of this key, you can track other user tunnels. In fact, this threat was eliminated in the early stages of I2P development. A modern LeaseSet contains an encryption key that is in no way connected to the router. A unique key is used for each hidden service, so comparing the keys from the LeaseSets of various hidden services of the same administrator does not give rise to assumptions that they are located on the same router.

Tale number three: I2P tunnels can be intercepted. Interception does not mean decrypting traffic, but identifying the owner of the tunnel. The attack requires the maximum possible number of routers with good uptime for their constant participation in transit tunnels. The essence of the attack is to wait for the moment when the victim’s tunnel will consist mostly (or entirely) of malicious routers. Transit nodes do not know anything about the total number of routers in the chain, but the default length of tunnels is three hops. If we assume that three routers controlled by an attacker communicate with each other within the same tunnel, he can with a high probability assume that the end link of the known chain is the owner of the tunnel.

In the event of interception of the user's outgoing tunnel, an attacker can find out where the user is accessing if, by incredible luck, at that moment he knows a LeaseSet containing data from the input tunnel of a hidden resource, which coincides with those where the information is being transmitted right now. In fact, this attack is practically impossible at the moment, when the number of nodes in the network is many tens of thousands. With any kind of tunnel interception, it is impossible to say with complete certainty that the node assumed to be the owner of the tunnel is not just another transit router. Also, such an attack cannot be called targeted, but rather random, unpredictable and very costly. The chance of any successful execution always remains negligible.

Reseed

The easiest way to combat I2P is to block resid servers, one of which is contacted for the initial network pattern when the router is first started. Resid is an archive with a number of routerInfo files, essentially a package with information about random routers through which the first user tunnels are built and the automatic expansion of the local network base begins. All resid servers are run by enthusiasts, and the resid addresses themselves are publicly available. They are accessed by domain names and known IP addresses, so collecting everything in a list and centrally blocking it is not a difficult task. However, making the first launch difficult does not mean blocking the operation of the I2P network! In case of blocking, the use of a proxy is supported when accessing the resid, which easily allows you to bypass the restrictions of the local provider. In addition, any router can be launched with an existing network base, for example, taken from another I2P router. A new step in the fight against possible blocking is the use of additional encrypted communication channels. Currently, such a tool is the Yggdrasil Network, which serves not only to access the resid, but also to fully use the I2P network. To an outside observer, Yggdrasil's activity is comparable to a VPN connection. At the time of publication of the article, work I2P via Yggdrsail and proxies are implemented only in i2pd, which is an additional argument against an outdated Java router.

The second scenario for manipulating the resid is an attempt to intercept an archive with routers on the way to the user in order to damage or replace it. The HTTPS protocol, as well as a cryptographic signature, protects against this. Certificates of resid server holders, i.e. their cryptographic identities are distributed complete with the I2P router. After receiving the start packet, the router checks its signature. If the signature matches the certificate, you can be sure that the resid has not been replaced.

Receiver holders are ordinary users, enthusiasts. They do not undergo any verification and most often remain incognito. The relevance of resid servers is regularly checked by the community and, in case of malfunction, the server will be removed from the list in the next release of the I2P router.

Sibyl Attack and Eclipse

The Sybil attack and the Eclipse attack have similar implementations. Their meaning is to flood the network with nodes controlled by the attacker, which will work for one goal: to keep the user in the sandbox. Isolation routers do not report information about regular nodes to prevent the user from breaking the blockade. This allows you to monitor the list of resources that the attacked user hosts on his router, as well as the list of those that he visits. To obtain information about the entrance tunnels of a hidden resource, you need to obtain its lysset from the nearest floodfill, as well as publish the lysset of your resource so that it can be found.

In the event of a successful attack, all user tunnels consist of nodes controlled by the attacker, as well as available floodfills. The main difference between the Sibyl attack and the Eclipse is that the Sibyl model is not aimed at a previously known user, while the Eclipse, on the contrary, implies the isolation of an initially known target. In any case, the above attack models imply the use of modified I2P routers and high literacy of the attacker. Moving away from the generalized theory, let us examine the possibility of these threats being realized..

The Eclipse attack can be considered impossible to implement in practice. This is due to the resid system, which are protected from interception. In the case when the router makes the first start with a copied network base, i.e. in fact, with a starter package not from a well-known resid, but from another I2P router, we will assume that the source is a priori reliable. It is logical to conclude that a starter package from an untrusted source should not be used. If we assume that the attacker plays the role of an enthusiast and places a well-known resid server, it should be especially noted that the I2P router uses several independent receivers, one of which is selected randomly. This makes the likelihood of a targeted attack extremely small, which makes the point of trying to carry it out lost..

A Sybil attack aimed at monitoring the network in general seems more suitable for the malicious resid model just described. But upon closer examination, it turns out that the profit of a fake resid will not recoup the funds spent on its organization. Firstly, it is necessary to have large capacities in order to introduce the maximum possible number of controlled nodes into the network. Secondly, it is necessary to develop software that will flexibly combine information collected from controlled nodes into one database. Thirdly, an attack aimed at analysis requires a long duration, which will not work, because The malicious resid will soon be identified by the community. The most obvious sign of such an attack is a non-increasing, or too small, number of known routers that is displayed in the web console. In the paranoid case, you should delete the entire local router database, which is stored in the netDb folder, and restart the router, which will trigger a new call to a random resid. If you have good reason to believe that a particular resid has been compromised, be sure to report it to the developer community. At the time of publication of this article, not a single attempt of such an attack had been registered..

Java router destination attack

The last attack model is very complex, but critically dangerous if executed successfully. The problem was disclosed by the leading developer of I2Pd and is not present in the C++ router, but has not been fixed in the Java router for a long time. The model allows you to determine the fact that two or more endpoints are on the same router, i.e. actually determine that multiple anonymous entities are physically located on the same computer. The attack possibility is that all the LeaseSets in the Java router are stored in one place.

As part of the attack, a full call is made to some endpoint (in English terminology - destination), which responds and saves the attacker's LeaseSet. The other endpoint is then contacted, but the LeaseSet for the response is not communicated, and logically there should be no response. If a response is received, the attacker can confidently conclude that the responding endpoint, which was not sent a LeaseSet to respond, is on the same router as the first resource that was given a LeaseSet.

In I2Pd, the problem is solved simply and elegantly: for each endpoint, a separate LeaseSet storage is created, which cannot be accessed by other hidden services located on the router.


Upon closer examination of the frequently mentioned threats, it turned out that there are much fewer vulnerabilities in I2P than pseudo-experts like to say. Support free projects, report bugs and shortcomings. Free software is when there is no funding and most often without advertising, but it is conscientious. Don't forget that SMS during registration is not the norm!

The material is compiled from text and illustrations from video.

Tags:
Hubs:
Всего голосов 27: ↑25 и ↓2 +23
Комментарии 20
+20

Comments 20

Better yet, tell me when I2P speed will become acceptable? I use I2P rarely, but for a very long time - and for some reason I don’t see any fundamental changes, it slowed down to the point of “barely possible to use”, and continues to slow down.

Have you ever wondered why planes are poorly suited for diving??
Answer: Network speed is not a priority. But work in this direction is underway.


And there can be many different reasons

So the standard node setting is speed limit 32 kilobytes per second. This is good in the sense that almost anyone can donate to such a channel. But if you don’t ask users to increase the limit if they have the opportunity and desire, then I think we can wait a long time for network acceleration.

And I2P cannot send each packet or series of packets along different routes so that the restrictions of intermediate nodes do not affect communication?

Each router has special flags by which other participants learn about its throughput. For user tunnels, nodes with a speed of 32 kb/sec are not selected. Such a low speed most likely indicates that the router is installed on a smartphone or a household computer with a weak connection, and therefore can be used as a transit only for “probing” (research) tunnels, which do not require a large channel width and can be cut off without discomfort for the user.


When an administrator places a router on a server with a good channel, he should manually change the bandwidth parameters in the I2P router config, then good transit traffic will flow through his node. This is done not only out of sheer enthusiasm, but also for practical reasons: the more transit traffic on a router, the more impossible it is to try to identify the traffic of hidden nodes located on this router. Imagine that the transit stream is stable at 1Mb/sec with several thousand active connections, and someone is trying to monitor the activity of your server by opening a 250Kb image located on your hidden service. The observer will not see any external manifestations indicating that the picture was downloaded from you: the same noise of encrypted messages with a thousand other routers.

Are there any plans that i2p will not work in java? For example go, rust?

I tried the router on the pluses. It worked without problems on the old tablet. There are no words here.
>> Tale number three:

There is a vulnerability in the torus that if you collect statistics from the tunnels for a long time, you can calculate both the client and the server, simply by analyzing the amount of traffic, its frequency and intensity.
This won't work here?

There is a vulnerability in TOP that it is entirely tied to the starting and consensus nodes of the Office))


In I2P, the attack you named will give absolutely nothing, but on a large scale it can be considered as some implementation of the Eclipse attack or Sybil attack, which are also akin to an ineffective utopia, the implementation of which will require incredible resources.

In Tor, one of the functions of the central servers is to check the throughput of nodes. Will I2P be able to adapt to a situation where the user sets the bandwidth to “X” or “P”, despite the fact that the real capabilities of his Internet channel will be close to the value “L”"?

Good question. I'm guessing offhand that he can't. However, this is a logical monitoring item for a profiler that maintains local statistics of known hosts for use in selecting hosts for tunnels. Is there a similar testing procedure? I'm not sure.)

>entirely tied to the starting and consensus nodes of the Office))

Just like torrents. There is a bootstrap node.

router.bittorrent.com:6881 67.215.246.10
dht.transmissionbt.com:6881 212.129.33.59 87.98.162.88 2001:41d0:c:5ac:5::1
dht.aelitis.com 174.129.43.152 // Vuze
router.silotis.us:6881", // IPv6
router.utorrent.com:6881 82.221.103.244
router.bitcomet.com
dht.libtorrent.org:25401 // @arvidn's

I don't know about i2p.

In a good torrent client, the bootstrap node is needed once on the first launch of the client after installation. Next, to enter DHT, the set of nodes dialed in the previous session is used.

The question is not whether they are used, but whether the network can exist without them.

I2P can exist without bootstraps, provided that users manually provide new participants with their local network bases to start with :)

In fact, this attack is practically impossible at the moment, when the number of nodes in the network is many tens of thousands.

Hmm, that is. Having tens of thousands of nodes under your control, can you already collect data for this attack? Keeping tens of thousands of nodes is not that expensive, VPS will cost 30-40 thousand dollars at this scale, quite reasonable money for intelligence agencies.


In general, we can calculate the probabilities when, having n nodes out of m under control, we will obtain the detection of chains of x hops with a probability greater than t.

Yes, if there are 10 thousand nodes, the attack designated as “Tale number three” can be carried out, but with a caveat:


With any kind of tunnel interception, it is impossible to say with complete certainty that the node assumed to be the owner of the tunnel is not just another transit router.

The operation is expensive and requires the use of modified routers, as well as software for systematizing information. This is really within the power of law enforcement agencies and only them.
However, if I were a major, it’s not a fact that I would do this, because the actual number of routers on the network is almost impossible to count (the variable m in your example always has a large error), and the attack will not provide actual data in any case, because solves the issue with encrypted traffic. In total, it turns out that in the most successful scenario, it will show no more than a regular Internet provider with clearnet - the fact of visiting a certain resource. And it’s not a fact that it was you, and not another hop behind your back.

I don't understand why "this requires a modified router" is given as an argument (both here and in the main article). Big Brother let the hydra float freely and developed a torus. Fixing routers is such a non-issue for them that there is no point in mentioning it. But it makes sense to mention a prism that shows that they have more than enough motivation. Perfect Dark doesn’t have any sources for comparison, and that didn’t stop them from making arrests for copying. The question is not even whether the services have special routers, but how many resources within the network they own. I bet there's a lot

Only full-fledged users can leave comments. Sign in, Please.

Publications

Reading now

Stories

Goodness from company blogs
Now say: “I accept the offer.”»
Перевернуть календарь и добавить событие
Менторство в IT
Битва пет-проектов