Live data from Hacker News

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

github.com

71–80 of 192 posts

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

#71
post #57

Earlier quoted context omitted.

or, like, netcat? `nc -l -p 8888 > foo` to listen, `nc 10.10.10.1 8888 Still cool though :)

yup, except with netcat: * the network-side attacker gets to see and modify all your data * the receiver must have a public IP address * the receiver must tell something to the sender, which is the opposite of the direction the data will flow * you have to transcribe your IP address and port number to the other person, which I always get wrong (so many meaningless numbers!) * you don't get much confirmation that all…

That's awesome :)

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

#72
post #27
post #22

I like using https://file.pizza/ for this.

Also https://instant.io/

I like this one but it becomes truly ardous to copy a magnet from one computer to the other. file.pizza at least uses easily pronounceable hashes.

What I would to see from this is a JS which serves every asset on a site via webtorrent so visitors are sharing the bandwidth costs.

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

#74
post #60

> Copying files with ssh/scp is fine, but requires previous arrangements and an account on the target machine, and how do you bootstrap the account?~ Assuming that you have openssh and rssh installed, you bootstrap like this: useradd -m -g users -s /usr/bin/rssh tmp passwd tmp edit /etc/rssh.conf and uncomment allowscp Share the password with the party you want to exchange data with. Make sure your ports are open. Se…

Okay.

Step 1. Open ports on your router. It's your job to figure out which ports those may be.

Step 2. Redirect said ports to the box in question, hopefully you'll know the ip address that was assigned by your home router's DHCP

Step 3. Make sure rssh is installed.

Step 4. If rssh is not installed, please simply follow the simple instructions to get it installed for your system.

Step 4a. If it's a mac, use brew. Type brew install rssh

Step 4b. If it'a a redhat system, type yum install rssh

Step 4c. If it's an ubuntu system, type apt-get install rssh

Step 4d. If step 4b and step 4c fail, use sudo.

Step 5. Get the external facing ip address, and give it to your friend. Note that this is different than the internal address that you used in step 2.

Step 6. Create an account on your system, using rssh, and allowing sftp

Step 7. Give him the username/password

Step 8. Copy the file into his account

Step 8a. Don't forget to chmod it so he can read it.

Step 9. Tell him to get the file

Step 10. Remove the account from /etc/passwd and /etc/shadow and remove him from /etc/groups. Also delete his home directory

Step 11. Rejoice in the simplicity.

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

#76
> Copying files onto a USB stick requires physical proximity, and is uncomfortable for transferring long-term secrets because flash memory is hard to erase. Copying files with ssh/scp is fine, but requires previous arrangements and an account on the target machine, and how do you bootstrap the account? Copying files through email first requires transcribing an email address in the opposite direction

I had similar motivations in 2006 to write a tool to copy files "point to point". So here's my shameless plug:

https://bitbucket.org/etanol/canute

In my case, cryptography was not a requirement, though.

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

#77
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).

How likely is it that something like that trick makes IDS go crazy?

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

#78
post #68
post #60

> Copying files with ssh/scp is fine, but requires previous arrangements and an account on the target machine, and how do you bootstrap the account?~ Assuming that you have openssh and rssh installed, you bootstrap like this: useradd -m -g users -s /usr/bin/rssh tmp passwd tmp edit /etc/rssh.conf and uncomment allowscp Share the password with the party you want to exchange data with. Make sure your ports are open. Se…

> you bootstrap like this Ah, yes. oh come on please it's easy just /etc/init.apt-get/frob-set-conf --arc=0 - +/lib/syn.${SETDCONPATH}.so.4.2 even my grandma can do that

[deleted]

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

#79

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…

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.

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

#80
post #74
post #60

> Copying files with ssh/scp is fine, but requires previous arrangements and an account on the target machine, and how do you bootstrap the account?~ Assuming that you have openssh and rssh installed, you bootstrap like this: useradd -m -g users -s /usr/bin/rssh tmp passwd tmp edit /etc/rssh.conf and uncomment allowscp Share the password with the party you want to exchange data with. Make sure your ports are open. Se…

Okay. Step 1. Open ports on your router. It's your job to figure out which ports those may be. Step 2. Redirect said ports to the box in question, hopefully you'll know the ip address that was assigned by your home router's DHCP Step 3. Make sure rssh is installed. Step 4. If rssh is not installed, please simply follow the simple instructions to get it installed for your system. Step 4a. If it's a mac, use brew. Type…

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.

Post reply on HN