Live data from Hacker News

BitTorrent secures and open-sources DHT bootstrap server

engineering.bittorrent.com

11–20 of 26 posts

Re: BitTorrent secures and open-sources DHT bootstrap server

#11
post #7
post #4

I'm always amazed the BitTorrent DHT infrastructure has been working so well for so long: Real-World Sybil Attacks in BitTorrent Mainline DHT: http://www.cs.helsinki.fi/u/lxwang/publications/security.pdf Crawling BitTorrent DHTs for Fun and Profit: https://jhalderm.com/pub/papers/dht-woot10.pdf Profiling a Million User DHT: http://www.michaelpiatek.com/papers/dht_imc_falkner.pdf Lying To The Neighbours - Nasty effects…

Re: the last link >In the Kademlia adaption for Bittorrent a peer's address (NodeID) is to be generated randomly, or more appropriate: arbitrarily. Because randomness isn't verifiable, an implementation can advertise itself with popular NodeIDs or even change them on a per-packet basis. At the end of the slides they suggest sha1(ip+port) as a possible fix. This would increase the barrier-to-entry of a Sybil attack to…

sha1(ip+port) is tricky in the presence of NAT, since different peers may see your packets as coming from different ip+port pairs.

Re: BitTorrent secures and open-sources DHT bootstrap server

#12
post #7
post #4

I'm always amazed the BitTorrent DHT infrastructure has been working so well for so long: Real-World Sybil Attacks in BitTorrent Mainline DHT: http://www.cs.helsinki.fi/u/lxwang/publications/security.pdf Crawling BitTorrent DHTs for Fun and Profit: https://jhalderm.com/pub/papers/dht-woot10.pdf Profiling a Million User DHT: http://www.michaelpiatek.com/papers/dht_imc_falkner.pdf Lying To The Neighbours - Nasty effects…

Re: the last link >In the Kademlia adaption for Bittorrent a peer's address (NodeID) is to be generated randomly, or more appropriate: arbitrarily. Because randomness isn't verifiable, an implementation can advertise itself with popular NodeIDs or even change them on a per-packet basis. At the end of the slides they suggest sha1(ip+port) as a possible fix. This would increase the barrier-to-entry of a Sybil attack to…

> Perhaps an alternative to sha1(ip+port) could be some form of cryptographic signature scheme, where the NodeID is a public key or hash of a public key

What stops me from creating 10 million keypairs and spamming them in to the DHT?

Re: BitTorrent secures and open-sources DHT bootstrap server

#13
post #5

Question for the HN crowd: how does one can use DHT/trackerless to not only distribute files, but updates to them too? Sort of like an ever continuing magnet link if you will?

Well in theory you can store data for anything in a DHT, not only an infohash. So you could have your program query the DHT for the key "MySoftware-Latest" and store under that key the infohash for the latest version.

I don't know how much flexibility there is in popular DHT implementations as to what you can store for a given key, and you will need a server of yours to continuously refresh the data and keep it alive in the DHT.

Re: BitTorrent secures and open-sources DHT bootstrap server

#14
post #11
post #7

Earlier quoted context omitted.

Re: the last link >In the Kademlia adaption for Bittorrent a peer's address (NodeID) is to be generated randomly, or more appropriate: arbitrarily. Because randomness isn't verifiable, an implementation can advertise itself with popular NodeIDs or even change them on a per-packet basis. At the end of the slides they suggest sha1(ip+port) as a possible fix. This would increase the barrier-to-entry of a Sybil attack to…

sha1(ip+port) is tricky in the presence of NAT, since different peers may see your packets as coming from different ip+port pairs.

Not really. DHT servers must accept unsolicited incoming connections, which requires port forwarding. The problem as I see it is really dynamic IPs.

In any case, this wouldn't stop an adversary acquiring a lot of IP addresses for a short period of time. Bitcoin is immune to these kinds of attacks because it requires proof of work, which you can't just fake.

Re: BitTorrent secures and open-sources DHT bootstrap server

#15
post #12
post #7

Earlier quoted context omitted.

Re: the last link >In the Kademlia adaption for Bittorrent a peer's address (NodeID) is to be generated randomly, or more appropriate: arbitrarily. Because randomness isn't verifiable, an implementation can advertise itself with popular NodeIDs or even change them on a per-packet basis. At the end of the slides they suggest sha1(ip+port) as a possible fix. This would increase the barrier-to-entry of a Sybil attack to…

> Perhaps an alternative to sha1(ip+port) could be some form of cryptographic signature scheme, where the NodeID is a public key or hash of a public key What stops me from creating 10 million keypairs and spamming them in to the DHT?

That's a great question, and since there's a well-described public specification for such a scheme[0], I'd encourage you to look for similar attack vectors.

Generating 10 million RSA 2048 bit keypairs isn't free, and you still have to maintain a significant set of network flows and perform decryption against them.

[0]https://github.com/telehash/telehash.org/blob/master/protoco...

Re: BitTorrent secures and open-sources DHT bootstrap server

#16
post #8
post #6

Earlier quoted context omitted.

BTSync is the obvious "Duh!" answer. Since its UDP traffic, controlled by DHT (so long as you disable their central tracker in your conf) and updates on the fly. What I wind up doing (since I don't trust BTsync) is using inotify to watch the sync directory + mktorrent to create a new torrent on file change + pypush to push the new .torrent to various servers

Yeah but then you end up changing the info hash, and thus your magnet is changed. What I'm trying to do is to basically embed the magnet link in my program and sort of having it self check itself for updates. It that makes sense :)

Whether it's helpful for any current efforts using BT infrastructure, there's been a lot of work on this problem since Van Jacobsen sketched the outlines a few years ago:

http://named-data.net/

Re: BitTorrent secures and open-sources DHT bootstrap server

#17
post #12

Earlier quoted context omitted.

> Perhaps an alternative to sha1(ip+port) could be some form of cryptographic signature scheme, where the NodeID is a public key or hash of a public key What stops me from creating 10 million keypairs and spamming them in to the DHT?

That's a great question, and since there's a well-described public specification for such a scheme[0], I'd encourage you to look for similar attack vectors. Generating 10 million RSA 2048 bit keypairs isn't free, and you still have to maintain a significant set of network flows and perform decryption against them. [0] https://github.com/telehash/telehash.org/blob/master/protoco...

Yeah I'm aware of Telehash. Any idea how large the current DHT is?

Re: BitTorrent secures and open-sources DHT bootstrap server

#18
post #12

Earlier quoted context omitted.

> Perhaps an alternative to sha1(ip+port) could be some form of cryptographic signature scheme, where the NodeID is a public key or hash of a public key What stops me from creating 10 million keypairs and spamming them in to the DHT?

That's a great question, and since there's a well-described public specification for such a scheme[0], I'd encourage you to look for similar attack vectors. Generating 10 million RSA 2048 bit keypairs isn't free, and you still have to maintain a significant set of network flows and perform decryption against them. [0] https://github.com/telehash/telehash.org/blob/master/protoco...

Outside of this, what are the relationships between this BitTorrent's DHT and telehash? Are they covering the same ground but not necessarily compatible? Encrypted, distributed P2P traffic with discoverability would help a number of projects -- it would be great not to have to "pick a side" already.

Re: BitTorrent secures and open-sources DHT bootstrap server

#19
post #17

Earlier quoted context omitted.

That's a great question, and since there's a well-described public specification for such a scheme[0], I'd encourage you to look for similar attack vectors. Generating 10 million RSA 2048 bit keypairs isn't free, and you still have to maintain a significant set of network flows and perform decryption against them. [0] https://github.com/telehash/telehash.org/blob/master/protoco...

Yeah I'm aware of Telehash. Any idea how large the current DHT is?

Very small, as the second draft of the protocol is still in heavy revision.

Re: BitTorrent secures and open-sources DHT bootstrap server

#20
post #7
post #4

I'm always amazed the BitTorrent DHT infrastructure has been working so well for so long: Real-World Sybil Attacks in BitTorrent Mainline DHT: http://www.cs.helsinki.fi/u/lxwang/publications/security.pdf Crawling BitTorrent DHTs for Fun and Profit: https://jhalderm.com/pub/papers/dht-woot10.pdf Profiling a Million User DHT: http://www.michaelpiatek.com/papers/dht_imc_falkner.pdf Lying To The Neighbours - Nasty effects…

Re: the last link >In the Kademlia adaption for Bittorrent a peer's address (NodeID) is to be generated randomly, or more appropriate: arbitrarily. Because randomness isn't verifiable, an implementation can advertise itself with popular NodeIDs or even change them on a per-packet basis. At the end of the slides they suggest sha1(ip+port) as a possible fix. This would increase the barrier-to-entry of a Sybil attack to…

Hi, that last link was my talk from 3 years ago. Last year at 29C3 a couple of friends proposed doing this kind of security with elliptic curve cryptography. See the lightning talks recordings. Their code is here: https://github.com/rtreffer/dht
Post reply on HN