Slashdot Mirror


Overconfidence in SSH Protection

nitsudima writes to mention a post on the Informit site about the common misunderstandings surrounding SSH, and how well-intentioned admins may be creating holes in their own security by using it. From the article: "In UNIX, all things are files. To send network traffic, UNIX writes the traffic to the network device file. In this case, the connection to Box A (and that private key used for authentication) is a socket file. This file will shuttle the authentication traffic between Box A and Box P. So what's the risk? Maybe the hacker can't get a copy of the private key through the socket file, but something better (from his/her view) can be done. If the hacker has root on Box D, he or she can point a private copy of the agent forwarding software to that socket file and thereby point the authentication process to the administrator's credentials--the ones kept on the 'safe' intranet. What are the chances that the administrator has configured access to all the DMZ servers he controls?"

194 comments

  1. Huh? What? by XanC · · Score: 4, Insightful

    I consider myself fairly competent as far as this kind of stuff goes, but I just couldn't follow that summary at all. Maybe it's just because it's so late. Can someone post a more sensible summary of an attack?

  2. All I need is root? by Anonymous Coward · · Score: 5, Insightful

    So all I need to do is to get a root access to a Linux server and I can spy normal users there? Whoah, now this is what I call news.

    1. Re:All I need is root? by louzerr · · Score: 2, Funny

      ... and your e-mail administrator can read your e-mail ... ... and your network administrator can see what web sites you're visiting ... ... and your ISP can watch your internet traffic ... ... and the NSA can listen to your phone ...

      So, the real trick is just to live a life so borring none of these people will care to spy on you. Not all that hard, really. Considering you're on /. - you're probably doing okay.

      --
      "The large print giveth, and the small print taketh away" -- "Step Right Up", Tom Waits
    2. Re:All I need is root? by takeaslash · · Score: 1

      You assume that linux is the only OS with ssh. Maybe it is windows running cygnus! You dont need root then.

    3. Re:All I need is root? by dnoyeb · · Score: 1

      No, I think all you need is root on a box that someone ssh into. Under certain configuration, you can then pretend to be that user with respect to other boxes that the particular user can access with the credentials he used to access the box you have root on.

  3. Root by L0rdJedi · · Score: 3, Insightful

    Yep, just gotta get root. Of course, at that point, you probably have more to worry about than someone redirecting your ssh session.

    1. Re:Root by lagerbottom · · Score: 1

      Whew, I was worried no one was going to say this as I was reading the comments.

      --
      "He was a wise man who invented beer." - Plato
  4. erm.. by Anonymous Coward · · Score: 0

    SSH port forwarding can cause trouble. Where is the new?

  5. dont really understand the problem. by geoff+lane · · Score: 4, Insightful
    If you gain access to a system within the DMZ you've already broken in ... ssh has nothing to do with it.

    Any sysadmin who configures sshd to allow direct access to a root account is incompetent and deserves to clean up the resulting mess when they are cracked.

    So what should we worry about again?

    1. Re:dont really understand the problem. by nfarrell · · Score: 1

      Agreed. This article doesn't appear to say anything insightful. The biggest problem is only alluded to, and that's the monoculture one: if everyone uses SSH to supply encryption/authentication services, a single bug could allow an SSH-worm to achieve critical mass.

    2. Re:dont really understand the problem. by FuryG3 · · Score: 3, Interesting

      I agree completely. Remote root login is disabled by default, and system administrators should *not* enable it unless there is some damned good reason. Too often I have seen sysadmins simply enable root login, and twice now I've seen someone do key exchanges so that they can 'seemlessly' ssh as root between all of their servers.

      Duh.

    3. Re:dont really understand the problem. by abertoll · · Score: 1

      Exactly. If you essentially have only one authentication to get into ALL your machines, then anything compromised includes your entire network.

      It's interesting that this site is sponsored by Microsoft:
      http://www.informit.com/

      --
      "he drew his sword Ringil that glittered like ice... and he wounded Morgoth with seven wounds..."
    4. Re:dont really understand the problem. by ladadadada · · Score: 5, Insightful

      Not quite. If you have broken into the DMZ, that's all you have. Even mildly competent sysadmins know not to trust the DMZ and therefore you do not automatically have access to the rest of the network, nor do you have access to any confidential documents.

      The exploit mentioned in the article doesn't rely on ssh being configured to connect directly to root. It relies on the attacker having gained root access on the box being ssh'd to by the sysadmin. Once the sysadmin has ssh'd to the comnpromised box (as any user) the attacker can then ssh to any other box the sysadmin has configured to use agent forwarding.

      Two solutions to prevent this compromise of the rest of the network:
      1) Don't allow the DMZ box to ssh anywhere; firewall it off. There should be no need to ssh FROM the DMZ box, only TO it.

      2) Use a different public/private key pair for each box. That way, if you didn't firewall the DMZ off it would still fail on the key authentication. The drawback of this is a) the attacker can still ssh to your admin box which contains all of the private keys and b) you lose most of the advantage of agent forwarding; the ability to ssh through a chain of boxes without any but the first needing to store the private key.

      I suppose the underlying message in the article is "You REALLY can't trust anything in a DMZ that may have been compromised. ssh is a tool that can be turned against you if one of your machines is compromised."

      --
      Sig matters not. Judge me by my sig, do you?
    5. Re:dont really understand the problem. by Anonymous Coward · · Score: 0

      Didn't confirmed it, but I just knew, just knew while reading "MSN search" phrase when article's topic included the SSH acronym and there were no "Google" string out there.

    6. Re:dont really understand the problem. by Athanasius · · Score: 2, Informative

      1) Don't allow the DMZ box to ssh anywhere; firewall it off. There should be no need to ssh FROM the DMZ box, only TO it.

      Or better yet, don't allow the DMZ host to initiate *any* connection outbound from itself, if the services present on it don't need to do such, or failing that, disallow it initiating any connection that isn't out the internet-only-facing interface(s).

      However, that's still not what the attack is exploiting, and wouldn't prevent the attack.

      The 'attack' is taking an (I)Internal (S)erver, an (I)nternal (W)orkstation, and a (D)MZ host. Your firewall/ACLs are set such that IS can't receive, or will reject, any connection from D. However IS will accept connections from IW, and furthermore IW can ssh to D. So, the well-meaning admin of D, using IW, ssh's to D, setting up a tunnel to forward traffic on port Dx on D back to IW, port IWx, and also ssh's from IW to IS, forwarding IWx to a service on IS. Thus you can now connection to (D's) localhost:Dx and end up talking to the service on IS.

      At no point is any connection initiated from D outside of itself, as the data is simply passing back through the ssh tunnel from IW to D, and then back further from IW to IS. And, no, you can't firewall D from talking to any but necessary ports on D, as we're assuming root compromise of D and thus all such bets are off.

      Now, if someone has compromised D *and* can hijack this tunnel D IW IS they have access to IS.

      Of course the real solution to the base problem is to have IS set up in some way to push data out to D, such that IW's user/D's admin doesn't have to play such silly and dangerous games in the first place. Any such 'administrator' setting up what has been described is incompetent.

      Now one last thing. The general attack hinges on an attacker's agent Aa being able to make use of the unix domain socket of the administrator's agent, Da. I'm very certain that when I tried this kind of attack on myself way back in 1998 or sooner it plain wasn't possible. If it is now then the (Open, whatever)ssh code has taken a step backwards. Basically some check was done on the origin of the messages on the socket, and if they weren't as expected the request to use the keys in the agent was denied. I think it was along the lines of "is the requesting process a (sub(sub...))child of myself?", presumably by following parent process IDs back up until it finds itself or init. Yes, ok, if the agent spawned any child that spawned a service that was subsequently compromised and not put in a new session group you could probably pull off the attack, but that is unlikely (as any service daemonising itself will end up in a new session group).

    7. Re:dont really understand the problem. by makomk · · Score: 1

      Now one last thing. The general attack hinges on an attacker's agent Aa being able to make use of the unix domain socket of the administrator's agent, Da. I'm very certain that when I tried this kind of attack on myself way back in 1998 or sooner it plain wasn't possible. If it is now then the (Open, whatever)ssh code has taken a step backwards. Basically some check was done on the origin of the messages on the socket, and if they weren't as expected the request to use the keys in the agent was denied. I think it was along the lines of "is the requesting process a (sub(sub...))child of myself?", presumably by following parent process IDs back up until it finds itself or init. Yes, ok, if the agent spawned any child that spawned a service that was subsequently compromised and not put in a new session group you could probably pull off the attack, but that is unlikely (as any service daemonising itself will end up in a new session group).

      If it uses SCM_CREDENTIALS passing the PID and UID down the socket, then although the kernel normally prevents you from lying about your UID/GID/PID, if you're root you can claim they're whatever you like (see unix(7)). Of course, this would require a modified version of ssh. I'm not sure about other similar methods of verifying credentials on Unix sockets, but I wouldn't be surprised if they were the same.

    8. Re:dont really understand the problem. by ladadadada · · Score: 2, Insightful
      After your description of the exploit attempt I had another, very careful read of the author's description and have come to the conclusion that we were both wrong. He is suggesting that other DMZ hosts would be compromised using the authentication credentials that should be safely behind the firewall. No internal boxes would be compromised.

      From the article: (emphasis mine)
      What are the chances that the administrator has configured access to all the DMZ servers he controls? Altering some environment variables allows the intruder to attempt to access other DMZ hosts with our administrator's private key. This can mean direct access as root or local administrator. And so this socket file becomes a door to many other systems in the DMZ.

      The convoluted setup using the workstation and the patching server were irrelevant to the fact that there was an ssh-key connection to a compromised box which then used agent-forwarding to connect to and compromise other boxes in the DMZ.

      As long as the DMZ is properly firewalled from the internal boxes it should be impossible to actively compromise them using a forwarded ssh key and hence you were completely correct in stating that your description of the attack was impossible. (I hope. If it were possible that would be... bad.

      This would also mean that if the administrator had a different public-key/private-key pair for each box in the DMZ then the attacker could not agent-forward the ssh session to other boxes and would have to compromise each one manually. However, since most boxes in a DMZ are often configured identically with a load balancer in front of them, a flaw on one that allowed the inital compromise would likely be replicated to all the others and allow them to be compromised in the same way.

      He also goes on to suggest that there might be a flaw in the administrator's patch loading scripts that allows execution of code on the patch-server but that is an entirely seperate issue and not concerned with ssh at all.
      --
      Sig matters not. Judge me by my sig, do you?
    9. Re:dont really understand the problem. by ladadadada · · Score: 1

      Some further thoughts on this:
      Imagine a situation where three load balanced web servers with internet-facing interfaces and a database server which has no internet-facing interface. A compromise of one of the web servers would allow (with a captured user-agent) a compromise of the database server.

      Obviously the statement from my last post is not entirely accurate.

      This also highlights the need for an intrusion detection system on a seperate machine that is not able to be compromised (ie. does not accept connections from anywhere) and can warn you that machine x has been compromised and not to ssh to it as doing so may enable a compromise of further machines.

      --
      Sig matters not. Judge me by my sig, do you?
    10. Re:dont really understand the problem. by Anonymous Coward · · Score: 0

      I've allowed root access via ssh for ages, but only via public key. I always disable agent forwarding.

      I understand that this is a little less secure than public-key-to-user account and then sudoing. However, it's very hard to use sudo when automating large-scale scripts, where I'm pushing out a root-level change to 50 machines at once ... short of putting the password into the scripts.

      It strikes me that allowing root-level, key-only access is less bad than putting plaintext passwords into scripts on DMZ servers. It also makes a different password on every root server easy and convenient, because the password itself is relatively unimportant. Only the key matters, for routine maintenance. If one server is compromised, it doesn't mean that the entire DMZ is instantly dead.... just that one server. (I generally also configure all DMZ machines to refuse SSH connections from any other DMZ host.) Compromises aren't 'contagious' in quite the same way. Of course, if the key itself is compromised, you lose everything, but that's also true of encrypted files with all your server passwords in them.

      People say, over and over, "don't allow root access via ssh", but the only good way I've found to administer large numbers of machines at once is with key-only access to root. Am I missing something?

    11. Re:dont really understand the problem. by Anonymous Coward · · Score: 0

      It is not disabled by default, and I am glad it's not.
      http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ ssh/sshd_config

    12. Re:dont really understand the problem. by Athanasius · · Score: 1

      A cursory check with OpenSSH on my debian box showed you can set the environment variables and gain access to an ssh-agent you "shouldn't" have access to. Although the way I tested it OpenSSH may still have been doing 'something clever' in the background (ssh -a localhost to get a fresh login without contact to the previous ssh-agent, change the "env | grep SSH" variables to those from the previous ssh-agent, try ssh to a remote machine that the ssh-agent is set up for and I got in).

      So, if Mr. Stupid-Admin on IW is doing this tunneling trick, or otherwise simply has his IW ssh-agent set up to allow instant ssh (via key pairs) to D1 and D2, then if he is currently logged into D1, with agent forwarding enabled, and an attacker has compromised that machine D1, then iff D2 allows ssh connections from D1 using the same key as for IW -> D1, the attacker can hop from D1 to D2 (as he can use the compromised ssh-agent/sshd on D1 to back-request the necessary key interaction on IW).

      But, still, this is all about incompetent sysadmins. First if there's no reason to allow ssh from D1 to D2 (to Dn in the general case), firewall it off where-ever possible. Secondly who'd be stupid enough to set it up so the IW -> D1 key pair will also authenticate D1 -> D2 ? An incompetent sysadmin, that's how.

      Anyway, all this aside, I think the original /. poster got confused and tried to make out the article is about a flaw in ssh, it's not. The article is about how Mr. Incompetent Sysadmin can easily configure ssh/ssh-agent/keys/firewalls to enable security holes that wouldn't be there if ssh didn't do all this frightfully clever port forwarding, agent forwarding, and public/private keypair authentication. Take the article as a heads up "If you do X, be careful because it may means someone else can do Y via it". To sum up "Incompetent Systems Administrators May Open Security Holes On Their Systems!".

    13. Re:dont really understand the problem. by Lord+Ender · · Score: 2, Informative

      Care to explain how a remote root login is any more dangerous than a remote user login when the user can sudo to root?

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    14. Re:dont really understand the problem. by gtwilliams · · Score: 1
      Am I missing something?

      Only if you have not considered the NOPASSWD tag in a sudoers file.

      --
      Garry Williams
    15. Re:dont really understand the problem. by davidsyes · · Score: 1

      Not to be a grammuhr nahzi...

      but I suppose you meant "seamlessly" and not a form of "un-seemingly"... it's not entirely unpossible, u kown... no?

      --
      Previously: "Linux... Toward the Sunrise..." Now: "Linux... Toward the-- No, now, part of Every Sunrise"
    16. Re:dont really understand the problem. by Phroggy · · Score: 1

      However, it's very hard to use sudo when automating large-scale scripts, where I'm pushing out a root-level change to 50 machines at once ... short of putting the password into the scripts.

      Try adding NOPASSWD to your sudoers file, like this:

      admin ALL=NOPASSWD:/usb/local/sbin/foo

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    17. Re:dont really understand the problem. by traenky · · Score: 1

      I like your summary... I think other points are this: consider banning agent forwarding in high-risk environments, as all the vendors and security experts recommend. Also, understand a lot of folks are using ssh as a drop-in replacement for ftp/telnet. Get a security team together (firewall, server, OS, etc) and discuss port forwarding issues well in advance of the implementation. A support vendor tried to talk an intranet user into PC support done with SSH at a place I know. Hmmmmm, how long before the vendor has a rogue support person building cron/AT jobs that connect out at 02:00am and have dynamic port forwarding enabled? To a firewall, that's a legit inside-to-outside connection... Thanks for taking the time to respond with great understanding and with professionalism, I might add. jt

    18. Re:dont really understand the problem. by Anonymous Coward · · Score: 0

      Isn't that even worse than embedding a password or allowing key-only access?

    19. Re:dont really understand the problem. by the_B0fh · · Score: 0
      A remote root login has only one user id to attack.


      A remote user login sudo to root has an unknown number of userids to attack, some of which cannot sudo to root (even if you have NOPASSWORD, which is dumb, in a DMZ box).


      Patches should never be PULLED, but PUSHED, to DMZ boxes.

  6. So... by Anonymous Coward · · Score: 1, Interesting

    If I understand correctly, the author is talking about a complicated man-in-the-middle?

    Isn't that why SSH displays that "Private key SO:ME:WE:IR:DL:ET:TE:RS belongs to IP 127.0.0.1" or whatever?

    1. Re:So... by Dan+Ost · · Score: 4, Informative

      No, it's not really a man in the middle attack.
      It's more of a credential hijacking scenario where
      the attacker waits for you to authenticate with
      the compromised machine, forward your credentials
      to that machine, and then the attacker uses those
      credentials to reach other machines that honor those
      credentials.

      This would be more like you signing in, walking
      away from your computer, and someone else walkup up
      to the computer and doing stuff as you except that
      they get to act as you while you're still acting
      as you.

      Did that help?

      --

      *sigh* back to work...
    2. Re:So... by teknomage1 · · Score: 1

      So you're saying this "man" sits between you and the machine service you want to talk to, in order to hijack your credentials? Almost as if he's "in the middle" of the transaction? I wish we had a simple name for this kind of thing.

      --
      Stop intellectual property from infringing on me
    3. Re:So... by Dan+Ost · · Score: 1

      Not between, but rather beside.

      In a man in the middle attack, the attacker intercepts the authentication,
      and then uses that authentication information to authenticate with the
      system that the user thought he was authenticating with in the first place.

      In this attack, the attacker waits for the user to authenticate and
      receive his authentication credentials, and then the attacker uses those credentials
      to connect to other machines as that user. The attacker never intercepts
      anything, so this isn't a true man in the middle attack.

      --

      *sigh* back to work...
  7. Maybe I'm over-simplifying things by agent+dero · · Score: 1

    I'm not a security professional, but aren't they talking about man in the middle attacks? And then further down in the article, isn't he talking about generic problems with running old, unpatched software on open servers?

    but honestly, is there anything a bit of courteous knocking on the right door can't fix?

    --
    Error 407 - No creative sig found
    1. Re:Maybe I'm over-simplifying things by fimbulvetr · · Score: 1

      Port knocking is security by obscurity. Sure it helps mitigate and reduce attack vectors, but it doesn't eliminate them. If you think port knocking is a solution to anything, you are sorely mistaken.

    2. Re:Maybe I'm over-simplifying things by michaelrash · · Score: 1

      True, port knocking is outdated technology for several reasons:

      1) Difficult to solve the replay problem.
      2) Extremely easy to bust knock sequences just by connecting to spurious ports.
      3) Knocking sequences appear like a port scan to any intermediate IDS.
      4) Cannot transfer a reasonable amount of data.

      To name a few...

      There is a better way that actually offers a real security benefit and solves all of the above problems; Single Packet Authorization (see http://www.cipherdyne.org/fwknop/). Here is a paper that describes all of the benefits of SPA over port knocking: http://www.cipherdyne.org/fwknop/docs/SPA.html).

    3. Re:Maybe I'm over-simplifying things by traenky · · Score: 1

      Thanks for the post, and thanks for the great info on port knocking. I will review the SPA concept since good ideas are what keep the Internet alive. In this case, ssh port forwarding, we have a person who asks innocently enough for an outbound ssh tunnel, one to a server they control. Port-knocking offers no security against port forwarding allowing an open connection back into the intranet. So let's imagine this tunnel is done by an admin. A for effort, but if that tunnel into the organization doesn't meet remote access policies, it's a risk. Much, much worse are users who are coaxed into building a tunnel to a server so as to allow remote support. If the support vendor has a rogue employee, the employee with root/Admin (doing support, right?) can enable dynamic forwarding or static forwarding at the client software and set the client to launch auto-magically in the middle of the night. I'm not sure there's help either SPA or port-knocking can provide in these common ssh scenarios?

  8. OpenBSD? by jawtheshark · · Score: 2, Insightful
    Any sysadmin who configures sshd to allow direct access to a root account is incompetent and deserves to clean up the resulting mess when they are cracked.

    So you are calling the OpenBSD guys incompetent? After all, if you enable SSH in the default installation, you can SSH into that machine including as root.

    --
    Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    1. Re:OpenBSD? by Anonymous Coward · · Score: 0

      But it still requires the root password.
      Granted, I disable rootly ssh access as the _first_ thing I do when I get my OpenBSD install going but in the mean time -- the hacker still needs my password to get rootly.

    2. Re:OpenBSD? by Anonymous Coward · · Score: 0

      So you are calling the OpenBSD guys incompetent? After all, if you enable SSH in the default installation, you can SSH into that machine including as root.

      Incompetent? Not at all.

      Overly confident in their (openssh) software? Yes.

      In what software did you think the "only one remote hole in the default install" was in, anyway?

    3. Re:OpenBSD? by jawtheshark · · Score: 1
      In what software did you think the "only one remote hole in the default install" was in, anyway?

      I think it was ssh, but frankly... One remote hole in 8 years... I would be confident in that software too!

      --
      Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    4. Re:OpenBSD? by Anonymous Coward · · Score: 1, Interesting

      That's because openssh is no longer 'on' in the default install, so any holes it might have are no longer exploitable out of the box. How many holes in the last 8 years after you turn on essential services? Heck, NT4 had no remotely exploitable holes when it got its gov certification, since it was for a stand-alone machine with no network connection that was tested.

    5. Re:OpenBSD? by jawtheshark · · Score: 1
      That's because openssh is no longer 'on' in the default install,

      That's odd, because I installed 3.9 last wednesday and ssh was definately enabled on default install. You don't have to take my word for it, just head over to the Installation FAQ and see for yourself:

      Start sshd(8) by default? [yes] y

      If asking a question that defaults to "yes" isn't "default install", I don't know what it is.

      --
      Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    6. Re:OpenBSD? by LurkerXXX · · Score: 1

      The AC's comment isn't intersting. It's wrong. SSH is on be default.

    7. Re:OpenBSD? by thogard · · Score: 0, Troll

      Details of your hashed root password are leaked by several operating systems while pretending to secure against packet sequence numbers. Since all they are doing is hashing a hashed password and a some other guessable things that could be pre-computed or queried, your roots security have already been compromised.

    8. Re:OpenBSD? by Anonymous Coward · · Score: 0

      svc/milestone/net-init line 131 added to tcp_iss_key_init() in solaris anyone?

  9. Re:Huh? What? by jroyale · · Score: 0

    No summary for you. It is like this guy writes cliffhangers for television shows. Maybe next season he'll finish some of his thoughts.

  10. The Key is Not Transmitted by Wovel · · Score: 5, Insightful

    The key is not transmitted or sent to the socket file. This person does not understand anything about private key authentication and should return all of his certifications, and please stop posting stories by them, it is embarassing.

    1. Re:The Key is Not Transmitted by ArbitraryConstant · · Score: 1
      "The key is not transmitted or sent to the socket file."

      No, but it would be possible to get the person's key agent to authenticate you on one of their boxes. Of course, this shouldn't be news to anyone. From man ssh(1):
      Agent forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the agent's Unix-domain socket) can access the local agent through the forwarded connection. An attacker cannot obtain key material from the agent, however they can perform operations on the keys that enable them to authenticate using the identities loaded into the agent.
      I'm not sure what this 'box D' business is though. How does root on a box that they're not connected to help you get access to the socket for the key agent? A socket might be visible in the filesystem if they have root access to an NFS mount or something, but you're not going to have access to it as if it were the local machine, even if you're root. Sockets don't work that way. You need root on a box to which they're connected.
      --
      I rarely criticize things I don't care about.
    2. Re:The Key is Not Transmitted by cortana · · Score: 3, Informative

      Perhaps the author of the article should have read the source of the text you quoted. The preceding paragraph:

      ForwardAgent Specifies whether the connection to the authentication agent (if any) will be forwarded to the remote machine. The argument must be "yes" or "no". The default is "no".

      So the only people who will be caught out by this are those who:

      1. Blindly enable ForwardAgent without reading the security considerations mentioned in the manual.
      2. Set up ssh-agent without considering how it will expose their private key.

      Configuring the agent to prompt the user to confirm any signing request can be as complicated as putting the private key on a smart card (which will make the reader prompt for a PIN whenever the card recieves a signing request) or it can be as simple as using the -c option when calling ssh-add; therefore this does not seem like a big deal to me.

    3. Re:The Key is Not Transmitted by kindbud · · Score: 1

      They're talking about the ssh-agent socket file. You know, $SSH_AUTH_SOCK.

      --
      Edith Keeler Must Die
    4. Re:The Key is Not Transmitted by traenky · · Score: 1

      Did the article state the file is transmitted? No, not at all. I resisted going into great detail because many times too much detail has people misunderstanding and writing foolish comments. So I avoided the detail to ensure I wouldn't read people, who misunderstand a simple concept, write foolish comments. Or so I had hoped. jt

    5. Re:The Key is Not Transmitted by mackman · · Score: 1

      "Maybe the hacker can't get a copy of the private key through the socket file..."

      He's saying you can use the authentication agent socket dup to forward your own login attempts to the admin's authentication agent. No keys are sent, but the admin's agent will use the admin's key to allow your own surreptious logins.

  11. Not a SSH problem? by andy753421 · · Score: 3, Interesting

    Maybe I read the article wrong but it seems to me like a problem with someones design and not with SSH, a little like saying Unix is insecure because a unwitty sysadmin could try to make his life easier by using a blank root password.

    1. Re:Not a SSH problem? by joe+155 · · Score: 1

      one problem with SSH is that, at least on my Fedora Core laptop, it allows remote root logon by default... I don't really get why normal users would want this. it is possible to disable just by changing one of the files so that root login = no but i think it should be off by default. The article seems overly complicated so this might be totally unrelated, but i ddn't get it.

      --
      *''I can't believe it's not a hyperlink.''
    2. Re:Not a SSH problem? by Anonymous Coward · · Score: 1, Interesting

      yeah...the article is basically correct, but unintelligible. you can turn off root login easily in the ssh config file (though I leave it on so that i easily kick off a script that runs as root on that host.)

      IMHO, the REAL problem that people have with SSH is this:

      1) If you turn an IDS on your network and all traffic is going to port 22 and everything is encrypted then you have NO IDEA what really goes on in your network.
      2) A compromised home system will be able to masquerade as its owner inside the intranet.

      Example of making intranet services available to the whole world:

      #make the ssh server on my work desktop available in my home network (on server joeshouse.org):
      ssh -L9999:joedesktop.work.com:22 joe@gateway.work.com
      #make the accounting server available for the whole world at http://joeshouse.org:8000/
      ssh -g -p 9999 -L8000:accounting.work.com:80 joe@localhost
      #ditto for the cvs server (probably ssh encrypted access)....
      ssh -g -p 9999 -L8878:cvs.work.com:22 joe@localhost

      Example of refusing to use the official proxy server while at work, using personal from house instead
      ssh -L9999:joeshouse.org:22 joe@joeshouse.org
      ssh -p 9999 -L3128:localhost:3128 joe@localhost

      Example of playing on my favorite gaming server for a 3:00am game before I head home for the night:
      ssh -L9999:joeshouse.org:22 joe@joeshouse.org
      ssh -p 9999 -L2379:goserver.igoweb.org:2379 joe@localhost

      In every case, the admin sees nothing but ssh traffic from joedesktop.work.com to joeshouse.org:22. Nothing other than the volume of traffic would trigger suspicion. End users in the network have actual privacy under this scenario, which conflicts with having accountability. You have to actually trust your end users now.

      Where I work, the admin basically just shuts down all incoming access to a single ssh gateway, and an http proxy going out. He doesn't take requests to open up ports and such. He will tell you to use ssh and do it yourself. Implicit in this is the idea that this does defend from outside attacks on the network, but it places a level of trust in the employees (to be neither extremely stupid nor malicious)

      You can tell yourself that if you get rid of SSH, this problem will go away, but ANY tunnel can be used to do this (https://joeshouse.org for instance). You can set up an SSL service on joeshouse.org:443 and it happens to just be a tunnel to ssh. You could create an SSL tunnel that lets you set up port forwards just like SSH does now, with no way the proxy could tell what happens under that encryption. The fact that the tunnel is encrypted means that you can't spy on users to try to limit what they do. We are the kind of employee population where almost everyone knows all the routes around official policy, so you just have to tell them what activities are prohibited (don't run p2p at work, dont visit pr0n sites, etc) and enforce by non-technical means.

    3. Re:Not a SSH problem? by traenky · · Score: 1

      Interesting analogy, admin who gives a blank root password. But in that case, the admin is very much in control. If a user on one of your managed devices builds an ssh tunnel to an external device s/he controls, the reverse connection means s/he has given access to your server from the internet. Additionally, depending on the port forwarding connections allowed in the client config, your server is the gateway into the rest of the organization for the attack. So at that point, people in security stop your life to have you explain why it is you allowed your server to be open from the Internet and then let it attack all other devices. No, it isn't fair admins get the worst treatment in an investigation many times.

      It also isn't 'fair' that a userspace application can do so many things without any use of root authority. If a user tells you s/he wants to share that account via rsh, you laugh and won't start the daemon. If s/he shares out the account via vnc, especially with a password like 'password' that your normal filters would block, you might spot the open ports and shut it down with a warning. But put vnc in an ssh tunnel bound to localhost, well, how many of us are checking localhost connections? jt

  12. Re:Huh? What? by limegreen · · Score: 4, Interesting

    I think part of the article is trying to say that users can enable their own ssh tunnels to home, and thus if their home network is compromised there is an easy route into the office intranet.

  13. Hopefully, a better summary... by perlionex · · Score: 3, Informative

    The submitter didn't summarise anything, he cut out a chunk which didn't make much sense on its own. It didn't help that the article was fairly long-winded. This is what I understand the author is trying to say:

    Administrators use SSH to run scripts (from server A) to patch other servers (B, etc). These scripts are automated and make use of credentials stored in server A to gain access to the other servers (B, etc.).

    If a hacker gains access to server A, he can then use the credentials to access the other servers.

    As others have commented, this is kind of a "duh" moment. What's the next article?
    1. Re:Hopefully, a better summary... by grammar+fascist · · Score: 0, Troll

      As others have commented, this is kind of a "duh" moment. What's the next article?

      If you install and enable Apache, people can download arbitrary files from your web root directory! Also, driving cars requires gas, and plastic surgery made Paris Hilton uglier.

      Shocking stuff.

      --
      I got my Linux laptop at System76.
    2. Re:Hopefully, a better summary... by ashridah · · Score: 1

      Let's not forget that openssh can very easily be setup to only allow a particular key to execute a particular command.

      Of course, this only adds a layer of obfuscation and effort into an attacker's attack plan, but it's a fairly simple trick to vastly reduce the issues here.

      ash

    3. Re:Hopefully, a better summary... by flooey · · Score: 4, Interesting
      Administrators use SSH to run scripts (from server A) to patch other servers (B, etc). These scripts are automated and make use of credentials stored in server A to gain access to the other servers (B, etc.).

      If a hacker gains access to server A, he can then use the credentials to access the other servers.
      Actually, it was a little more complicated. The scenario is actually that administrators use SSH to run scripts on server A to patch server A using patches from server B. The trick is, without having credentials stored on server A, a hacker who compromised server A could still trick his way into getting server B to allow him to log in if someone was logged into server A and had agent forwarding turned on.

      It's not quite as straightforward of a duh moment (after all, server A on its own can't log into server B), it's basically just saying "when you log into a server and have agent forwarding turned on, you allow anyone with root access on that server to log into anywhere your agent can log into".
    4. Re:Hopefully, a better summary... by MSG · · Score: 1

      "when you log into a server and have agent forwarding turned on, you allow anyone with root access on that server to log into anywhere your agent can log into"

      Right, which is why agent forwarding is disabled by default. The only point to this article may be to remind the few users who use an agent and turn forwarding on in their config files that they should use the '-A' flag, instead.

    5. Re:Hopefully, a better summary... by juergen · · Score: 1

      No, it is more complicated than this.

      Admin has access to several servers, possibly at several locations, companies. Say he sits at machine A, and ssh's to B, whether automated or not. Now, if someone gets root on *B*, not A, this person can use the net connection of the authentication agent from B back to A to get access to *all other* servers the admin has dropped his key on, including A.

      That is a lot worse and not so trivial. It *is* explained in the docs thoroughly, right at the auth. agent forwarding section, so there is no excuse for enabling and not knowing it. And of course, at least with Debian, auth. agent forwarding is turned off by default for exactly this reason, and it should only be turned on for:

      - really trusted (target) machines
      - if using ssh-add -c so every use of the agent asks for local confirmation via popup
      - the agent has to talk with a smartcard read or similiar who in turn asks for local confirmation

      Jürgen

  14. wait by Anonymous Coward · · Score: 0

    I run SSH on Vista... does that mean Vista sucks too?

    1. Re:wait by Anonymous Coward · · Score: 0, Troll

      I run SSH on Vista... does that mean Vista sucks too?

      I run my cock across your mummy's face ... that means she sucks, too.

  15. Basic Stuff by sodell · · Score: 5, Informative

    The article illustrated one very convoluted way to break your DMZ security, but failed to make the simple statement: don't trust anyone, not even root, on your DMZ hosts. Allow SSH logins into the DMZ, and allow the DMZ to pull files from private network patching servers, such as apt repositories, but don't allow anyone to SSH from the DMZ to the intranet. Assume the DMZ is cracked wide open and keystroke logging. No one is going to get past the DMZ by watching you type 'apt-get install squid' but they will by watching you type 'ssh root@creditcarddb.int' and then the root password.

    Anyone who tunnels from the DMZ to a trusted host which can execute commands on a sensitive server can't see the forest for the trees. You've learned how to use SSH and tunnel, but you're lacking some basic common sense.

    Also, I don't see what good a socket catching the authentication will do ... you can packet sniff the authentication process all day long and you won't get someone's private key.

    That whole article seemed a bit of voodoo itself. Many incongruous statements, like "If the hacker has root on Box D, he or she can point a private copy of the agent forwarding software to that socket file and thereby point the authentication process to the administrator's credentials--the ones kept on the "safe" intranet."

    What does that mean, exactly? You direct the authentication process to a socket file and point the process to the admin's credentials? If the socket is on the DMZ host, and the credentials are on the private network host, how can you point the authentication process to those credentials?

    Maybe I'm stupid, but the article didn't seem to make a lot of sense.

    1. Re:Basic Stuff by flooey · · Score: 3, Informative

      What does that mean, exactly? You direct the authentication process to a socket file and point the process to the admin's credentials? If the socket is on the DMZ host, and the credentials are on the private network host, how can you point the authentication process to those credentials?

      When the admin logs into the DMZ host with agent forwarding turned on, SSH will create a socket to interact with the agent on the admin's machine. Since the wily hacker has root on the DMZ machine, he can write to and read from that socket with no problem, and thus can ask the agent to authenticate to anywhere that the agent is willing to authenticate to (what he actually would do is just set environment variables for SSH that say "I'm using agent forwarding, my agent is located at {admin's agent forwarding socket}").

  16. Re:Huh? What? by Riku · · Score: 5, Informative

    Here's a summary for you:

    User A on box foo:
    foo> ssh-agent xterm
    foo> ssh-add
      * enters their pass key *
    User A can now ssh to any box that has their public key in box:$HOME/.ssh/authorized_keys

    User B (evul hacker with root on box foo):
    foo# SSH_AGENT_PID=XXXX; export SSH_AGENT_PID
    foo# SSH_AUTH_SOCK=/tmp/ssh-YYYY/ZZZZ; export SSH_AUTH_SOCK
    User B now can ssh to any box that User A can, as above.
    (where XXXX, YYYY, and ZZZZ are determined by evul hacker)

  17. Re:Huh? What? by ladadadada · · Score: 2, Informative

    It's not just you. I had to re-read it several times.

    I think the main point (the one the article submitter picked up on) was that if an attacker can compromise your DMZ box (the most vulnerable box your company owns and hence the least trusted box your company owns) that has no private ssh keys stored on it and can't connect to any other trusted box but does have trusted boxes connecting to it, then he can use that to compromise further trusted boxes inside the organisation.

    To put it another way, if you ssh to an attacker's machine using agent forwarding he can probably ssh back to yours.

    --
    Sig matters not. Judge me by my sig, do you?
  18. ssh is not god by DrSkwid · · Score: 1

    It might be good but it's not god.

    When ssh is your inter machine security model, you know something *must* be wrong.

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:ssh is not god by kestasjk · · Score: 1

      When you make a nonsense comment like "When ssh is your inter machine security model, you know something *must* be wrong.", you know something must be wrong.

      --
      // MD_Update(&m,buf,j);
    2. Re:ssh is not god by Anonymous Coward · · Score: 0

      lolroflsox!

  19. lol by Anonymous Coward · · Score: 0

    I use SSH, I use it for tunelling VNC connections to remote sites for support.

    Can't remember which way round it is, it's too early to be doing any serious thinking... but I believe you need both the private and public key at each end to do two way communication i.e. initiate an outbound connection from either host.

    So on the DMZ machine you remove the key used to initiate an SSH connection and just leave the key used to check the incoming connections, voila, one way communication...

    At least I think that's how it works in principle, certainly works in practice as that's how I've configured and tested it, like I say, too damn early to be thinking about this...

    Anyway, on my config it's forced to use key exchange, you can't just login as normal so yeh the attacker can compromise a DMZ server but he cant get back into my central server, anyway, to compromise one of the DMZ servers he would need to be able to gain access to the physical machine as for security reasons all my remote machines are locked down as well, they just route the VNC traffic at the remote site.

    Could a hacker get into one of my remote SSH boxes using a first day SSH exploit, errr very doubtful, they only allow incoming SSH connections from specific IP's, controlled by netfilter, not SSH.

    Do I think SSH is secure ?, damn right I do...

  20. Clever SSH setups by Cee · · Score: 1

    Basically the article states that with too clever setups of SSH, you're likely just to fool yourself. I agree in one way, since it's true that SSH allows very complex configurations. On the other way, who trusts _any_ daemon that you can talk to from any host on the internet? I certainly don't. The article doesn't really mention the one thing I worry about SSH, a security hole in the server software itself. That's why I use iptables for a first defence.

    Interesting read though, made me aware of some security issues I never thought about (probably since I just use SSH for direct host-to-host communication). But really, a more hard to understand article is hard to write. Took me a couple of reads to even grasp how the attacks work.

    1. Re:Clever SSH setups by traenky · · Score: 1

      SSH is one of the neatest tools in a security person's toolbelt. It is similar to sendmail in terms of complex configurations that have odd, unintended effects. In the one target scenario, Rogue Insider has the work pc connect to the RI-controlled server. Port forwarding rules are in place on the CLIENT software. So now, RInsider can initiate traffic from the controlled server, on the Internet, is to the SSH Client software. And that is the challenge, to see how CLIENT software, under the control of Rogue Insider, can enable internal access from a server on the Internet. Now, there are several articles on these setups, a great number more than when I was thinking through the vulnerability two years ago. Does your workplace have self-important users who will foolishly enable this 'private VPN' that doesn't need authentication to the company remote access machine? 8-) jt

  21. Re:Huh? What? by andy753421 · · Score: 0, Troll

    Maybe this randomly generated summary will help... at least it can't be much confusing :)

    "SSH the wonder tool of the security set. I read one article about a vicious cycle! Want to know more? Comment on this article below. We'll skewer FTP and make a mockery of rsh. There are two types of port forwarding: * Local forwarding. Allows the client and the patching server, something normally verboten. The DMZ servers would route through the socket file, but something better (from his/her view) can be done. If the hacker can't get a copy of the agent forwarding risks. Depending on the local host adapter on any port the user chooses."

  22. AgentForwarding AS AN OPTIONAL FEATURE by meridian · · Score: 3, Informative

    YES Thats correct you can use AgentForwarding.... If you are stupid enough to use agent forwarding to a host you don't trust or you would consider insecure ITS YOUR OWN STUPID FAULT IF YOU GET HACKED. Now for the evil h4x0rz to use agent forwarding on the host you connect to to hack the machine you are coming in from requires quite a number of things to be done on your stupid behalf that sure wouldnt be enabled by default and you would almost need to set them up purposefully. The only real danger with agent forwarding to an insucure host is that evil h4x0rz on that host can use your forwarded authentication agent to connect to boxes that are set up to both allow connections using that ssh-key AND allow tcp connections from any box that the evil h4x0rz have access to. Aside from that it is only as insecure as establishing a telnet session to the box and having some buffer overflow occur back to the client due to poor code on the client side. I am sure not about to stop using ssh for some "simpler" protocol like telnet but I will sure keep disabling AgentForwarding and any kind of portforwarding the hosts I dont trust and I ASSUME EVERYONE ELSE WILL CONTINUE TO DO THAT AS WELL. Otherwise you might as well start posting your root passwords to slashdot which may or may not matter if you have locked your systems down correctly in the first place.

    --
    meridian at tha.net
    1. Re:AgentForwarding AS AN OPTIONAL FEATURE by meridian · · Score: 4, Informative

      Actually...
      Rather than assume anyone^H^H^H^H^H^Heveryone on slashdot has any brains when it comes to Securing SSH let me give you some tips I/Other people have

      Restricted ssh shell for scp/sftp http://sublimation.org/scponly/
      Patch to lock out IPs brute forcing passwords http://ethernet.org/~brian/src/timelox/

      Can add restrictions to authorized_keys file
      from="hostipaddress",command="/usr/local/sbin/ssh_ command_allow_rsync",no-port-forwarding,no-X11-for warding,no-agent-forwarding,no-pty ssh-rsa AA...= backup_key

      Securing sshd in /etc/ssh/sshd_config
              Protocol 2
              PermitRootLogin without-password
              PasswordAuthentication no
              ChallengeResponseAuthentication no
              ClientAliveInterval 60
              ClientAliveCountMax 30

      The first line says to stop using the old, lower security ssh protocol-1.

      The second line is a hedge that says never allow root logins using the unix password -- always use some other authentication.

      The third line says don't allow skey authentication. It is a good idea to turn this off if you aren't using skey at this time. (Skey implements a series of non-reusable, one-time passwords. If you were using it you would know.)

      The fourth and fifth lines simply make sure that any connection to a client that doesn't respond at least once each half hour gets closed. After editing the sshd file, restart sshd or reboot for the changes to take effect.

      31-12-2004: new rate-limiting feature in -current. This would block hosts that exceed 10 connections per 60 seconds.
          pass in on $ext_if proto tcp to $ext_if port ssh flags S/SA \
                      keep state (max-src-conn-rate 10/60, overload )
          block in on $ext_if proto tcp from to $ext_if port ssh

      Also my previous post to do with limiting user connections to SSH during the scarey SSH port scanning days of not so long ago...
      http://it.slashdot.org/comments.pl?sid=156058&cid= 13084357

      Repeated here for your convenience:
      Ways around SSH Brute forcing (Score:1)
      by meridian (16189) on 11:06 AM July 17th, 2005 (#13084357)
      (http://www.thief.net/)
      There are esentially three ways to fix this problem.
      The first is to patch sshd which is probably the least preferable way as you would need to continually keep patching with each upgrade. But this seems effective allowing you to exec a system command such as iptables.
      http://ethernet.org/~brian/src/timelox/ [ethernet.org]

      The second is to use iptables to limit connection attempts from an IP address. One problem with this is people who use scp alot may quickly rack up that connection limit.
      Here is a recent example from the iptables mailing list
      iptables -A INPUT -p tcp --dport 22 -s ! $My_Home_Firewall_IP -m state --state NEW -m recent --name SSH --set --rsource -j SSH_BF
      iptables -A SSH_BF -m recent ! --rcheck --seconds 60 --hitcount 3 --name SSH --rsource -j RETURN
      iptables -A SSH_BF -j LOG --log-prefix "SSH Brute Force Attempt: "
      iptables -A SSH_BF -p tcp -j DROP

      The best in my opinion is a pam module found at http://www.kernel.org/pub/linux/libs/pam/modules.h tml [kernel.org] called pam_abl
      This does not have the problem of the IPTables method that may mistake multiple fast scps etc as an attack attempt, and will not require coninutal repatching of the kernel such as the timelox patches.

      --
      meridian at tha.net
  23. There is a reason.... by Anonymous Coward · · Score: 5, Informative

    Why the developers of ssh have an option to forbid agent forwarding. Isn't it off by default? I cite from "man ssh":

    >>>
                              Agent forwarding should be enabled with caution. Users with the
                              ability to bypass file permissions on the remote host (for the
                              agent's Unix-domain socket) can access the local agent through
                              the forwarded connection. An attacker cannot obtain key material
                              from the agent, however they can perform operations on the keys
                              that enable them to authenticate using the identities loaded into
                              the agent.

    So wha is slashdot running an article about something where there is an explicit one-paragraph long waring in the man page of program at the option in question.

    Yes, no doutbt there are a lot of idiots around, who without understanding,do things which require semantics which leads to a security leak (there is abolutely no way if you want to initiate authenticatication from processes on a machine to avoid root to do the same - as log as you are not asked on the agent's side each time before authentication;

    1. Re:There is a reason.... by Anonymous Coward · · Score: 1, Interesting

      Agree 100%. To anyone who has read the SSH documentation, this is old news. However, judging from the number of posters in this thread who seem confused about the nature of the attack, I guess that most people either (a) don't read manuals, or (b) never considered how 'ssh-agent' performs its magic. Now. at least, they know.

    2. Re:There is a reason.... by Antique+Geekmeister · · Score: 1

      Oh, it's worse. It's like Simson Garfinkel's "UNIX Security" book: he waves his hands at some complex vulnerability without making it clear, and ignores the real risks. For SSH, the real risk is idiots who refuse to use ssh-agent and keep copies of their private key, unencrypted, on insecure machines. Worse, people keep unencrypted private keys on poorly managed NFS shares so that any shmuck who plugs into a local network with a laptop can look in "/home" and get all the SSH keys.

      Even more fun, many sites running NIS or gateway servers still fail to enable "shadow passwords", which means that any random user can look at the encrypted password list and run Alec Moffett's old "crack" program against them, and get roughly one-in-ten of all passwords decrypted. (Yes, MD5 passwords help, but a lot of people still don't use that.)

  24. This has nothing to do with ssh per se by Anonymous Coward · · Score: 0

    This has everything to do with using tunnels to circumvent network security zones. In this case, if the box you are tunneling through is compromised, this can easily lead to the unauthorized access of the box you are tunneling to.

    1. Re:This has nothing to do with ssh per se by Athanasius · · Score: 1

      Indeed, or even more precisely, the entire thing is about incompetent systems administrators.

      If your DMZ box needs access to patches then sort out the patch server *pushing* them out. Or at the very least grab them on your workstation from the patch server, then push them to the DMZ host from there. Under no circumstances do this double-tunnelling tricks to allow the DMZ host *any* direct access to the internal patch server, even if it's to a single port, for a single daemon, that you think is coded correctly and thus secure.

  25. Never understood why they invented the SSH-AGENT by wtarreau · · Score: 2, Insightful

    Personnaly, I never understood how talented SSH developers came to the conclusion that they needed to invent such a crappy thing : ssh-agent. And I've seen people use it, the same people who put their private keys on USB sticks to ensure that nobody will steal them, but who are not afraid of collegues having root access on their machine ...

    ssh-agent is a solution to grant any process on the system full access to a means of authenticating through your private key. No comment ! There's nothing difficult in typing
    a passphrase each time you connect to a remote site !

    --
    willy
    high performance free load balancing solution - http://w.ods.org/haproxy/

  26. Re:Huh? What? by Onan · · Score: 4, Insightful
    User B (evul hacker with root on box foo):
    foo# SSH_AGENT_PID=XXXX; export SSH_AGENT_PID
    foo# SSH_AUTH_SOCK=/tmp/ssh-YYYY/ZZZZ; export SSH_AUTH_SOCK
    Uh, this is hardly the only way that someone with root on the machine from which you're authenticating can obtain your credentials. Far more effective than this would be for them to simply take your private key file and grab your passphrase as you enter it; that would allow them to use these credentials forever in the future, rather than being limited to when you have an agent running on their machine.

    So... how does this even remotely approach being news? Yes, if you type your passwords into a machine on which someone else has root, you have given those passwords to them! The horror! I had no idea!

    The best thing I can say about this article summary is that it did not misrepresent the actual piece. The article itself was also muddled tripe, filled with semi-true and completely-irrelevant noise like "in unix, everything is a file..."

    It appears that the author is just a firewall admin who's offended that ssh can be used to thwart his precious acls, and invested in giving the tool a bad name.

  27. Solution available by Anonymous Coward · · Score: 0

    Wow, we're lucky that there's already a fix for this attack. It's called Rockwell Automation's Retro Encabulator.
    watch the google video

  28. Re:Never understood why they invented the SSH-AGEN by Onan · · Score: 1
    ssh-agent is a solution to grant any process on the system full access to a means of authenticating through your private key.
    Any process on the system running as you or as root, you mean.
  29. Wrong by Anonymous Coward · · Score: 0
    In UNIX, all things are files


    No, in UNIX, most things are files. In Plan9, all things are files.

    And I feel safe here since I don't use unix, I use GNU, and GNU is NOT UNIX!
  30. Re:Huh? What? by Tiro · · Score: 1

    That's not funny. Some of us actually care about this story. You're just wasting time.

  31. And this sort of thing doesn't matter by Sycraft-fu · · Score: 0

    At least in most corperate settings. Why? Central user authentication. You have something like LDAP or AD or whatever that makes it so one login works everywhere. Right, so if someone roots a box, all they need to do is su to a user and change that user's password, which will be propagated back to the authentication server. They now have access to everything, or rather they can log in to any computer as that user.

    Just kinda how it goes if you want to have easy management. The only real prevention for this kind of thing is to compartmentalize everything. Each system has different passwords and such. Ok that might work if you have like 3 systems, but if you have 500, forget about it. Best you can do is compartmentalise the real critical stuff.

    That's what we do. The somewhat critical stuff is on LDAP, but has no sudo and the root password is different from the normal one and also only allows logins from computer support accounts. The really critical stuff is not on LDAP at all. Works fine, but still using the "root one box, change someone's password" trick you get access to a ton of systems. Just goes with the territory. Good incentive for us to keep our patches up and firewall clamped down.

    1. Re:And this sort of thing doesn't matter by Kadin2048 · · Score: 1

      My understanding (and I don't do network security as a career, but I do hang out with people that do) is that putting root logins into the LDAP or AD server is considered bad practice. System root logins are supposed to be kept at the per-system level, so that if one machine gets broken, the attacker can't use the LDAP/AD system to propagate the break to the entire intranet.

      The admin-types I know all have their regular user accounts on the LDAP system, so they can do single-sign-on like the rest of us (to their email, shared volumes, photocopiers, whatever), but their administration passwords to various systems are separate. (And occasionally written on business cards in their wallet, but that's a separate issue.)

      --
      "Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."
    2. Re:And this sort of thing doesn't matter by davidsyes · · Score: 1

      From your sig file:

      "If only we could make stupidity more painful..."

      to my sig file:

      "If only we could make poopidity more stainful..."

      --
      Previously: "Linux... Toward the Sunrise..." Now: "Linux... Toward the-- No, now, part of Every Sunrise"
    3. Re:And this sort of thing doesn't matter by Sycraft-fu · · Score: 1

      Root is seperate but that doesn't matter in terms of access to a system. You odn't log in to a system with root, you can't, you login as a normal user. So doing as I suggest gets you access to every system, not root access, but still. It is, of course, much easier to find a local exploit to get root than it is purely remote.

      Also, in most cases, you need only find out the root password once. As nice as it is to think amdin can remember 500 different root passwords, they can't. Most of the systems will have one root password. It'll be stored locally, but it'll be the same scross all systems.

  32. mind the ends... by yukonbob · · Score: 1

    /me thinks this article is saying "the tunnel may be encrypted, but mind the ends"...

    which isn't news to anybody who's in the know about security or ssh... ssh isn't going to butter your bread, or do anything outside of securing end-to-end transmissions... I can't see anything new being introduced here...

    1. Re:mind the ends... by traenky · · Score: 1

      Hmmm, fair summary. So how many know that ssh can act as both a nice, secure replacement for telnet/ftp/r* AND a traffic forwarding technology? As organizations go forward with their plaintext protocol replacement plans, folks assume ssh is an dropin. And it can be. So as your organization okays outbound ssh, at some point it must understand that decision enables private vpn connectivity into the organization. There are some great writers in this thread who know ssh security. Trouble is, that's not everyone. Those with some knowledge of port and agent forwarding create some awkward designs to get around those firewalls... So if folks step back and consider ssh's growing use, the articles advising you to use it as a private vpn, the way it can gateway access to normally closed off RFC 1918/3330 networks, etc; there's a lot of change going on and a lot of impacts to consider. jt.

  33. Re:Never understood why they invented the SSH-AGEN by yukonbob · · Score: 1

    mod parent up...

    grand parent either hasn't had multiple terminals open to a half dozen (or more) remote clients, or is completely fine with typing a secure passphrase every single time (s)he wants a terminal... if any host is rooted, nothing's guaranteed after that... perhaps a binary has been been swapped out, or if you're running X11 forwarding, you're putting your own X server at risk, but I don't see what that's got to do with ssh... just don't put more faith in it than it deserves... running ssh isn't a cure for pop-ups, viruses, trojans, or erectile disfunction...

    -yb

  34. wtf by Anonymous Coward · · Score: 0

    In UNIX, all things are files. To send network traffic, UNIX writes the traffic to the network device file.

    That's plain wrong to begin with. I stopped reading there.

  35. Re:Never understood why they invented the SSH-AGEN by Anonymous Coward · · Score: 0
    ssh-agent is a solution to grant any process on the system full access to a means of authenticating through
    your private key. No comment !


    That's (a) true, but (b) not what the article is about. You are on box A, running ssh-agent. You ssh to box B. If someone on box *B* has root, they could theoretically use the socket file on box B to then ssh to any other boxes C,D,E... on which you have enabled key authentication, but only while you are still ssh'd in from A to B. There's a warning about it in the ssh man page.

    There's nothing difficult in typing a passphrase each time you connect to a remote site !


    If you have to do automated stuff, using the agent is still better than keeping a private key on box B, especially if you need a degree of automation that would entail having a null passphrase on that key.
  36. Re:Huh? What? by ipso_facto · · Score: 2, Interesting

    If someone gets root on one of your boxes, all bets are off as there's a very good chance that they'll get root on another one of them (by keylogging passwords, brute forcing the password on a sudo enabled account, passwordless ssh keys, hijacking a session etc etc)

    Wash, rinse, repeat.

    Before you know it your whole DMZ is rooted (in more than one sense).

    In short:
    - If you find a compromised box on your network, assume there's more than one and order pizza... you're in for a long night.
    - Segregate your networks so if someone, say, gets at your DMZ there's no way to get into your internal or other production network i.e. no ssh or accessible services on your firewall machines on the DMZ interfaces.

    i.e. It's not just an issue with ssh.

  37. Next article by Anonymous Coward · · Score: 0

    Will concentrate on the design flaws of TCP and UDP protocols; because obviously firewall NAT piercing is a security hazard (if you assume a FW equals security) and certainly those protocols are to be blamed (for making it so easy).

    Btw I think the submitted part gives the right impression; imo the article doesn't contain much (valid) information, at least not in coherent form.

  38. MitM by tm2b · · Score: 1

    As far as I can tell, they're just describing an instance of the well-known problem of the man-in-the-middle attack.

    This is not a vulnerability if you know the other key's hash/residue and compare it each session, as ssh can be configured to do.

    Nothing to see here, move along.

    --
    "It is our blasphemy which has made us great, and will sustain us, and which the gods secretly admire in us." - Zelazny
  39. another article from... by Octavian59 · · Score: 1

    Zooooooooonk!

    1. Re:another article from... by Anonymous Coward · · Score: 0

      Funny, while I was reading the article I was thinking "KHAAAAAAAAN!!". You're right dear sir, there is a shatneresque feeling to it.

      Now where did I put my croissant.. hmm. No.. NO! KHAAAAAAAN!!

  40. Trust: same problem as always by ishmalius · · Score: 1
    In the end, you must trust the entity on the other end of the wire. This is true whether you are talking about Unix sockets, telegraphy, semaphore, or the one-time pads rolled up in Che Guevara's cigar box.

    The idea of looking at the memory on the ass-end of an SSH connection is stupid. It's one of the ends, where the other trusted party lives. For all you know, your buddy prints your secrets onto nice vellum paper and gives it to the enemy. No electronics can save you if you can't trust the other guy.

  41. Re:Never understood why they invented the SSH-AGEN by netjae · · Score: 1

    ssh-agent is inevitable.
    Suppose you frequently use a program that communicates over ssh connections, e.g. cvs, rsync, svn, or darcs. You wouldn't want to type your key's passpharse each time you run the program. Of course you never want to leave your key's passphrase null. Therefore, you need ssh-agent.

  42. But easiness of avoiding acls is crucial ... by Anonymous Coward · · Score: 0

    Overall I like the article for one strong point :

    ssh allows EASILY circumvent a lot of security measures ...

    Vulnerability requires users stupidity - like in the example here but man, can you honestly tell
    you always had separate keys for each security zone ? You never used agent/X forwarding between zones ?

  43. Worse than that! by Anonymous Coward · · Score: 0
    User B (evul hacker with root on box foo):
    foo# SSH_AGENT_PID=XXXX; export SSH_AGENT_PID
    foo# SSH_AUTH_SOCK=/tmp/ssh-YYYY/ZZZZ; export SSH_AUTH_SOCK
    User B now can ssh to any box that User A can, as above.
    (where XXXX, YYYY, and ZZZZ are determined by evul hacker)

    It's worse than this! In your example, the SSH user has the authentication agent running on foo, so it's possible for anyone with root on foo to reuse the agent to authenticate to other machines. However, it's also possible to use the agent on any other machine that the SSH user has connected to, provided that they have enabled agent forwarding.

    That's the problem! The administrator thinks he is safe because he is only running the ssh agent on his desktop machine. But he's not read the documentation, or thought about the implications of using agent forwarding. When he has agent forwarding enabled, every machine he connects to gets access to the ssh agent on his own machine. And, effectively, access to his private key.

    To be perfectly honest it bothers me to think that there are any Unix administrators who are not already aware of this well-known issue.

    1. Re:Worse than that! by setantae · · Score: 1

      But we all knew that already, right? That's why the default is:

      ForwardAgent no

  44. Because it's useful? by Anonymous Coward · · Score: 1, Informative
    ssh-agent is a godsend. My passphrase is > 50 characters in length - yours should be, too - and I don't want to type it more than once per login session. If you often use SSH, and have RTFM, you will be able to use ssh-agent properly, and it will save you a lot of time.

    ssh-agent is a solution to grant any process on the system full access to a means of authenticating through your private key.

    Any process? Presumably this is only if you have deliberately made the socket files world-readable?

    The alternatives to ssh-agent are password authentication and host-based authentication. I'm sure I don't need to remind you about the security issues with those!

  45. Re:Wow, this is one brave man! by Anonymous Coward · · Score: 0


    If this fella uttered similar statements in the US about the prez, I'm sure the Secret Service would come knocking within the next 5 minutes!

    thats the difference between real free speech and the pseudo attempt in the US

  46. Re:Huh? What? by Anonymous Coward · · Score: 5, Informative

    The article is about a common misconfiguration with regard to agent forwarding. The DMZ hosts aren't supposed to be safe, that's why they're in the DMZ and not in the intranet. The admin must assume that root on these machines is compromised. Consequently he doesn't store his private keys on any of the DMZ machines. But what many overlook, possibly because they don't use the feature, is agent forwarding. Once the admin has logged into a compromised DMZ host, access to his credentials is extended to the DMZ host by that ominous socket. The file itself never leaves the admin's computer, but if agent forwarding is enabled, root on the DMZ host can now point other hosts on the intranet to the authentication facility on the admin's computer. This misconfiguration enables the attacker to hop from the DMZ to the intranet. The correct way to avoid this is to disable agent forwarding (on the admin's computer, not just on the DMZ hosts, of course).

  47. Re:Never understood why they invented the SSH-AGEN by irtza · · Score: 1

    something like a use-agent is useful for clustering. Programs restricted to user X on the DMZ machine can use the user-agent to launch programs on other machines in their network. Does this undermine the security of the local network? Sure. Does this mean its unnecessary? No. The question really is whether you are willing to let the other machines be compromised. If a machine on the internal network needs special protection (ie it holds customer credit card info) then it most likely doesn't need to be part of the cluster and can be set apart.

    Are there alternatives to user-agent for building distributed software? Of course, but they also add a huge security hole for the same reason.

    At the end of the day, you could prob just consider the cluster one machine and assume all to be compromised along w/ the DMZ... I just wanted to defend the existence of agents in ssh.

    --
    When all else fails, try.
  48. They haven't heard of ssh-add -c? by biftek · · Score: 5, Informative

    A few versions ago OpenSSH added a -c "Require confirmation to sign using identities" to ssh-add to take care of this. Or using something like SSHKeychain on OS X so it'll ask for confirmation for multi-hop auth, but not for connections direct from your trusted machine.

    1. Re:They haven't heard of ssh-add -c? by David_W · · Score: 1
      A few versions ago OpenSSH added a -c "Require confirmation to sign using identities" to ssh-add to take care of this.

      I hadn't heard about this feature before, so I looked it up. All it seems to do is ask you for your passphrase every time a key is used. But SSH does this already if it can't find an agent, so I have to ask: Why would you use the agent with -c?

    2. Re:They haven't heard of ssh-add -c? by RuneB · · Score: 1

      The agent (which is running on your machine) asks for confirmation, not ssh. Your passphrase and private keys should never leave your machine when using an agent.

      --
      dtach - A tiny program that emulates the detach feat
    3. Re:They haven't heard of ssh-add -c? by biftek · · Score: 1

      It doesn't ask for a passphrase, just a yes/no answer. Not sure how the default X11 ssh-askpass thing treats it, but here with SSHKeychain I just press enter to confirm/esc to cancel.

    4. Re:They haven't heard of ssh-add -c? by traenky · · Score: 1

      Yes, this is a great switch. I also like the vendor's strong warnings against running agent forwarding in high-risk environments. I'm really happy to see these comments because many companies are rolling in ssh as a drop-in for telnet/ftp and have too little clue regarding the forwarding issues: both port and agent. Additionally, when you read articles, like the one I mention, that use port forwarding to access lower-risk zone devices from higher-risk zones, well, you pretty much know it's time to do a public service announcement. One user I know was approached for the support person for a turnkey system. Yup, could use ssh and wouldn't need a regular vpn account. I think the discussion needs to go from talking about admins using ssh to users getting talked into enabling unwise connectivity maybe... jt

  49. Bullet proof is hard to come by by HangingChad · · Score: 2, Insightful
    Short of unplugging the machine and locking it in a vault. SSH may not be perfect but it's pretty darn good. And if getting your credentials depends on someone else have administrator rights on one of your nodes, that's not exactly a fatal flaw unless your security demands are extremely high.

    Anyone with the time and resources is going to find a way into your network. Many times security does not have to be bullet proof. Don't have to be faster than the bear, just faster than the large majority of other networks. Unless there's something really compelling on your system, they're likely to pick an easier target.

    I use my home network as an example. I have one copy of XP on my system. What I consider the weak link in the security chain. It's on a NAT'd segment, I don't surf the internet with it and anything sensitive is on a TrueCrypt partition that I only mount when needed. Hardly bullet proof but not bad for Windows.

    --
    That's our life, the big wheel of shit. - The Fat Man, Blue Tango Salvage
  50. 2004 article mentions this by TomAnthony · · Score: 3, Informative
    I've never needed to use ssh-agent, and during reading this I thought I'd read up on it a bit. So I google it and found an article, written in 2004, that had this to say:
    So the bad news is that your agent keys are usable by the root user. The good news, however, is that they are only usable while the agent is running -- root could use your agent to authenticate to your accounts on other systems, but it doesn't provide direct access to the keys themselves. This means that the keys can't be taken off the machine and used from other locations indefinitely.

    Is there any way to keep root from using your agent, even though it can subvert unix file permissions? Yes, you can. If you supply the -c option when you import your keys into the agent, then the agent will not allow them to be used without confirmation. When someone attempts to use your agent to authenticate to a server, the ssh-agent will run the ssh-askpass program. This program will pop up on your X11 desktop and ask for confirmation before proceding to use the key.

    At this point you're probably going to realize that we're still fighting a losing battle. The local root account can access your X11 desktop, all your processes, you name it. If you can't trust the root user, you're in trouble.

    However this will prevent root on machines to which you've forwarded the agent from accessing your agent.
    --
    Tom Anthony
  51. Re:Never understood why they invented the SSH-AGEN by maxume · · Score: 1

    I doubt they came to the conclusion to invent ssh-agent. I imagine they released it to prevent other even more broken systems from being used. By providing a tool that is as good as it can be, no one creates an even crappier version of the same thing, i.e. one that stores the unencrypted key to disk or something.

    --
    Nerd rage is the funniest rage.
  52. Summary to the Summary by Zygamorph · · Score: 3, Informative

    Don't use SSH to poke a hole in the firewall separating your DMZ from the intranet.

  53. Re:Huh? What? by Matey-O · · Score: 3, Insightful
    I think part of the article is trying to say that users can enable their own ssh tunnels to home, and thus if their home network is compromised there is an easy route into the office intranet.
    But how is this not the case for ANY connection from a home network to the office...VPN opens up the same issues too.
    --
    "Draco dormiens nunquam titillandus."
  54. Any *good* sysadmin should know this by Cicero382 · · Score: 1

    It's hardly news.

    Just to state my position:

    1. I am a UNIX sysadmin.* I'm paranoid. My worst fear is "Am I paranoid enough?"
    2. The only really secure system is one that's been turned off, buried in concrete 100 meters deep, surrounded by 1,000 armed guards... and a minefield. Even then, I wouldn't be sure.

    Anyone who believes in some magical security of some software deserves everything they get. Get real! Security (even for *NIX systems) is a dynamic thing. If you're tasked with securing a M$ system - you have my sympathies, but at least you know that one.

    * - OK - for those who know me, yeah, yeah - I'm really a biochemist.

  55. brute force password attack by Monx · · Score: 1

    I block brute force password attacks on my home system by having a process monitor the sshd logs so that if a host fails to authenticate five times, its IP is added to my firewall's deny list. The attacker then gets to see his future connections time out. I do this rather than reject the connection outright to slow the attacker down. It's fun to think of the attacking system hanging on a partially open socket until it times out. Simply rejecting the connection would be too kind.

    Could this setup be used for a joejob? Yeah, particularly since two hosts behind the same NAT system look the same to me. The risk is low though and doesn't matter since I have physical access to the box and nobody else does.

  56. Re:RTFM by rdebath · · Score: 1
    Love it

    Oy! Slashdot you need to RTFM!

  57. Re:Huh? What? by MT628496 · · Score: 1

    Wow, news flash: Misconfiguring ssh will result in a security hole! Who ever would have guessed?

  58. Re:Huh? What? by swdunlop · · Score: 1

    "Once the admin has logged into a compromised DMZ host, access to his credentials is extended to the DMZ host by that ominous socket"

    Only if he specifies -A on the command line -- authentication agent forwarding is disabled by default; any documentation referencing -A and agent forwarding also eplains, in the next paragraph, the peril in using -A with an untrusted host. (Duh)

  59. Home/Office network compromisation in 4 steps by griffjon · · Score: 1

    1: Enable an SSH tunnel
    2: L33t Hax0r finds tunnel
    3: L33t Hax0r GETS ROOT
    4: Profit.

    Both steps 2 and 3 in this reductive version seem pretty dubious. If you tunnel in to work, then sure, you're trusting the work network and machine not to be full of malevolent people, but even still, they have to get root on your box. You didn't tunnel in from root, now, did you?

    --
    Returned Peace Corps IT Volunteer
    1. Re:Home/Office network compromisation in 4 steps by Larthallor · · Score: 2, Insightful

      I think you have it backwards. The author's concern about people tunnelling from home isn't that a compromised work machine will take-over the remote worker's home machine. He's a firewall admin and could care less about your home machine's health, in and of itself. What he is concerned about is the fact that your previously compromised home box can tunnel right through all of that hard work he's done trying to build a secure firewall and have IP access to attack the internal network's soft underbelly. SSH, IPSEC and other tunnelling solutions are putting untrustworthy machines directly inside the firewall.

      A more secure way would be to only allow non-port forwarded, remote desktop-style connections to a single cluster of terminal server machines. This would prevent direct remote attacks from the home machine against anything other than the terminal server on the terminal server ports. A compromised home machine could still allow someone to tunnel and login to the terminal server as you via remote control, but at least you have limited the attacker's access to a machine that you control and that isn't compromised. While your credentials would be compromised (via the keylogger/session shadower the attacher installed on your home machine), the attacker would only be able to do what you could do on the terminal server. You would be screwed when they detect "you" attempting to compromise internal security or sneaking out sensitive information, but the network would be much safer.

      Alternately, if you don't have a terminal server-style (RDP, Citrix, LTSP, etc.) environment set up, you could have the tunnel gateway only allow RDP/Citrix/X access to the user's work desktop with similar security attributes.

  60. Re:Wow, this is one brave man! by Anonymous Coward · · Score: 0

    This is the sort of thing George Galloway says, although I sort of agree with him. (Is that a tank I see driving towards my house?)

  61. lost a patch server before? by RenoRelife · · Score: 0
    So the DMZ box gets patches and can kick off commands against the patching server itself. The patching server for the entire company. The one safe source for binaries for all servers and client PCs. That one.
    Almost sounds as if he's speaking from past experience
    1. Re:lost a patch server before? by traenky · · Score: 1

      No, not from experience. I just remembered that article. As I considered the implications of the design, the emphasis just seemed to suggest itself. I have seen a lot of silly shortcuts, though, done in the name of 'getting the job done' without 'getting paranoid for no good reason'. But never, ever ask an old consultant to talk old stories. The one place that had an NT4 member server on the Internet itself with full domain communications through the firewall back to the one internal domain... Yes, life is full of novel designs, eh? jt One day I relate the discussion with the consultant who swore rsh was secureable... Drrrrrrr!

  62. Re:Huh? What? by ultranova · · Score: 2, Insightful

    This misconfiguration enables the attacker to hop from the DMZ to the intranet. The correct way to avoid this is to disable agent forwarding (on the admin's computer, not just on the DMZ hosts, of course).

    Sorry, doesn't work.

    I'm an 3v1l h4x0r in complete control of untrusted host X. Some poor fool uses SSH to connect to the trusted, firewalled host Haven. At this point, since I'm in complete control of X, I can simply send commands from X to Haven, doing anything the user could - including launching an SSH or telnet client from Haven's command line. What ? Haven doesn't have them ? Then I simply send one, piping encoded data to uudecode, or perhaps a mail client (to send the file to the users own account - if it's machine-local delivery, it propably won't go through the companys mail server and won't be stripped for binaries), or maybe simply through some insane sed script to turn hexcodes back to binary format - but one way or another, I'll get the telnet client to Haven.

    Well, now I have telnet in Haven, and can connect to any service running at Haven, with the connection seemingly originating from Haven itself. And of course I can connect to other intranet machines as well. Or I could use some kind of hex-to-bin proxy telnet-like program, and another one on X, to emulate agent forwarding.

    The point is that as long as there is a connectiong between X and Haven, and Haven gives the user a command line interface, it is impossible to prevent the user from forwarding arbitrary connections over it. Or at least simply preventing SSHs native support for that won't stop it from happening.

    The lesson: any machine that gives shell access to untrusted machines is untrusted.

    --

    Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  63. Re:Huh? What? by Kadin2048 · · Score: 2, Insightful

    Okay, so let me just get this straight. Executive summary, "moral of the story," whatever, is...

    Don't use agent forwarding when connecting to an untrusted box?

    Can you just mandate that as a policy or are there times when you absolutely have to use agent forwarding via an untrusted/DMZed machine? I don't think I've ever used a DMZ machine for agent forwarding, but then again it's not really a feature I've used very heavily.

    --
    "Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."
  64. Re:Never understood why they invented the SSH-AGEN by wtarreau · · Score: 1

    ssh-agent is a solution to grant any process on the system full access to a means of authenticating through your private key.

    Any process on the system running as you or as root, you mean.

    Or as yourself. It will be a real joy for virus writers when they will start to attack unix mail and web clients. We are currently laughing hard at windows with the users' address book sent all over the world by viruses, now you will simply open all your hosts to the rest of the world thanks to your agent and one undetected input relay running in your browser. Kind of smart !

    And to reply to the other poster, yes I'm running all days with a dozen of terminals, and quite frankly, typing the same
    passphrase 30 times a day trains you enough to type if without even thinking about it.

  65. Certification Monkeys by Anonymous Coward · · Score: 0

    The author of the article needs a banana. That's one of the most poorly-written articles on security I've ever had the misfortune of reading. Worse, it didn't say anything useful.

    1. Re:Certification Monkeys by traenky · · Score: 0, Flamebait

      I look forward to reading your great security writings, Anonymous Coward. Please post the urls. jt

  66. TCP Wrappers... by Anonymous Coward · · Score: 0

    Presumably, the sysadmin has also compiled ssh to use tcpwrappers (hosts.allow, etc.). Nobody gets in unless listed by IP. But, of course, tcpwrappers are not mentioned as a security precaution in the article. That would be too obvious. However, there can still be problems if you're foolish enough to allow DMZ boxes that have other security issues on the list. I don't know about you, but I rely on Betty Crocker to secure important web servers. I just smear them with a protective layer of chocolate frosting.

    1. Re:TCP Wrappers... by traenky · · Score: 1

      There are a great many things you can do in addition to TCP Wrappers, but one step at a time I suppose. As you review the example configuration, proposed by another writer, TCP Wrappers wouldn't have done much. The server would have accepted traffic from the internal PC. Now remember, the server will return traffic back through the tunnel, so TCP wrappers isn't a factor for the PC. If the pc has an active firewall, the context is through the original 'outbound' tunnel, so the firewall calls it legit. and if the firewall can somehow inspect encrypted traffic, the user will allow it since he configured his pc to the be conduit from a DMZ host to the patching server, right? Get some Virtual PC, VMWare or Xen going to see this work in detail... Fascinating stuff. JT

  67. you are a troll by Anonymous Coward · · Score: 0

    Ssh is enabled by default, you have to say no during the installer to disable it. And inetd is running by default, including several typical unix services. Ones which are considered universally "broken" and "security holes" in linux/unix circles. Despite it being this way for so many years, there's still only that one remote vulnerability.

  68. Re:Huh? What? by Anonymous Coward · · Score: 0

    That's the other way around and not the topic of the article. The article talks about a connection from a safe host to a compromised host. You're talking about connecting from a compromised host X to a safe host Haven. If you're on a compromised host, you cannot safely ssh into another host. That should be obvious. But there is no technical reason why a ssh connection from a safe host to a compromised host should enable the attacker to do anything he couldn't do before. That is, unless agent-forwarding is enabled. With agent forwarding, not only the admin's commands end up on the compromised host but also the admin's authentication power. Sending commands to a compromised host is not a problem, but accepting authentication requests from a compromised host (which is what agent forwarding does) gives the attacker access to other supposedly safe hosts. You wouldn't copy your private keys to an untrusted host, but if you use agent forwarding and ssh into an untrusted host (and not necessarily out again), the effect is very similar.

  69. Re:Huh? What? by Lord+Ender · · Score: 1, Informative

    DMZ hosts are typically configured so that they can NOT connect out to hosts outside the DMZ. This is enforced by firewall restrictions. As long as this is done, there is no problem.

    --
    A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
  70. Most importantly by Anonymous Coward · · Score: 1

    When using SSH tunnels your application and the tunnel are not properly coupled. It is an universal problem with all the solutions where you secure some application by using SSH port forwarding. It can also be extremely dangerous.

    The another easy way would be to use OpenSSL sockets. It requires a few lines of code, but not much. And it couples your application with the security methods properly. Yet it is not used commonly. Personally I would call using SSH tunnels incompetence.

  71. Re:Huh? What? by afidel · · Score: 1

    No they don't, at least not if configured correctly. If you don't allow split tunneling then once the VPN is established all traffic to the rest of the world is disallowed, this is not possible AFAIK with simple SSH. This only applies to driver based VPN solutions not SSL based ones.

    --
    There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
  72. Is this a record? by jakeweston · · Score: 1

    For the number of incorrect restatings and appraisals of an article?

  73. Understanding of DMZ by bcnstony · · Score: 1

    People's working definition of DMZ (De-Militarized Zone) depends greatly on the hardware they use.

    If the only network you admin is a Linksys box connected to a few computers and a cable modem/dsl, the DMZ (as defined by Linksys/D-Link/Belkin) is the IP address all incoming packets are forwarded to. Effectively, one of the computers on your internet is directly connected to the internet. Trafic between the 'DMZ Zone' and the rest of your network is unmonitored by the router.

    If you use something more sophisticated, such as ipcop.org (runs on any ancient machine and a few network cards) or a true firewall appliance (ShoreWall, Cisco, etc), then you have the option of having the DMZ a seperate segment of the network. You can have incoming connections forwarded to different boxes in the DMZ, all of which can communicate with each other and the outside world, but cannot talk to things on the other zones without explicit permision (called DMZ Pinholes in ipcop).

    Of course, you can also achieve this by cascading routers, as one of my friends does. He likes to share the internet freely with his neighbors, so anybody in range can connect to the internet via his wireless router. They cannot connect to his personal hardwired computers, as those are behind a seperate router which is itself plugged into the first router.

  74. Re:Huh? What? by davidsyes · · Score: 2, Insightful

    "It appears that the author is just a firewall admin who's offended that ssh can be used to thwart his precious acls, and invested in giving the tool a bad name."

    Remember the /. stories that started like, "We're setting up a company and would like to know how you would do xyz with "linux" vs Windows, how long you've been using "linux", how you got approval for it, and how long you have successfully maintained security with the limited headcount you have..." that (if you are cynical) sound like big-company-paid-for pieces meant to flush out Unix/Linux-leaning companies that "ought" to be on ms/windows-related stuff.

    Just from the "in unix, everything is a file...." I started seeing big money funding this article. I could be wrong, though...

    I wonder if /. would agree to a reader-demanded aversion to corporate-paid slipstream submissions... (opps, a ladder and mop bucket are being hurled my way...(instead of conference room executive chairs)...)

    --
    Previously: "Linux... Toward the Sunrise..." Now: "Linux... Toward the-- No, now, part of Every Sunrise"
  75. Re:Hopefully, a better summary... DARPA by davidsyes · · Score: 1

    Didn't you KNOW???!!! /. is a DARPA project. They story is a deception piece meant to cull the best of the best among the ./ (yep, ./) crowd on /.

    You will be recruited shortly. Your fate, should you chose not to accept recruitment, is to see your surfing logs forwarded to your employer...

    --
    Previously: "Linux... Toward the Sunrise..." Now: "Linux... Toward the-- No, now, part of Every Sunrise"
  76. SSH-AGENT doesn't make a root level exploit worse by argent · · Score: 2, Interesting

    If a bad guy has the ability to bypass local file permissions (whether because he's root or because you screwed up the permissions) then he can steal your credentials by putting a backdoor in the SSH client, the SSH server, the terminal driver, the file system, shared libraries (glibc, for example, is so huge and complex you could hide a trapdoor, magic hat, rabbit, three cages of pigeons, and a performing elephant there and nobody would notice).

    I've cleaned up boxes that had been rootkitted, and if you can't identify when it happened so you can restore from a known good backup you're best off reinstalling from scratch.

    The same thing is true, to a lesser extent, for local user privileges. Do you check that $PATH doesn't go through ~/bin before /usr/bin before you run ssh?

    Once someone can run unsandboxed code on your computer you're compromised, and any tool you use to examine your computer may be compromised, and ssh-agent make so little difference that it's simply not worth worrying about.

  77. Re:Huh? What? by Znork · · Score: 1

    Of course, any user sufficiently proficient to set up their own ssh tunnel to home will probably be more concerned with opening an easy route into their home network from the office intranet than the other way around (which says more about the state of many office intranets than the ease of ssh tunneling).

    As for the article, as long as you allow arbitrary connections through the firewall, there simply is no way you can technically prevent tunneling over those connections. You can create an ip tunnel over anything from http through smtp to telnet.

    As such, the problem becomes merely a policy issue; tell your 'power users' they're not allowed to create tunnels outside the intranet (and if the firewall policy has them creating tunnels to do their job, there's a serious problem with the firewall policy), and concentrate your efforts on problems with a vastly higher ROI.

  78. Re:Huh? What? by mycall · · Score: 1

    There is always ways around the split tunneling problem. USB drives, DVDs, non TCPIP networking, etc..

  79. Re:Huh? What? by retsil · · Score: 1

    I don't get this argument. Someone who tunnels to/from the office is no more dangerous than the same person who takes their laptop home and plugs it into their home network. Anyone who is allowed to take an IP enabled device from work to home is an equal security risk. I think that reverse port forwarding to localhost is better than VPN. VPN changes the network topology and can cause havoc and confusion. The amount of beaurocracy involved in VPN configuration is huge in a large organisation. All reverse port forwarding does is presume that if something can get out, then it can get back in. If SSH is sledged because it can do this, then the same userbase will just move to another protocol which can do exactly the same thing.

  80. Re:Huh? What? by traenky · · Score: 2, Insightful

    Being as filled with tripe as you claim, I might have thought I wrote simply enough for you to understand. I guess not? Under agent forwarding, the first hop device doesn't have the private key. You might review the documents on OpenSSH to understand ssh better. In there, you will find big precautions against agent forwarding in an environment that has high potential for compromise. Would you mind posting these enlightening comments of yours on the actual Informit site?

  81. Re:Huh? What? by traenky · · Score: 1

    Please explain the details: how they are prevented. If you're talking about a firewall, that is the typical block. The issue is this: Once intranet box a connects to DMZ host, the tunnel can be used by the DMZ host to contact box A. if box a has forwarding rules, dmz host can contact all boxes box a can connect to, including all devices is private IP/RFC 1918/3330 devices. So, here is my point, Organizations switch from ftp to ssh for web content posting, for example. If users don't understand forwarding, their machine may be a portal into the intranet, and if you see the connectivity from the firewall, all you have is an intranet to dmz connection. Indeed a few internal customers were approached by external support staff who wanted to use this design, calling it safe because they'd only have the connection terminating at localhost. However, once one has root or Admin on a box, the actual forwarding rules and cron/at job building outbound ssh connection, well, that exercise is left as a challenge to the student... jt

  82. Re:Huh? What? Explanations by traenky · · Score: 1

    SSH software, in both the server and client implementations, has the ability to both build an encryption tunnel and then force and forward traffic in thru the tunnel. As you review this ability on the internet, many are advancing a configuration whereby you connect to your home/external SSH server, and you do so with forwarding rules built into your work PC. Once home, you configure the home/external ssh instance to force outbound traffic to Mywork.org into the tunnel. Once the traffic hits your work PC, it is forwarded back into your workplace. This allows you to do support work w/o VPN clearance and the like. It also has been used in unsafe designs such as connecting the dmz host to the intranet patching server. Now, for your firewall's perspective, this is sole an inside to outside initiated ssh connection. This is one of the more difficult abilities in ssh to describe and discuss. I hope this summary helps. jt

  83. Re:Huh? What? by traenky · · Score: 2, Insightful

    No, not at all. When you consider the forwarding abilities of both the ssh client and server implementations, it is possible to build what looks to be an insider-initiated tunnel to the outside. Safe, right? Instead, the tunnel is used to force the traffic from the remote server back into the tunnel, and from there, throughout the intranet, including RFC 1918/3330 addresses normally unreachable from the Internet. Let me know if some kind of video file would help explain a very difficult topic in ssh. Many organizations are swapping out telnet/ftp for ssh. That part's great. It's the uncontrollable forwarding abilities that seem the biggest challenge.

  84. Re:Worse than that! Finally! Someone GETS IT! by traenky · · Score: 1

    Thanks for your great post. I wouldn't be surprised if most who read it rush over it. You see, ssh's Rep is as a great drop-in for ftp/telnet/r*. Some Unix folks have little networking background (Ahhh, the scourge of DHCP!), so they gloss over the 'other stuff'. This is in the documentation and EVERY vendor is very frank and honest about the risks. But folks get so keyed into the agent forwarding benefits, they write it off. As you review the internet literature on the topic, you'll see the configuration I discuss is commonly recommended for those who want a 'private vpn'. So spread the word about this risk--use small words though. jt

  85. Re:All I need is root? Done much with SSH? by traenky · · Score: 1

    No, as you study ssh, you find the first box has the private key. In agent-forwarding, an intermediary machine will proxy the authentication from the first box to the 3rd and final box. IF someone has root on that intermediary box, without having your private key, without your password, etc, s/he can proxy the authentication from your first box to all other boxen for which you have an account and presence. Admittedly, this is very difficult to understand, but the vendors warn against agent-forwarding in strong language. There are great ssh book by Apress (my fav) and O'Reilly. I hope this helps. If not, leave a comment at the informit site and I'll try a longer follow up. jt

  86. Re:erm.. More Explanation by traenky · · Score: 1

    The news is this: 1) organizations are using ssh as a wholesale tradeout of ftp/telnet; 2) support vendors want to use the tunnel to support your intranet PC; 3) there are many articles discussing how to use SSH as a 'private VPN'. At this point, organizations need to ensure all groups in charge of security have thought through the issues. I hope this explains how a common vulnerability is bigger news: it's growing and outside of ssh people like you and me, too many don't know this risk exists. jt

  87. Re:dont really understand the problem. More Info by traenky · · Score: 1

    So let's consider a typical ssh configuration. The intranet machine has the admin's private key. S/he connects to the first DMZ machine. Now because agent forwarding is enabled, despite the vendor's strong recommendations, the admin goes to DMZ device c. The Intruder observes this and can misuse agent forwarding's abilities to hit other dmz machines. Why? In the same way box b proxies the authentication to dmz device c, the Intruder can hit other devices and box B will proxy that authentication. Difficult to understand? Sure is! So why don't people just do as the vendors recommend and not use it in high risk environments? Being difficult to understand means this risk is dismissed as irrelevent and admins take the easy route: use agent forwarding. jt

  88. Re:Never understood why they invented the SSH-AGEN by Anonymous Coward · · Score: 0

    Who on Earth modded this drivel "insightful?"

    Here:

    $ for host in [100 hosts]; do ssh $host [something useful]; done

    Have a nice few hours typing your passphrase.

  89. Re:Huh? What? by limegreen · · Score: 1

    If you have a video to hand, then share it for I'm sure it will help a lot of people.

  90. Re:So... Set Game Match by traenky · · Score: 1

    Exactly. Great analogy as well. jt

  91. Genau und Richtig by traenky · · Score: 1

    As I review the comment, I find several are insightful and good. Others? People should not have a first beer before posting to slashdot. Here are the issues: 1) many are using ssh as an ftp/telnet drop-in replacement; 2) few understand port forwarding or how agent forwarding works and dismiss vendor recommendations in both their designs, and surprisingly, articles that are available; and 3) there are many articles on using ssh as a private vpn from home. These trends mean there must be greater awareness on SSH security and design. 4) support vendors are asking your organization's users to provide connectivity to their PC's via an outbound ssh tunnel. I'm glad readers like you have studied the risks and the vendor recommendations. Tschuess, JT

  92. Re:Huh? What? by Anonymous Coward · · Score: 0

    You're mixing up agent forwarding and port forwarding. Anyone stupid enough to open a reverse tunnel from an unsafe host gets what he deserves. The article is not about that. It's about the authentication chaining mechanism called "agent forwarding". If you don't know what that is and how it's different from port forwarding, have a look at the OpenSSH documention. Blocking all connections from the DMZ to the intranet indeed removes that attack vector, but if the admin allows connections from the internet to the intranet (because hey, SSH is safe, isn't it), then the attacker can still use the authentication facility which has been forwarded to the compromised DMZ host. Better disable agent forwarding.

  93. Re:Basic Stuff: Pretty good summary by traenky · · Score: 1

    You're not stupid by any means. There is a lot of ssh activity nowadays, and many organizations don't understand the problems they've created. The illustration regarding access to an intranet patching server is a great example of the convoluted designs many are proposing. A user group bought a turnkey system from a vendor. how will the vendor support this intranet host? The user is instructed to ssh to the vendor server and . . .

    I appreciate your commonsense prohibitions. Now imagine an organization feels people should get outbound ssh to the internet to the degree they get ftp. Better security, right? Hmmmmmmmm, so if Rogue Insider gets connectivity to an ssh server s/he controls? That connection is now an afterhours direct path into the company intranet, and there's little one can do. In this case, your very excellent recommendations seem to apply a little less. This is the ssh challenge: to get all the experts knowledgeable on ALL of ssh's abilities. Get a plan on handling ssh to the dmz and keep folks from using port forwarding in unwise ways. For every ssh expert on this list who was very wise in pointing out the vendor's security statements, I think we can see there are quite a few who struggle with the topic. It's a very difficult topic. I'm glad you took the time to strongly support the solid principle that DMZ hosts need to be contained. Admins who break that rule with any tool jeopardize much. jt

  94. Re:AF AS AN OPTIONAL FEATURE. Exactly by traenky · · Score: 1

    Great response. As you read from other responses, some don't know about the risks of Agent forwarding. They either don't read the vendor's very strong warning against it or they don't understand the full impacts. So they enable it. And I agree with you; enabling it in a DMZ setting makes for very strong risks. And I'm amazed why people don't see the risk as clearly as you do. I _like_ agent forwarding in an intranet setting when I'm working as a basic user. I have my private key on a cdrom. I ssh to a gateway machine, and from there, I can access the other servers, one at a time. Do intranet hosts get hacked? Sure do. But maybe a little less than the DMZ hosts facing the Internet? It helps to have a gateway box with tight security and good logs and IDS... jt

  95. Copying from a man-page is not news by Goodbyte · · Score: 2, Informative
    From what I understand of the summary the poster is refearing to the fact that agent forwarding is insecure. Now in the man page for OpenSSH we have:

    -A Enables forwarding of the authentication agent connection. This can also be specified on a per-host basis in a configuration file.

    Agent forwarding should be enabled with caution. Users with the ability to bypass file permissions on the remote host (for the agent's Unix-domain socket) can access the local agent through the forwarded connection. An attacker cannot obtain key material from the agent, however they can perform operations on the keys that enable them to authenticate using the identities loaded into the agent.

    So what's the news?

    1. Re:Copying from a man-page is not news by traenky · · Score: 2, Interesting

      This is certainly one part of the ssh puzzle. And I'm glad to meet someone else who reads vendor documentation and follows it. That's not always followed. I see a lot of companies adopting ssh as an ftp/telnet replacement. Maybe a business partner only accepts ssh connections. Maybe there's a 'end plaintext' initiative. As many begin studying ssh, they gloss over port forwarding. They enable agent forwarding, and the users love it! If they see that warning, it's tough to understand; so some skip the warning. And that's the issue: how will your organization implement one of the world's best security AND connectivity tools out there? Write more--I like your reasoning. jt

  96. Re:Huh? What? by Matey-O · · Score: 1

    Right up to and until the machine is infected without using VPN...once they're compromised, bringing up VPN allows that worm to poop out port 80 request through your network all it wants (and hence has two way communication into your soft-chewy center.)

    --
    "Draco dormiens nunquam titillandus."
  97. Re:SSH-AGENT doesn't make a root level exploit wor by traenky · · Score: 1

    I agree with a lot of this commentary. I can't believe how many root users want '.' in their path. Just as bad? 'su' or 'sudo su' . Add a little dash and get root-appropriate settings--don't inherit the PATH you have as a basic user. I agree that there are many things an intruder can do to a compromised system. That said, I think we should do as the SSH vendors recommend: DON'T use agent forwarding in a potentially high-risk environment. We don't need to add to a hacker's abilities by doing something that risky. I like ssh and think it's a great security AND connectivity tool. Job 1 is ensuring your network, server, etc architects understand all of ssh's abilities before enabling it wholesale. jt

  98. Re:SSH sucks? Not at all by traenky · · Score: 1

    SSH is a great tool, full of great abilities. Any tool with so many abilities is open to misunderstanding, misconfiguration, and misinterpretation. Ditto for Linux. if you felt my article condemns ssh, you're incorrect. jt

  99. Re:Huh? What? by traenky · · Score: 2, Interesting

    Excellent! I'll reconstruct my test environment and make something good happen... jt

  100. Re:Huh? What? by ZOP · · Score: 1

    They're talking about the ssh Agent, specifically key forwarding and the ssh agent. Key forwarding can be bad if one forwards to an untrusted machine. Very...very bad.

  101. Re:Huh? What? by Znork · · Score: 1

    "Someone who tunnels to/from the office is no more dangerous than the same person who takes their laptop home and plugs it into their home network."

    Laptops would be one of those problems with vastly higher ROI. And I'd consider them a far more common and practical danger than excessive tunneling.

    "VPN changes the network topology and can cause havoc and confusion."

    I suspect the comparison is usually not with permanent VPN's, but with temporary VPN tunnels that cut off outside access to the host in question. These tend to be less fraught with beaurocracy and are often used for roaming workers.

    Of course, sometimes-on VPN's that just cut the connection to the local network are just as much a viral and intrusion vector as anything else. There's nothing preventing the host from infections and intrustions when the VPN isnt on, and when it is, there's nothing preventing the infected host from punching tunnels through the corporate firewall to the outside.

    Like you say, any IP enabled device is a risk, and when I see articles like this one I usually suspect someone's been trying to sell the author something. After all, there's no snake oil like security snake oil.

  102. Re:Huh? What? by arodland · · Score: 1

    Actually it's because the article itself is based entirely on "common misunderstandings about Unix"

  103. 1998 CERT advisory by NuShrike · · Score: 1

    Seems to be pretty old. Here's a 1998 CERT advisory with the original SSH 1 exploitable under the exact same conditions: http://www.cert.org/advisories/CA-1998-03.html

  104. Re: Worried me for a moment, but ..... by chawly · · Score: 1

    I read this bit and was a little concerned - but only for a moment

    "That's plain wrong to begin with. I stopped reading there."
    I then saw the light - you're writing about the only non-file component of Unix; the human component. That's what you mean, isn't it?
    --
    How many beans make five, anyhow ? ... Charles Walmsley
  105. Re:Huh? What? by dhammabum · · Score: 1

    A slashdotter who did not build his own computer is like a jedi who did not build his own lightsaber.

    So does this apply to the female jedis or are girls only to stand around in skimpy outfits and be oggled by geeks??

    --
    I am not a robot. I am a unicorn.
  106. Re:Never understood why they invented the SSH-AGEN by Anonymous Coward · · Score: 0

    Let me get this straight. Your threat model is an attacker who has root and can therefore hijack your ssh-agent, but is too stupid to grab your password when you type it in one of those 30 TIMES PER DAY?

    If your system is rooted, you're toast. It's that simple. Pretty much the only way to defend against malicious root is to used an advanced access control model like MAC, and lock everything down. It takes a fair amount of work to set up, and aside from limited use by security-conscious organizations and overzealous geeks, MAC implementations are practically unused.

  107. No, the cat does not "got my tongue." by Impy+the+Impiuos+Imp · · Score: 1

    > Maybe the hacker can't get a copy of the private key
    > through the socket file, but something better (from
    > his/ her view) can be done. If the hacker has root on Box D, he or she can

    Isn't politically correct writing precious!

    The world record for unassisted bench press is a little over 700 pounds. However, the person wishing to bench press more can use a special shirt that binds up the muscles. With this shirt, he or she can lift as much as 1000 lbs. The shirt wraps his or her muscles tightly, preventing the arms from easily lowering the bar to the "down" position.

    --
    (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
  108. Re:Huh? What? by John+Whitley · · Score: 1

    The DMZ hosts aren't supposed to be safe, that's why they're in the DMZ and not in the intranet.

    Which is also why it's generally a lousy idea to allow DMZ hosts to initiate general connections into the intranet in the first place. Defense in depth -- even if the admin screws up and allows agent forwarding to DMZ hosts, an attacker won't immediately be able to use those credentials to ssh from the DMZ into intranet hosts.

  109. Re:Huh? What? by Lord+Ender · · Score: 1

    In American English, there is no gender-neutral pronoun. Most English instructors recommend the author choose whichever pronoun he feels most comfortable using when speaking abstractly.

    What country are you from and what pronoun do you use?

    --
    A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
  110. In other news by thePowerOfGrayskull · · Score: 1

    root has root access.

  111. Re:Huh? What? by RobertLTux · · Score: 1

    um i think this is either a case of
    1 ~99.99% of slashdot geeks are in fact male
    2 he and his are assumed neutral gender

    but i think that getting beaten by a female "warrior" has an extra +20% damage to fame

    why does anybody think that a mangled config on any guard software won't cause "issues"

    --
    Any person using FTFY or editing my postings agrees to a US$50.00 charge
  112. Re:Huh? What? by traenky · · Score: 1

    You might try port forwarding and examine the traffic across your firewall logs. With my pix and IP Tables, the port forwarding traffic simply looks like return encrypted traffic. In the article, I describe how many people implementing ssh are 'mixing it up', using all the abilities in really bad ways. In fact, if you have a working ssh server on the internet, try to connect to it and build the port forwarding scheme I describe. If you can build the outgoing tunnel, the traffic from home will work, despite a firewall's normal restrictions against external-initiated traffic. An internal customer was approached by a support vendor for a turnkey system for just this kind of config. jt

  113. Re:Huh? What? by traenky · · Score: 1

    I hope the last line is back on track to discuss ssh. The issue with ssh, for me at least, is how much is 'userspace', right? Ask most UNIX sensei about people building tunnels, and they laugh because the user needs root for many networking functions. The client side abilities and linkage to a user-controlled external box is all it takes to puncture a hole in the perimeter--an unmonitorable one I might add. And if you ban outbound ssh at the firewall, well, that's no good. SSH can run on any TCP port the attacker configures. Allow outbound 80? How about 53 for dns? 25 from any internal host for mail operations open? And now, what about internal users who are duped into building the outbound tunnel so as to enable support for a turnkey system? I admit you are very right. People who go with stupid configs deserve the worst. But the damage doesn't end with them, right? A successful intrusion on one platform soon ripples to others based on what passwords/credentials are harvested from the first.

  114. Re:Huh? What? by Daerr · · Score: 1

    Sorry, you're wrong. See the singular their.

  115. Re:Huh? What? by johane · · Score: 1

    As I understood it, it's "Don't use agent forwarding when the box you are connecting FROM is untrusted". So, if you don't trust root on your machine, don't use the agent :)

    I'd say that if you don't trust your local root, you're in far worse trouble than this.