149 points · by malandrew · 12y ago · 86 comments
"Security Requirements: The user is responsible for ensuring that any individual connection does not transmit more than 2^64 bytes."
If you don't happen to know how big 2^64 bytes is, it's over 18 BILLION GIGABYTES! We can probably safely assume most of us will never hit that limit on a single connection, haha.
Ref: https://code.google.com/p/spiped/source/browse/trunk/README
Just to pick one current example, JUS[0] presently has a capacity of 1.28 terabits per second.
If, for some reason, we were to run it at an even 1tbps, piping all data through a single spiped connection, the security requirement would be broken after just over 4.25 years of continuous operation.
8 streams of uncompressed 4320p@60fps video multiplexed into a single spiped connection would also break that requirement in a bit over twice as much time.
These are contrived but possible scenarios with present commercial technology. In 10-20 years, that assumption might not be so safe.
To clarify:
It's simply amazing the scale at which you have to get to for spiped to need a new key. It's a tribute to its design and its author.
If I understand it right, in order for this to be a real issue, an attacker would have to spend decades or centuries diligently recording either 18 quintillion connections or 18 billion gigabytes of your encrypted traffic in order to even begin to try cracking the key in any serious way.
The solution to this "vulnerability"? Switch out your key (takes a few seconds tops).
I laugh because of Colin's dry humor matter-of-factness about this mind-blowing level of scale. If you missed his own poking fun at it, read his other comments in this thread :)
In case anyone is wondering about this: When you set up an SSH tunnel, you have a single persistent TCP connection which everything runs through. If there's a network glitch which kills that TCP connection, everything dies. With spiped on the other hand, a separate TCP connection is used for each "pipe", so a network glitch won't kill a connection which isn't actively sending data, nor will it prevent future connections from being established.
(But for the ultra paranoid - spiped sounds like a better deal)
... which is what TCP keepalives are for.
> The simplicity of the code ... makes it unlikely that spiped has any security vulnerabilities.
Famous last words :)On a serious note - this looks like a really useful addition to the toolbox of "low-level unix flavored tools". I can see this being a simple basis for connecting infrastructure together without exposing potentially sensitive data.
Please audit the code! Just like tarsnap, spiped is eligible for bug bounties.
I can see this being a simple basis for connecting infrastructure together without exposing potentially sensitive data.
Yes, that's exactly it. The use case is "I have a bunch of servers and I want them to talk to each other securely". Ten years ago this would have just been a matter of stringing cat5 between them, but Cloud changes that.
Anyone have a list or collection of these? I feel like I'm missing out on a whole world considering I just learned about spiped from this post.
I tunnel Zabbix health monitoring communications to and from the server.
I don't have to worry about setting up users, and each node 'config' is only 1 shared keyfile.
If a node is compromised, I can cut it off with one move ( changing the shared key )
This is a really bad argument. It may be generally true that increased complexity leads to more vulnerabilities in general, but it's not necessary that increased size leads to a large increase in complexity. Poor software design that involves a lot of strange relationships between components inside of an application leads to vulnerabilities. Unless your code base is so small you can provide formal proofs of security, you can make absolutely no assertions based on code size that your code is more or less vulnerably than larger code bases.
Additionally, the number of attempts to break OpenSSH because of the massive user-base gives it a stronger security foundation than you to imply. Put another way, there are massive economic incentives for hackers to pour hours into finding vulnerabilities in OpenSSH since it's the gateway to millions of *nix systems on the Internet. Has spiped been subject to that level of scrutiny?
As a security-minded person, you should not be making grandiose claims about freshly released software being so much more secure than OpenSSH that it should be used to protect OpenSSH endpoints. Would you trust a newly released symmetric crypto algorithm more than AES just because it performed fewer operations?
The manpage for sshd_config says that turning off AllowAgentForwarding still doesn't prevent users from setting up their own forwarders. If I have ssh-agent set up to forward to the host I am connecting to, but it has AllowAgentForwarding turned off, is it possible to set up my own forwarder in sshd without changing having to enable it and reconnect with a new session? i.e. is there a way to get the SSH_AUTH_SOCK unix domain socket on my localhost forwarded to the host machine I'm currently sshed into using only the tools likely to be installed on a typical linux box or is the only way to do it with tools like spiped or socat?
You'll have to set you your own userspace forwarder if the admin hasn't also clamped down the firewall config too tight.
If they HAVE clamped down the config, you could still invoke netcat on the remote side and use some form of kermit tunneling to get to the remote target side.
Basically, once I SSH and I'm root during the provisioning process, how do I programmatically set up ssh-agent for an in progress ssh session so that all future commands have access to the SSH_AUTH_SOCKET on my localhost.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/custom...
Container commands run 'before' your app is deployed, so you can pull in deps/etc.
Not sure if that is any easier on eb though. Some other ideas: http://stackoverflow.com/questions/13476138/setting-up-priva...
Try changing the sshd config and send the sshd a reload signal.
Normally that keeps existing connections alive. YMMV.
But being tied to what's in OpenSSL is scary.
I have been doing what spiped/spipe does using curvecpserver/curvecpclient.
OpenSSL is scary, but spiped only uses a very very small corner of the OpenSSL code. In particular, it doesn't use any SSL code.
openssl dgst -sha256 spiped-1.3.1.tgzcperciva, why serve http at all or not at least redirect people to https by default?
Any sane packaging system will check hashes against known good values after downloading, so using https just opens up more attack surface.
gpg --print-md sha256I'm using PBKDF2-SHA256 to fulfill the role of "something which has the same cryptographic strength as SHA256, but produces an arbitrary length output".
* Does not require X.509 processing, which is a huge source of TLS implementation bugs.
* Uses secure-by-default ciphersuite which, unlike TLS's, was designed after the most important work in authenticated encryption was published.
* Does not include legacy ciphersuites with known flaws.
* Mutually authenticated without invoking TLS corner case subprotocols like client certificates and session resumption.
* Small enough to be auditable.
spipes builds upon well-understood primitives and provides a simple, clear, and likely to be correct implementation.
TLS and spiped are simply two different tools, for two different purposes. Control only one of the endpoints? You'll have to use TLS. Want to secure communication between infrastructure you control? Check out spiped.
What are your thoughts now on not exposing yourself to all of the complexity of OpenSLL?
Either way, `brew install spiped` fails on OSX if $MAN1DIR is set because brew works without sudo and all the directories in /usr/share/man are only writeable by root. Obviously not your problem, but just putting it out there. Is MAN1DIR a FreeBSD env var or is it used by other distros?
I was bummed out that spiped was not in Red Hat's yum package registry. I wonder if it's in the other distro registries.
MAN1DIR is just a variable name I picked. I was assuming that most people would be installing this code via some sort of packaging system which could set that variable appropriately.
brew install https://raw.githubusercontent.com/bbatsell/homebrew/spiped-1.3.1-fixmanpage/Library/Formula/spiped.rb
Edit: 1 hour later, it's already been merged. brew update;brew reinstall spipedFYI - the man pages still say version 1.3.0 :)
[1] http://www.daemonology.net/blog/2009-09-28-securing-https.ht...