Live data from Hacker News

Magic-Wormhole – Get things from one computer to another, safely

github.com

141–150 of 192 posts

Re: Magic-Wormhole – Get things from one computer to another, safely

#141

https://transfer.sh/ is another neat service which allows you to upload a file easily using a tool such as curl and get a shareable link. There was one time when I only had Chrome Remote Desktop access to a machine without root, where this was a convenient way to share some files. $ curl --upload-file ./hello.txt https://transfer.sh/hello.txt https://transfer.sh/66nb8/hello.txt

http://termbin.com/ is very cool too, especially if you have nothing but netcat.

    $ 

Re: Magic-Wormhole – Get things from one computer to another, safely

#142
post #75

I would highly recommend looking into this (seemingly-obscure) technique for NAT hole punching: https://samy.pl/pwnat/ It would allow for a "magic wormhole"-style system without the need for a MITM (trusted or otherwise).

Both pwnat and chownat are very clever techniques, but I have massive doubts they work _well_ in practice, when exposed to hundreds (or even dozens) of popular NAT devices and network configurations.

Vast majority of NAT boxes change the source port on outbound packets even if a respective externally-facing port is not yet allocated. Anything that's BSD derived will randomize the port, lots and lots of others will +1 the port for each new session, thirds will +2 the port, etc.

There's also egress filtering, intrusion detection systems and NAT devices that do things that make little sense such as remapping ID field in the IP header, presumably for security reasons. Also, depending on the OS, this will need root privileges to craft fake ICMP packets.

All in all, pwnat/chownat are essentially very cool "tech demos" that can't be realistically used just on their own and require a conventional rendezvous server as a fallback.

Re: Magic-Wormhole – Get things from one computer to another, safely

#143

The security model here is pretty great assuming you trust the rendezvous server. Maybe consider an optional challenge/response prompt (like when your pal enters the prompt code, their client generates a second code that they give back to you) to make sure nobody's intercepted the request before them, odds aside (if someone got your initial code somehow, they could definitely man in the middle the request otherwise).

If I did things right, the rendezvous server shouldn't get any advantage over a network attacker: one guess per invocation of the program, 1-out-of-65536 chance of getting it right, 65535-out-of-65536 chance of giving you a WrongPasswordError. FWIW, there's also a --verify option, which causes the program to print out a hex hash of the session key, and wait for you to approve it before sending anything. Not as ergono…

> a --verify option, which causes the program to print out a hex hash of the session key

This is plenty enough.

Another option is to use the ssh model whereby the sender has a persistent keypair, uses it to sign the handshake and sends the pub key to the peer. If the peer has this key in its key cache, it proceeds quietly. Otherwise it pops up a "New key, please verify and approve" message before proceeding.

Re: Magic-Wormhole – Get things from one computer to another, safely

#144

Earlier quoted context omitted.

"My sftp client is already configured with ssh keys." Well, one of the use cases is "how do you get the SSH pubkeys from here to there ?"

My point is that everybody should have a website somewhere (my C1 at cloudscale is 3.59€ per month). Everybody should have a ftp client configured to access it without hassles.

Everybody? That's a very brave idea. As in "non-techies are non-people," or "everybody should become a techie"?

(Also, FTP is an insecure, broken, incomplete, horrible, ancient protocol that should have died in a fire 20 years ago; never mind that I may want to transfer files between two people, not hang those files out onto the web)

Re: Magic-Wormhole – Get things from one computer to another, safely

#145

Earlier quoted context omitted.

Instead you get to pip install. But pip isn't installed. easy-install pip? What's easy-install - it's not there? (brew|yum|apt-get) disttools. Forget this... download get_pip.py, run python get_pip.py... Some error about libsodium now? Where do I get gcc for Windows 10 again? Python's greatest weakness is its packaging and distribution, and this project makes no effort to make it simple.

I'm not gonna argue against that. Using pip-install certainly limits our current audience to people who are comfortable with python packaging tools, which basically means python developers. I'm hoping to get beyond that, once I get the protocol and feature set stabilized. Using something like PyInstaller or py2app to get a single-file executable will be the first step. Porting it to other languages (I've started on S…

A stand alone static binary that does not depend on system libraries.

Specifically, one that 'just works' on windows, and doesn't require that you open powershell and need to change into an obscure directory to use it, or have the binary sit in a folder full of DLLs to run.

In fact, ideally one you don't have to even type anything in; for example, if you can just say; grab this one file from some safe known url (eg. github), and rename it from 'magic.exe' to 'zesty-fruit-324234.exe' and run it.

Re: Magic-Wormhole – Get things from one computer to another, safely

#146

Earlier quoted context omitted.

If I did things right, the rendezvous server shouldn't get any advantage over a network attacker: one guess per invocation of the program, 1-out-of-65536 chance of getting it right, 65535-out-of-65536 chance of giving you a WrongPasswordError. FWIW, there's also a --verify option, which causes the program to print out a hex hash of the session key, and wait for you to approve it before sending anything. Not as ergono…

Call me a nerdy hipster, but I prefer my 1-in-2^256 chance with AES encryption. Then I can put it, well, anywhere. Including a thumb drive, google drive, S3, email, or even some random public newsgroup. I realize this complicates things a touch - you need a program to encrypt and decrypt the file - but that seems much more secure.

Your odds probably aren't that good.

https://www.schneier.com/blog/archives/2011/08/new_attack_on...

Close though :)

Re: Magic-Wormhole – Get things from one computer to another, safely

#147

Earlier quoted context omitted.

Signal and Syncthing are great. magic-wormhole is more about setting up that initial connection: when two humans know each other, but their computers haven't met yet (i.e. know each others pubkeys). In Signal, the security of the initial message exchange depends upon the phone network (did somebody spoof caller-id to claim Alice's phone number?) and the Signal servers (did they report the correct key for Alice's phon…

> In magic-wormhole, the security of the initial message exchange depends just upon the wormhole code ...and upon third-party rendezvous/relay server, doesn't it?

You don't trust that third-party server with any information, it simply makes the initial link between the two parties, like a DNS, that it needs to send the encrypted information to.

An evil relay server could not send the information, or send information to the wrong server, but neither would cause data to be lost because of the encryption.

Re: Magic-Wormhole – Get things from one computer to another, safely

#149

Strictly for internal networks, and no crypto in transit, but dead easy - also for grandma - and covering phones as well as the three pc platforms: Dukto. I use it all the time. http://www.msec.it/blog/?page_id=11

I just use socat or netcat on home networks. Pipeview for a progress meter. I am as paranoid as they come, but if someone has my small home network they already have my data :)
Post reply on HN