wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: Steve Gilberd <steve@erayd.net>
To: wireguard@lists.zx2c4.com
Subject: Re: wirehub - decentralized, peer-to-peer and secure overlay networks built with WireGuard
Date: Wed, 30 Jan 2019 12:55:26 +1300	[thread overview]
Message-ID: <CAJQSx3aQLGT9Hr=3NNTnrvq2JJCqiJ2vkV092n_zCN2LNjP-1Q@mail.gmail.com> (raw)
In-Reply-To: <CADjxVNq-PPTrzd9qDZK+ZFF8v70eme8n87xBK-77e=PNMGCQwg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 5762 bytes --]

I very much like the idea of this project - I've been looking for a decent
full-mesh L3 VPN for ages, and have never found a solution I've been
properly happy with. Thanks for your work in developing this solution :-).

However - I'm concerned about some of the potential increased attack
surface that your architecture introduces:
 - uses extra crypto functionality which is not already part of wireguard;
and
 - passes messages across public networks using that functionality; and
 - clamps the wireguard keys in some unspecified way to embed a
proof-of-work (in fairness, I haven't read the code, so please correct me
if I have misunderstood).

For what it's worth, if it would be possible to also encapsulate your
control protocol inside wireguard, that would be vastly preferable: it
allows the transport cryptography to be implemented in one place, once
(i.e. in wireguard), and lets wirehub be a purely organisational overlay
for managing links, rather than touching the crypto and introducing
troubling extra complexities.

I would also love to see some sort of PKI option with this project, to
avoid having to explicitly trust all the peers. I'd prefer to be able to
simply provide the peers with a signature they can present to other peers
that proves they can be trusted (or even better, have that signature
generated by a nominated host at connect / setup time for each peer, which
avoids much of the shenanigans involved with handling expiry, revocations
etc.) Having the ability to tell all peers on the network to immediately
terminate all connections with a specific compromised peer would also be
handy.

Cheers,
Steve

On Wed, 30 Jan 2019 at 10:15 Gawen ARAB <g@wenarab.com> wrote:

> Hello,
>
> I've been giving my free time on a side project called WireHub
> (https://github.com/gawen/wirehub), which is a simple tool to build
> decentralized, peer-to-peer and secure overlay networks. It dynamically
> configures WireGuard tunnels, discoverying peers' endpoints via a
> authenticated
> DHT, going through NATs, and relaying the WireGuard traffic if no P2P
> communication is possible.
>
> Overlay networks are defined by a single human-readable file which lists
> the
> hostname and public key for each nodes of the network. Here's an example:
>
>     name test               # network name is 'test'
>     subnet 10.0.42.0/24     # overlay subnetwork is 10.0.42.0/24
>     workbit 8               # PoW parameter for DHT security
>
>     # a public bootstrap node
>     boot P17zMwXJFbBdJEn05RFIMADw9TX5_m2xgf31OgNKX3w bootstrap.wirehub.io
>
>     # Add trusted node 'a.test' to the overlay network.
>     # Each trusted node are at least identified by an human-readable
> hostname
>     # and a base64 public key.
>     trust a.test KJ7YGrBeqLLm_JJ1huIS26OnqAVFy57z5UJqjyMagW4
>
>     # If the endpoint of a peer is static, it might be set after the
> public key.
>     # Note that this is optional, as endpoints can be dynamically found in
> the
>     # DHT.
>     trust b.test eIix5ldvqDzOIrG9ViKTe9TSBlF4g9nUwKi20C06hFM 12.34.56.78
>
>     # By default WireHub assigns nodes an (overlay) private IP, but a
> static
>     # private IP might be defined
>     trust c.test 10.0.42.254 kKZzuIm11zkBSHL9ETRwEthIBbLTvz840F_k4mhI_Hs
>     ...
>
> To start a peer,
>
>     # wh up ./config private-key ./sk
>
> When a network is up, the node's hostnames are resolved in userland.
>
>     # ping b.test
>     PING 10.0.42.2 (10.0.42.2): 56 data bytes
>     64 bytes from 10.0.42.2: seq=0 ttl=64 time=106.801 ms
>     64 bytes from 10.0.42.2: seq=1 ttl=64 time=49.778 ms
>
> WireGuard and WireHub uses the same Curve25519 key. WireHub keys must be
> generated with `wh genkey`, which adds a Proof-of-Work to the generation
> of the
> Curve25519 key, in order to mitigate Sybil attacks on the DHT. A high
> workbit
> will require more work to generate a valid key.
>
>     # wh genkey workbit 8       # fast
>     MFaqLuutFvNs79Xc9zhOUofIbL3xSLz1uo+RB1xB73s=
>     # wh genkey workbit 8 | wh pubkey | wh workbit
>     8
>     # wh genkey workbit 16      # will take more time to generate
>     kLfotsCIfB/7OcDGeLenptfy2Dzav9wmVZjVQ0Gvnk0=
>     # wh genkey workbit 16 | wh pubkey | wh workbit
>     16
>
>     # wg genkey | wh pubkey | wh workbit    # WireGuard keys have 0 workbit
>     0
>
> Under the hood, WireHub runs its own UDP protocol, binding the same UDP
> port
> than the WireGuard interface (for NAT trasversal technique reasons). It
> does so using
> libpcap. The first byte of a WireHub packet is 0xff, which corresponds to
> an
> invalid WireGuard packet with message type outside the valid range
> 0x00-0x03.
>
> WireHub currently authenticates its packets with a custom cryptographic
> scheme
> based on the node's keys. In the future, it might be better to tunnel
> WireHub
> packets through WireGuard, yet I'm not sure how to do that simply at the
> moment,
> as WireHub packets are not IP packets but more like authenticated messages.
>
> There's much room for improvement (security, allowed-ips management, more
> UDP
> hole punching techniques, faster relaying), but it's usable. Docker images
> are
> provided to ease quick starting.
>
> Feel free to test and give some feedbacks!
>
> Also, I'll be at FOSDEM 2019 next week-end, so see you there! 🍺
>
> Gawen
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard
>
-- 

Cheers,

*Steve Gilberd*
Erayd LTD *·* Consultant
*Phone: +64 4 974-4229 **·** Mob: +64 27 565-3237*
*PO Box 10019, The Terrace, Wellington 6143, NZ*

[-- Attachment #1.2: Type: text/html, Size: 7328 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

  reply	other threads:[~2019-01-29 23:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 21:12 wirehub - decentralized, peer-to-peer and secure overlay networks built with WireGuard Gawen ARAB
2019-01-29 23:55 ` Steve Gilberd [this message]
2019-01-30 11:35   ` Rene 'Renne' Bartsch, B.Sc. Informatics
2019-01-30 15:25   ` Gawen ARAB
2019-01-30 15:46     ` Gawen ARAB
2019-01-30 16:55       ` Rene 'Renne' Bartsch, B.Sc. Informatics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJQSx3aQLGT9Hr=3NNTnrvq2JJCqiJ2vkV092n_zCN2LNjP-1Q@mail.gmail.com' \
    --to=steve@erayd.net \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).