News for hackers. Stuff that matters.
Re:Salt: Like Puppet, Except It Doesn’t Suck by tptacek on Monday June 24, 2013 @10:23AM (#5933068)
I've used Fabric, Chef, Puppet, and Ansible, and have settled on Ansible; it's a sort of middle ground between Fabric and Chef that does more than just run commands on servers but doesn't require me to buy into a whole elaborate universe of configuration management servers and whatnots. Ansible is great.

The ZeroMQ stuff makes sense if you're pushing configurations inside a data center, but it's a dealbreaker for us having things hosted externally.

Re:Salt: Like Puppet, Except It Doesn’t Suck by mechanical_fish on Monday June 24, 2013 @11:08AM (#5933400)
It's ridiculous how much more pleasant it is to use Ansible than Puppet or Chef. Its invention solves a big pain for me: As a veteran user of Puppet I'm a firm believer in using a tool like Puppet, but Puppet-and-Chef are overdesigned for small jobs (and, arguably, for most other jobs as well) so actually recommending them to a beginner has always felt like this:

A: "I just set up a cloud instance by running some shell commands by hand."

B: "You shouldn't do that, because of X and Y and Z. You should learn Puppet or Chef."

A: "Wait... did you just tell me to go spend thirty hours banging my head against solid objects, in exchange for nebulous benefits that I can't even perceive yet?"

B: "Why, yes, I believe I did!"

Ansible feels much less embarrassing to advocate.

Re:Salt: Like Puppet, Except It Doesn’t Suck by nailer on Monday June 24, 2013 @11:45AM (#5933633)
Re:Salt: Like Puppet, Except It Doesn’t Suck by zhynn on Monday June 24, 2013 @06:34PM (#5936188)
After working in Chef for several years and fighting with both gem-rot and managing colliding chef-client and application ruby+rubygems+gem environments with RVM... I was ready for something else. Also, our group just started working alongside another group that does not use cfg management; I wanted something that would be unobtrusive. At first I thought Salt would work, but the minionless mode was not really recommended. You lose a lot of the power of Salt when you do that. Ansible, however, is designed to be minionless. After using it for the last few months, I am (frankly) in love. The last time I felt butterflies like this for a tool was when I grokked git.

Look, I can maintain my own ansible configurations (inventories, playbooks and roles), and the other groups need not be the wiser. They don't need to worry that servers are going to be reconfigured out from under them, since I am running my configurations explicitly. All they see is that I ssh'd in and did a bunch of stuff really fast. To work with my other groupmates, we just keep the files in git (just flatfiles, yes: just flatfiles). With git I have an audit log of everything that has changed (hosts that have moved environments, configurations that have been updated, etc). And like git it is as distributed as you want it to be. Want to run it from a central server only? Fine. Want to have your admins all run it from their workstations? Fine. Go for it.

Even if the server is ancient or weird (ie. no python), I can still manage it with the raw module.

Ansible gives me everything I want, with no fuss. It is so basic that I can do things the way I want to.

Re:Salt: Like Puppet, Except It Doesn’t Suck by grumps on Monday June 24, 2013 @11:06PM (#5937276)
I've recently been working to get a set of Puppet scripts running along side of Vagrant so both Server side and Client side devs can get working on projects faster.

Personally I've found dealing with Ruby and the various versions rather irritating. I kind of wish I had started with Salt or Ansible because I know far more Python, than I do Ruby. I started down this bunny trail before Vagrant support Ansible and/or Salt. I guess it's not to late to start over... hahaha Maybe I will after the initial release.

I guess the only advantage of Puppet was that I'm able to do most of what I want using major modules...

Re:Salt: Like Puppet, Except It Doesn’t Suck by njs12345 on Monday June 24, 2013 @11:04AM (#5933354)
If you don't want to run a master, you can use Salt in masterless mode: https://salt.readthedocs.org/en/latest/topics/tutorials/stan...
Re:Salt: Like Puppet, Except It Doesn’t Suck by falcolas on Monday June 24, 2013 @03:40PM (#5935178)
One important difference: you don't have to install Ansible on the nodes you're managing, just Python >= 2.4 with a JSON module installed (default for 2.6 and later, available through simplejson for previous versions).

Also, Ansible does not require you to mess around with dependency lists to ensure that packages/files are installed in the right order - the order is built into the yaml config file. You don't lose any capability, you just gain (and this is my personal opinion) ease of understanding the order that operations will occur in.

Re:Salt: Like Puppet, Except It Doesn’t Suck by xorgar831 on Monday June 24, 2013 @05:23PM (#5935774)
Actually ansible doesn't even need python installed initially, it has a "raw" mode which you can use to boot strap the installation of python.
Re:Salt: Like Puppet, Except It Doesn’t Suck by etherael on Monday June 24, 2013 @10:43AM (#5933222)
Ansible can do the zeromq stuff anyway, that's what fireball is for.
Re:Salt: Like Puppet, Except It Doesn’t Suck by frankwiles on Monday June 24, 2013 @11:01AM (#5933337)
I don't understand why ZeroMQ outside of a data center would be a deal breaker for anyone. You do realize the data on the wire is encrypted right?
Re:Salt: Like Puppet, Except It Doesn’t Suck by tptacek on Monday June 24, 2013 @11:33AM (#5933548)
Awesome. How many people have reviewed it for flaws? How many people have reviewed OpenSSH?
Re:Salt: Like Puppet, Except It Doesn’t Suck by emidln on Monday June 24, 2013 @12:43PM (#5934055)
How many people have reviewed Paramiko? In particular, how about that ecdsa patch[1] to Paramiko that you'll need to be accessing modern Ubuntu or Fedora (and before long, RHEL/CentOS). What about the python-ecdsa[2] (that paramiko's provisional support for modern Fedora and Ubuntu's default configs is based on)? This entry from its README seems pretty frightening:

    This library does not protect against timing attacks. 
    Do not allow attackers to measure how long it takes you 
    to generate a keypair or sign a message. This library
    depends upon a strong source of random numbers. Do not
    use it on a system where os.urandom() is weak.
I'm not saying Paramiko (or its patch sets) are insecure, just pointing out that the same arguments can be made against the libraries and code that Ansible is based on.

[1] - https://github.com/paramiko/paramiko/pull/152

[2] - https://github.com/warner/python-ecdsa

Re:Salt: Like Puppet, Except It Doesn’t Suck by dsl on Monday June 24, 2013 @02:37PM (#5934801)
> Do not use it on a system where os.urandom() is weak.

So, don't use it in the cloud? [1]

1. http://harvey.binghamton.edu/~ychen/chen-kerrigan.pdf

Re:Salt: Like Puppet, Except It Doesn’t Suck by dzderic on Monday June 24, 2013 @05:45PM (#5935901)
After finishing the Cousera crypto course, I did a quick review of their approach and found 2 issues which completely broke their authentication protocol (https://github.com/saltstack/salt/issues/2239 & https://github.com/saltstack/salt/issues/2916).
Re:Salt: Like Puppet, Except It Doesn’t Suck by anthonyb on Monday June 24, 2013 @08:50PM (#5936771)
Which they seemed to fix pretty quickly, mainly by migrating to keyczar.
Re:Salt: Like Puppet, Except It Doesn’t Suck by tech-dragon on Monday June 24, 2013 @11:53PM (#5937414)
Which is one of the reasons I like them as much as I do. I can watch the iterations, they work hard on their product are committed to open source, and release regularly and often.

The other big win for me is I can read their code, I understand python & have a number of items I'll be able to contribute to upstream that will help others use the product.

Re:Salt: Like Puppet, Except It Doesn’t Suck by ipmb on Monday June 24, 2013 @11:51AM (#5933682)
If it's a concern, just lock it up behind iptables. Only let your master talk to your minions and your minions can only talk to your master.
Re:Salt: Like Puppet, Except It Doesn’t Suck by tptacek on Monday June 24, 2013 @12:06PM (#5933789)
I'm not telling you it's malpractice to use it that way, but we wouldn't.
Re:Salt: Like Puppet, Except It Doesn’t Suck by ipmb on Monday June 24, 2013 @12:21PM (#5933907)
Why?
Re:Salt: Like Puppet, Except It Doesn’t Suck by JoachimSchipper on Monday June 24, 2013 @01:43PM (#5934465)
I'm not tptacek, but note that IP addresses are not exactly cryptographically secured. If you only restrict access by IP address, you tend to lose your whole intranet as soon as one host falls.

(Then again, that's how it usually goes anyway.)

Re:Salt: Like Puppet, Except It Doesn’t Suck by 23david on Monday June 24, 2013 @11:53AM (#5933694)
Maybe they should hire you to review it for security flaws?
Re:Salt: Like Puppet, Except It Doesn’t Suck by stonemetal on Monday June 24, 2013 @11:36AM (#5933577)
At one point in time ZeroMQ was not hardened and direct exposure to the internet wasn't a good thing. It appears they have fixed it, but it hasn't proved it self so the perception lingers on.

http://www.zeromq.org/area:faq#toc8

Re:Salt: Like Puppet, Except It Doesn’t Suck by danudey on Monday June 24, 2013 @12:11PM (#5933838)
ZeroMQ used to be full of assert() calls that would fail on bad data and crash whatever was listening. It was trivially easy to cause problems for someone's ZMQ socket-listening service. It's been fixed, but the perception lingers on.
Re:Salt: Like Puppet, Except It Doesn’t Suck by ishbits on Monday June 24, 2013 @06:23PM (#5936149)
A few years back it was common practice NOT to expose ZeroMQ to the wide open internet as it was built for that. I think they says it OK now, but its left a bitter sense for some of us.
Re:Salt: Like Puppet, Except It Doesn’t Suck by terminalmage on Monday June 24, 2013 @11:47AM (#5933651)
reads article about A

I've tried B, C, D, and E, and I like E.

Re:Salt: Like Puppet, Except It Doesn’t Suck by tptacek on Monday June 24, 2013 @12:06PM (#5933798)
Salt includes characteristics of C and D that didn't work for me.
Re:Salt: Like Puppet, Except It Doesn’t Suck by pessimizer on Monday June 24, 2013 @01:30PM (#5934383)
The title of the article is "A: like D, except it doesn't suck."
Re:Salt: Like Puppet, Except It Doesn’t Suck by 23david on Monday June 24, 2013 @12:10PM (#5933831)
Lol. And I do consulting. Hire me!!!!

And if you criticize me, I down-vote you. Classy.

Re:Salt: Like Puppet, Except It Doesn’t Suck by 23david on Monday June 24, 2013 @12:07PM (#5933802)
you care about network security, why are you exposing ssh ports in public anyhow? Put them behind a VPN.

There are ways to configure salt with masterless or behind vpcs or with syndics that are perhaps an enhanced security model. But defaults are for regular use cases, and for most cases the defaults are fine.

I suggest checking it out.

Re:Salt: Like Puppet, Except It Doesn’t Suck by darkarmani on Monday June 24, 2013 @01:03PM (#5934203)
> you care about network security, why are you exposing ssh ports in public anyhow? Put them behind a VPN.

Why are you exposing VPN ports in public anyhow? Put them behind a VPN.

Seriously though, there isn't anything to say a VPN is any more secure than SSH.

Re:Salt: Like Puppet, Except It Doesn’t Suck by peterwwillis on Monday June 24, 2013 @01:32PM (#5934393)
SSH is secure. The configuration of SSH, and the system that it's running on, its operating system, accounts and applications, might not be. It all comes down to how secure you want to be.

There is a longer conversation that can be had to explain this. There are lots of mistakes one can make in managing a box with SSH that will easily lead to an account compromise, not even considering universal methods like 0-days, stack attacks, mitm, phishing, etc. The simplest defense to all these problems is a hardened VPN device on a separate network segment with separate authentication and strictly defined ACLs.

If you just run a personal VPS, I wouldn't worry about it. But if you ever start handling customer data, get serious about security and don't run SSH in the open.

Re:Salt: Like Puppet, Except It Doesn’t Suck by gizzlon on Tuesday June 25, 2013 @04:02AM (#5938133)
This just sounds like FUD. What makes whatever vpn software or "hardware" you're using better, or harder to mismanage, than OpenSSH.

Something concrete please..

Re:Salt: Like Puppet, Except It Doesn’t Suck by peterwwillis on Tuesday June 25, 2013 @09:48AM (#5939384)
Keep in mind that most of the time, penetration happens because of operator error. Most common vulnerabilities are patchable or preventable in one way or another.

SSH contains many features which may make it vulnerable to attack. If configured incorrectly it will expose the machine, and depending on the machine this could expose a big portion of your network. I could write 5 pages on abusing SSH options for entry.

After SSH itself, there's the operating system. PAM has had holes for years and yet people everywhere rely on it for their authentication. Their OS might not be patched up, and probably has had no hardening of the kernel or userland against typical attacks.

The box is also probably on a shared network segment, meaning your attack surface is now a whole lot bigger: many machines and user sessions to hijack.

On the other hand, a VPN on a separate network segment provides protection for all these components, if you do it right. Usually the VPN should be an appliance of some kind, with service by a company who spends its time hardening the device and patching the software regularly. This makes sure the configuration of the software is correct, the system itself is resistant to attack, and authentication/authorization is managed outside the machine, which means limited access to the network for specific user sessions.

You cut the attack surface down by separating their network access away from a specific network and shared server. You also cut down on mistakes in managing said service because everything is a managed service, not a config file edited by one or more admins.

Also consider that SSH just doesn't have the features of a standard VPN that make it useful on a network level. Its tunneling feature is a joke; using ppp is the closest way to provide an actual remote vpn tunnel. Persistent connections are nonexistent. Network access control is nonexistent. Pushing routing, DNS and other network information is nonexistent. It is not meant to be a network-level tunnel, it's a single-session user tunnel for remote hosts, not networks. The extra options and features for more network access are hacks.

If you wanted to emulate a VPN using SSH, you could:

  * put a machine on a separate network segment
  * apply Grsec and other patches
  * harden the filesystem and stop all services other than SSH
  * disable user logins
  * disable all features of ssh
  * enable all strict ciphers, modes, options for ssh
  * add ssh config options to run pppd as soon as the user logs in
  * configure PAM to use RADIUS or SQL to auth with a remote database
  * use iptables and some kind of packet-marking module to track network sessions by user id
  * create a custom application that configures iptables rules per user
  * constantly update all patches
That would get you close to a real, normal VPN. Unfortunately, it's also a metric shit-ton more code and services to do the same thing as one service, and considering you'd be setting it up for the first time, there's probably gonna be some mistakes made.

SSH is not a VPN, and a VPN is not SSH. Like I said before, if you're just remoting into your personal box, I don't think you'll have issues, because nobody would care to break in. Bigger networks are a different matter.

Re:Salt: Like Puppet, Except It Doesn’t Suck by gizzlon on Tuesday June 25, 2013 @10:21AM (#5939594)
Keep in mind what we are discussing here, a lot of that was off topic. I never said ssh and VPN is the same, or the ssh should replace VPN, it's the other way around.

Now, it seems like you're saying that vpn is more secure because it's often separated and more hardened. I guess that kind of makes sense, but isn't that really an argument for a single, hardened entry-point into the network? Could be anything.. And of course, this has its drawbacks as well =|

Re:Salt: Like Puppet, Except It Doesn’t Suck by peterwwillis on Tuesday June 25, 2013 @10:34AM (#5939691)
It's an argument for better network and host security.

If you have a building you want to secure, you could make a lobby with a man-trap and a guard at the front desk and security keys for the lobby and on each floor. Or you could put a padlock on the back door. You decide whether it's worth the risk.

In terms of what to use to remote into your private VPS, just use SSH. A VPN would be overkill.

Re:Salt: Like Puppet, Except It Doesn’t Suck by snowwrestler on Wednesday June 26, 2013 @10:52AM (#5946408)
Yes, there is. If you get into my VPN, all you get is another connection to the public Internet. If you get into my SSH you have my server. VPN adds another layer to the onion.
Re:Salt: Like Puppet, Except It Doesn’t Suck by ishbits on Monday June 24, 2013 @06:22PM (#5936146)
At some point, to gain any form of remote access you have to put your trust in one piece of software. Being it VPN, ssh, or something.

For many people ssh is considered secure enough. And any secure issues get immediate attention so you can be updated pretty quickly.

Now any software could have unpublished zero days, which is why I also do some other host based security.

Re:Salt: Like Puppet, Except It Doesn’t Suck by calpaterson on Monday June 24, 2013 @12:44PM (#5934067)
> you care about network security, why are you exposing ssh ports in public anyhow? Put them behind a VPN.

You don't need to do this. SSH is secure enough. Require key-based authentication and leave SSH on port 22.

Re:Salt: Like Puppet, Except It Doesn’t Suck by hexedpackets on Monday June 24, 2013 @03:23PM (#5935079)
Switching SSH to any other port is a good idea as it will reduce the random attacks against it.

Sure, those drive-by attacks are pretty weak and not much of a threat against a hardened configuration and the real attackers will find the new port anyway, but it reduces noise significantly.

Cleaner logs are easier to parse, so the net result is that you can spot attacks that you care about much more easily.

Re:Salt: Like Puppet, Except It Doesn’t Suck by nuclear_eclipse on Monday June 24, 2013 @05:33PM (#5935837)
Install fail2ban, leave ssh on port 22, and have clean logs.
Re:Salt: Like Puppet, Except It Doesn’t Suck by antihero on Monday June 24, 2013 @07:06PM (#5936328)
If someone knows your IP, can't they spoof the packets and get you banned from your own server? Or did they solve this issue somehow already?
Re:Salt: Like Puppet, Except It Doesn’t Suck by pilif on Tuesday June 25, 2013 @02:21AM (#5937875)
The ssh authentication works over TCP which isn't realistically spoofable because to open a connection (which you need first, before you can fail to authenticate ssh), you need to be able to receive the response packets to your spoofed sender address
Re:Salt: Like Puppet, Except It Doesn’t Suck by nuclear_eclipse on Monday June 24, 2013 @08:16PM (#5936628)
a) This was suggested as a method to combat random trolling from botnets, so this sort of response is highly unlikely unless you're already getting DDOS'd [1], and b) Fail2Ban allows you to whitelist some IP's that won't be banned, if you really need to protect against that sort of attack.

1: at which point you'd most likely need to be a lot more involved anyways, and you should most likely be running something more serious in front of your server anyways...

Re:Salt: Like Puppet, Except It Doesn’t Suck by greenail on Monday June 24, 2013 @08:30PM (#5936691)
there is a whitelist capability
Re:Salt: Like Puppet, Except It Doesn’t Suck by grandalf on Tuesday June 25, 2013 @07:52AM (#5938762)
Did you check out cuisine.py by any chance?