View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003919 | Freenet | security | public | 2010-02-17 16:41 | 2021-11-04 16:20 |
| Reporter | toad | Assigned To | ArneBab | ||
| Priority | high | Severity | major | ||
| Status | resolved | Resolution | fixed | ||
| Target Version | 0.9 | ||||
| Summary | 0003919: Swapping: fix the Pitch Black attack | ||||
| Description | Current Status: Mitigated. See the comments. | ||||
| Tags | darknet, security, swapping | ||||
| related to | 0001825 | new | Faster swapping algorithms | |
| related to | 0003916 | new | Implement targeted swapping (concave or mixed) from vive's paper | |
| related to | 0000302 | resolved | toad | Securing the swapping algorithm |
| related to | 0001672 | confirmed | Swapping must resist active clustering attack | |
| related to | 0004621 | new | Make darknet easy and fast | |
| related to | 0005697 | new | Investigate new swapping-replacement algorithm | |
| related to | 0006048 | new | How to secure probe requests? | |
| related to | 0006156 | new | Determine the number of nodes, or average spacing between nodes in keyspace, reliably (and ideally cheaply) | |
| related to | 0006226 | new | routing in deep darknet pockets |
|
We need to be careful here. A pitch black style attack that succeeds in causing only a minor shift in locations may have a significant impact on request success rates. Given O(1) peers per node, Freenet requires O(log^2(N)) hops to find data. If we limit HTL to O(log^2(N)), then only nodes within distance O(1/N) of the ideal node can be reliably searched. That means we need to limit the ability of the attacker to shift locations to O(1/N) at worst, and ideally something more like O(1/(n*log(n))). The best approach for the attacker might not be to simply try to concentrate locations near one chosen region (making other regions less reliable), but instead to first concentrate slightly near one region, then shift to a different region, causing data stored during the first portion to be unreachable. We need to quantify not only the amount of location bias an attacker can introduce, but how that bias scales with network size, both for an attacker with fixed resources and for one with O(N) resources. For example, if an attacker can introduce O(log(N)/N) location drift, then finding data requires searching roughly O(log(N)) nodes near the ideal location, which means the network goes from O(log^2(N)) route length to O(log^3(N)). We should also investigate both with and without bloom filter sharing, though I suspect bloom filter sharing has an O(1) effect on route length regardless. |
|
|
Oskar has proposed a solution involving probing and selective randomisation. He is skeptical that faster swapping algorithms on their own (or combined with throttling) will fix it. Pick a key randomly, route for it with a special query that returns the To make this more failsafe, one could choose K random keys, and compare the |
|
|
Hopefully simulations will happen now that our PETS paper was rejected partly on the grounds that our swapping security sucks. We need to simulate this potential solution and demonstrate that it fixes the attack, and get a paper out about it. And then we need to implement it. |
|
|
I like the idea, but... Consider an attacker who has already mostly successfully executed the attack and is trying to maintain it. He chooses locations for his nodes (we assume he has several, but limited resources) that are a mix of nodes in the empty space and at the borders of the empty space. The routed location-seeking requests will, with high probability, be routed to one of his nodes. He can then fake the response to make it seem correct. My hunch is he can do a fairly decent job maintaining the corrupted network. The obvious question is, can he get it there? I suspect he can, but clearly simulation work is required. (The semi-corrupted network may be a more difficult playing field for the attacker, since he can't intercept as large a fraction of the requests. I suspect this merely slows down the attack.) Note that the use of FOAF routing makes this easier for the attacker: his fake nodes can advertise a lot more locations than he has nodes, by judicious fakery of the FOAF lists. My best guess is that this is a step in the right direction, but something more complicated / clever is required to thwart the attack. |
|
|
I’d like to propose an alternative: • Each node has two locations. • They are compared at regular intervals far longer than the time between location-switches. • Only the location with the worse score does switches. The better one stays fixed. • After every comparision, the worse location chooses a new location at random and then does regular switching. If it doesn’t get better than the other location, the interval between comparisions is increased. • When it gets a better score, the time between comparisions is reset. • One measure for quality could be throughput or successful requests. When this gets hit by a pitch black attack, the switching node should be the worse node, so the other location would stay fixed and the switching would do optimization runs from random positions to the cluster the attacker wants, and revert at each comparision. The worst an attacker could then do is first introducing a small bias and then using the pitch black attack to make sure that the random location doesn’t find a better spot than the slightly biased one. The bias can’t be higher, though, than the quality which can be reached when switching from a starting location. The highest allowed bias in an attack would be an upper bound on the time between comparisions. The critical part in this scheme is the quality evaluation of the locations. If the attacker can twarth that, the scheme breaks. |
|
|
thesnark is working on this for a master's project over the summer. Hopefully he will come up with an algorithm and simulations proving that it works - or validate oskar's algorithm. |
|
|
[20:59:34] <zerwas> interesting lecture: "This talk will show that the recent 0.7 release of Freenet -- marketed to solve most of the problems -- entirely fails to deliver." https://www.youtube.com/watch?v=G9fAn0QO9WQ |
|
|
Oskar's algorithm seems to work. Before implementing, need to fetch his code and put it somewhere. [20:09:10] <toad> thesnark: did you have some summary data for me? if it takes hours to find it then I guess it isn't so summary ... => Contacted on 05/07/2013. |
|
|
Last lot of simulations were roughly:
I'm still waiting for the final report, which apparently requires new simulations. |
|
|
gerard_ may do some simulations on this. He is interested in using Freenet routing for routing packets. |
|
|
Link to Wanderlust (routing packets using Freenet's darknet routing): https://github.com/gerard-/wanderlust I'll be publishing my work there. Any simulation result will probably translate very well to Freenet as there is a lot of overlap. A description of possible attacks on Wanderlust is available here: My take on the Pitch Black attacks: We should limit the number of allowed swaps (and new nodes) so that the amount of entropy that an attacker can reduce with the attack is lower than the amount we can generate by changing the locations. Of course we still need to allow for enough swaps to self-organize the network. This is an interesting balance, and whether this is possible should be provable. Advantages of this method over Oskars idea are that it is simpler and that it prevents big jumps in locations for a node which could lead to routing problems or in the case of Freenet data loss. |
|
|
We already limit the number of swaps. It appears to be insufficient, given that the attacker can force the target to swap IIRC? I'm not sure, I never investigated Pitch Black in detail. |
|
|
This is as far as thesnark's work (on Oskar's fix) got: |
|
|
Did anyone download those graphs? The results sound like the pitch-black attack is effectively blocked with this approach, and given that Freenet can cope with 30% backoff, it should work with non-optimal link lengths — as long as they are not too bad. It’s not like the network really has to converge to the ideal solution to work well. |
|
|
<ArneBab_> https://gnunet.org/nse-techreport-2012 Efficient and Secure Decentralized Network Size Estimation ← should allow stopping the pitch black attack. |
|
|
proof that Oskars fix stops the Pitch Black Attack: http://127.0.0.1:8888/USK@sUm3oJISSEU4pl2Is9qa1eRoCLyz6r2LPkEqlXc3~oc,yBEbf-IJrcB8Pe~gAd53DEEHgbugUkFSHtzzLqnYlbs,AQACAAE/random_babcom/187/#FixedsimulationshowsthatSandbergsfixstopsthePitchBlackattack The link length distribution stays better than what we had for Opennet before the link length fix: http://127.0.0.1:8888/CHK@6yxbJzBufElCPYc1nfkRQTmx4QaC~iAlM4pwPy4m8IQ,sUuGgCErPTn51xhImo3vYv~LYolDk4YwHbKBqh0vITc,AAMC--8/pitch-black-attack-fix-works-with-a-fix-to-the-algorithm.png the node locations get skewed, but not unusably so: http://127.0.0.1:8888/CHK@qVziRFePFX6mziEJE6omukR0wEhO4wIB5c30-oSWyko,5Lzxn3cAVPilbMoPS8rbryBlb08QmjwvV9vab5fPK8o,AAMC--8/pitch-black-attack-fix-works-with-a-fix-to-the-algorithm-node-positions.png Using the median peer distance to detect the pitch black attack is quite a bit more effective than using the mean peer distance. By implementing the size estimation algorithm defined by the GNUnet folks using node-to-node messages for communication this should give good protection against the pitch black attack for darknets of any size |
|
|
To avoid losing data it might be useful to actively push the data to better nodes whenever we change the location (regardless of via swapping or via randomization). |
|
|
Here’s a clearnet link for the working simulation: http://www.draketo.de/light/english/freenet/mitigate-pitch-black-attack-simulation-works |
|
|
We know that the suggested fix should work, acknowledged by security researchers: https://emu.freenetproject.org/pipermail/devl/2016-April/038903.html We now need to implement it. |
|
|
The pitch black attack is mitigated and the mitigation deployed. This will provide the final test that verifies that: https://github.com/freenet/fred/pull/736 |
|
|
Fixed thanks to support from https://nlnet.nl/project/Freenet-Routing/ |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-02-17 16:41 | toad | New Issue | |
| 2010-02-17 16:41 | toad | Relationship added | related to 0001825 |
| 2010-02-17 19:27 | evand | Note Added: 0006743 | |
| 2010-02-17 19:29 | evand | Tag Attached: darknet | |
| 2010-02-17 19:29 | evand | Tag Attached: security | |
| 2010-02-17 19:29 | evand | Tag Attached: swapping | |
| 2010-04-08 15:54 | toad | Note Added: 0007010 | |
| 2010-04-08 15:55 | toad | Note Added: 0007012 | |
| 2010-04-08 17:52 | toad | Target Version | 0.10 => 0.9 |
| 2010-04-21 12:42 | evand | Relationship added | related to 0000302 |
| 2010-04-24 17:13 | xor | Category | network-topology => security-improvements |
| 2010-04-26 16:56 | toad | Relationship added | related to 0001672 |
| 2010-12-08 21:05 | toad | Priority | normal => high |
| 2010-12-08 21:05 | toad | Severity | minor => major |
| 2010-12-11 04:04 | evand | Note Added: 0007985 | |
| 2010-12-16 01:17 | ArneBab | Note Added: 0007992 | |
| 2010-12-24 00:02 | toad | Relationship added | related to 0004621 |
| 2011-04-29 22:50 | toad | Note Added: 0008610 | |
| 2012-10-04 22:05 | toad | Note Added: 0009346 | |
| 2013-05-04 22:37 | toad | Relationship added | related to 0005697 |
| 2013-07-06 13:20 | toad | Note Added: 0009876 | |
| 2013-08-01 18:23 | toad | Note Added: 0010096 | |
| 2013-08-14 17:17 | toad | Description Updated | |
| 2013-08-14 18:15 | toad | Note Added: 0010158 | |
| 2013-08-14 18:16 | toad | Note Edited: 0010158 | |
| 2013-08-15 20:39 | gerard_ | Note Added: 0010162 | |
| 2013-08-31 16:57 | toad | Relationship added | related to 0006048 |
| 2014-04-04 20:16 | toad | Relationship added | related to 0006156 |
| 2014-07-14 13:12 | ArneBab | Relationship added | related to 0006226 |
| 2014-09-14 04:01 | xor | Category | security-improvements => security |
| 2015-05-31 13:29 | ArneBab | Description Updated | |
| 2015-05-31 13:39 | ArneBab | Description Updated | |
| 2015-06-01 13:52 | ArneBab | Description Updated | |
| 2015-12-29 19:03 | toad | Note Added: 0012041 | |
| 2015-12-29 19:03 | toad | Note Edited: 0012041 | |
| 2015-12-29 19:04 | toad | Note Added: 0012042 | |
| 2015-12-29 21:10 | ArneBab | Note Added: 0012047 | |
| 2015-12-29 21:14 | ArneBab | Note Edited: 0012047 | |
| 2016-01-07 00:13 | xor | Note Added: 0012073 | |
| 2016-01-08 12:07 | ArneBab | Note Added: 0012084 | |
| 2016-01-08 12:10 | ArneBab | Note Added: 0012085 | |
| 2016-01-08 12:14 | ArneBab | Relationship added | related to 0003916 |
| 2016-01-12 17:10 | toad | Assigned To | => ArneBab |
| 2016-01-12 17:10 | toad | Status | new => assigned |
| 2016-05-11 09:11 | ArneBab | Note Added: 0012148 | |
| 2016-05-11 09:11 | ArneBab | Assigned To | ArneBab => |
| 2016-05-11 09:13 | ArneBab | Note Added: 0012149 | |
| 2016-05-11 09:13 | ArneBab | Assigned To | => ArneBab |
| 2016-05-11 09:13 | ArneBab | Status | assigned => acknowledged |
| 2016-05-11 09:14 | ArneBab | Assigned To | ArneBab => |
| 2016-05-11 09:14 | ArneBab | Description Updated | |
| 2020-07-21 18:31 | ArneBab | Assigned To | => ArneBab |
| 2020-07-21 18:31 | ArneBab | Status | acknowledged => assigned |
| 2021-09-21 07:20 | ArneBab | Note Added: 0012621 | |
| 2021-10-19 20:43 | ArneBab | Status | assigned => resolved |
| 2021-10-19 20:43 | ArneBab | Resolution | open => fixed |
| 2021-10-19 20:43 | ArneBab | Note Added: 0012625 | |
| 2021-11-04 16:20 | ArneBab | Description Updated |