Surprised I haven't come accross any p2p DoS attack tools.
Should be easy as hell to generate thousands of DHT entries that lead to invalid IPs.
@Moon @cuaxolotl Yeah, I feel like with #IPFS being more popular lately we'd at least see people attempting black hole attacks on ipfs.io or on some popular NFT collections.
@Moon @cuaxolotl You might enjoy this comparison article I wrote about #IPFS, #Hypercore #BitTorrent and #SSB.
https://blog.mauve.moe/posts/protocol-comparisons
It doesn't get super into the weeds on the DHT tho
@mauve
This is a wonderfully detailed comparison, very useful for devs trying to make protocol choices for new P2P apps. But I still managed to understand most of it, despite being more of UX guy, with very limited coding experience.
I'd love to see a similarly detailed comparison for chat protocols (IRC, XMPP, Matrix, Jami, Tox).
Man that kinda sucks. The freenet approach is wayyyyyyy more elegant (although it has the extremely unfortunate side effect that you can’t control what your node serves, which can be some very nasty things on freenet).
Basically your node keeps an LRU cache of data that has passed through it. This means that unpopular data will be dropped from the network sooner, data gets replicated automatically where it’s needed in the network, reducing load on the initial “host”s and you have deniability about what your node serves.
all requests in freenet are recursive, you ask you peers, they ask their peers, etc. Requests are deniable because you can’t tell if a request was originated by your peer or one of their peers, etc.
sybil isn’t something explicitly guarded against (except by darknet mode, wherein you hand pick your peers) but there are metrics to decide whether to drop poorly behaving peers. Attacking the LRU really isn’t feasible because of the way requests are routed. You’d need to have content hashes that exist that occupy the same part of the address space big enough to fill a specific peer’s LRU
@ademan @cuaxolotl @mauve @Moon The reference implementation for IPFS has a cache of recently requested blocks; I think it’s set to 2 GB by default, but the garbage collector is really stupid and just starts deleting any of the blocks until you hit the low water mark. Anything you want to keep around you have to pin.
You could probably abuse some of the public gateways to keep your files around by requesting them round robin style before they fall off of all of their caches.
@Coyote @cuaxolotl @Moon @ademan Generally I run an ipfs-cluster set and pin data there. Gonna be looking into making it work better with mutable datasets and IPNS.
Honestly might be easier to just go with a blockstore and libp2p and skip the garbage collector and pinning stuff entirely.
@mauve At least for the bittorrent DHT the most common implementations (utorrent and libtorrent) are pretty careful not to enable large scale amplification attacks. Nodes don't advertise the addresses of other nodes until they've been verified and retries to unverified addresses are severely limited.
@mauve Also adding an address to a torrent entry requires a three-way handshake which prevents address spoofing.
@magila Really? Mind linking to the spec for that. I was under the impression that mainline still doesn't have a clear mechanism for sybil resistance.
Some things like #hyperswarm take it pretty seriously though and only allow peers with stable IPs to participate since they use it to generate their ID for Kademlia.
@magila I don't think you need to attack the DHT topology for a DoS though. You can advertise from seemingly legit IPs to regular DHT nodes and either overload them, or add a bunch of these junk entries that refuse to serve the content.
Like, *chan types used to use LoIC a lot for getting random people to just run a tool which would help with DoS. Feels like there should be a similar one for p2p content by now. Maybe #dweb stuff just isn't popular enough still.
@mauve Oh sure there are many ways to attack the DHT to DoS a torrent. I think you don't see it because a) people rarely care that much about torrents b) thanks to peer exchange it's actually pretty hard to effectively DoS a torrent via the DHT. All it takes is one legit node sneaking through to enable a client to join the swarm. In theory you could still disrupt a torrent with enough fake nodes, but again, people don't typically care enough to commit that many resources.
@magila I totally forgot about peer exchange! I think a lot of other protocols don't have it and probably should
@mauve this is one of those torment nexus posts mauve
Ain't any cloudflare that'll help THAT one!