Slashdot Mirror


OpenSSH Gets Even More Suspicious

If you remotely administer any computers, or need to check your email over an untrusted network, odds are you're already familiar with the wonders of OpenSSH. Markus Friedl yesterday posted a release announcement for the newest version, OpenSSH 3.3. Privilege separation in OpenSSH is now enabled by default, another sign of the entire OpenBSD project's appropriate paranoia.

29 of 293 comments (clear)

  1. Slashdot to English by ReluctantBadger · · Score: 4, Funny

    1st Official Slashdot to English Translator-matic
    • "There's a sourceforge project creating just what you're looking for..."
      "Me and a bunch of people got drunk, thought we could code, submitted the idea and produced a fancy web page. It's now two years later and the project has no files to download and is STILL on Stage 1, Planning."

    • "That's the beauty of UNIX - Lots of little tools which can be used together. Far more flexible!"
      "I've been reading UNIX in a Nutshell for SVR4 and fuck knows what any of this flags stuff is about"

    • "Linux is far more secure than Windows. My box has never been hacked."
      "I can install Red Hat from a bootable CD. The machine is not connected to a network and all I do all day is type ps, pwd and ls. I'm so l33t."

    • "You might want to try going to college and learning about this stuff!"
      "My folks are rich enough to send me off for further education. I am now in an uber-elite crowd of know-it-alls and I am here to belittle you. Fear me."

    • "Microsoft products are soooo insecure!"
      "I've spent the last two years being subjected to biased slashdot propaganda. I couldn't hack into a properly configured windows system if my life depended on it."

    • "We should file an antitrust lawsuit against Sony"
      "I've spent far too much time absorbing bullshit ideals from anarchists. The truth of the matter is, I just don't want to pay for anything whatsoever. Britney CDs should be free because I think that somehow the constitution protects my illegal copying and distribution under some freedom of speech law or fair use act. Even though I don't have to go out and buy luxury items, I'm gonna whinge and bitch anyway"

    • "Have you considered using Linux?"
      "I've only been using it for a week, and now my hardcore wannabe techno friends think I'm a guru. I now recommend it to everybody based upon what I've read at slashdot."

    • "Don't you find that parsing this bitset through the compliation alogirithm that is piped out through GCC on a command line echo really works well for logarithmically sound sine wave matcher?"
      "Somebody please shoot me several times in the head. I am fucking clueless."

    • "If they join all the state drivers licence databases together, they'll be able to track me! How do I change my identity?"
      "I'm too fucking dense to realise that this has been going on for over 15 years already, and I've just finished reading 1984. Go figure."


  2. More suspicious of OpenSSH? by jamus · · Score: 5, Insightful

    The way I read the headline, "OpenSSH Gets Even More Suspicious", it sounded like we're supposed to be more suspicious of OpenSSH.

    What has the world come to, where we can't even trust OpenSSH?

    Oh, OpenSSH is more suspicious of its environment! That makes more sense! :P

    1. Re:More suspicious of OpenSSH? by neuroticia · · Score: 5, Funny

      I read that too and my mind quickly said to me "Oh great, time to turn off SSH and only allow shell access to people who physically sit down at the computer.

      Then I realized that it's "suspicious" as in "the suspicious wife accused her husband of sneaking another computer into the house" and not "the actions of the husband were suspicious, leading his wife to accuse him of sneaking another computer into the house."

      Should have said "Open SSH has just become even more paranoid."

      THIS is why computers don't speak English. =]

      -Sara

  3. Impressive by dybdahl · · Score: 4, Insightful

    Open Source software continues to impress me after so many years. This again proves, how much better software can be, if you remove management, lawyers, sales department etc. and make good programmers work together without short-term profit in mind.

  4. SSH is magnificent! by dmarien · · Score: 4, Interesting

    When I first started using linux, I was absolutely blown away by telnet, and the capabilities for remote administration.

    Then came SSH... Not only is the grade of encryption absolute phenomenal, but the extras above and beyond remote shell's are astounding!

    X Forwarding, SCP, FTPs, etc... they all rock! I can't remember the last time I coped a file over any protocol other than SSH's scp command. WinSCP has replaced puTTY as my favorite WIN32 application, and combined with puTTY and secure shells it's now wonder how I've managed to keep my home router/server up for 180 days w/o even having a monitor plugged into it!

    Thanks OpenSSH team!

    --
    dmarien
    1. Re:SSH is magnificent! by p3d0 · · Score: 5, Informative

      Just remember to use the "blowfish" cypher for large files. It's much faster than the default 3DES.

      I use: alias scp="scp -c blowfish-cbc".

      --
      Patrick Doyle
      I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
    2. Re:SSH is magnificent! by Sircus · · Score: 3, Informative

      SCP runs over the standard SSH protocol (either SSH1 or SSH2). All SSH security features therefore apply to SCP.

      128-bit AES/Rijndael is one of the "recommended" ciphers for SSH2, but is not supported by SSH1. 192 and 256 bit AES/Rijndael are "optional" for SSH2.

      --
      PenguiNet: the (shareware) Windows SSH client
    3. Re:SSH is magnificent! by demaria · · Score: 5, Interesting

      Thanks for the info. Something else cool, SSH with Tokens. I saw a demo at N+I on the commercial SSH 3.0 by SSH Communications. You need to have a token (such as an e-Aladdin USB eToken) plugged in during the entire session. If the token is removed, the shell instantly drops.

    4. Re:SSH is magnificent! by evilviper · · Score: 3, Informative

      An alias is not the best idea.

      Best thing to do, edit your ~/.ssh/config and stick your options in there (or machine-wide if you edit /etc/ssh/ssh_config).

      So, enter something like:

      host *
      Compression no
      Ciphers Blowfish-cbc,3des-cbc
      Protocol 2,1


      Additionally, use DSA/RSA auth, (NOT PASSWORD), and use ssh-agent so that you only need to enter your key's pass-phrase once in a while.

      Anyone that uses SSH (and doesn't yet know about scp, port forwarding, ssh-agent, key-based auth & configuration like above) should buy the O'reilly SSH book.

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
    5. Re:SSH is magnificent! by evilviper · · Score: 4, Informative
      But I only want blowfish for file transfers.

      Well, you could set up seperate config entries like so:

      host mercury-scp
      hostname mercury.domain.com
      cipher blowfish-cbc
      Compression Yes

      host mercury
      hostname mercury.domain.com
      Cipher 3des-cbc
      Compression No


      3des is better (I understand) for interactive shell sessions.

      I not only don't agree, but I fail to even see any logic behind that. Blowfish is a quicker alogrithm any way you look at it... Myself, and many others, regard it as amply strong, very unlikely to be cracked (as DES was), etc. Perhaps you'd clarify why one form of encryption would be better than another for extremely similar uses.
      What's wrong with an alias?

      It's just not a clean way to do it. Perhaps if you use something like the TCL/TK frontend in the future, your alias will not work... I'm sure there are other situations where a shell alias won't work, so I say: why not just do it the proper way in the first place? Of course you can do *much* more with the ~/.ssh/config file. Or, you could make the change machine-wide by editing /etc/ssh/ssh_config.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  5. Re:Even OpenBSD developers can be vain... by The_Final_Word · · Score: 4, Informative

    upgrade to Apache 1.3.26 or 2.0.39, it's an Apache problem and it is on their home page.

    http://httpd.apache.org/

    The OpenBSD folks gave a patch for the OS before the new Apache binaries were released as a work around.

    --
    The Final Word
  6. Re:Necessary and useful by GreenHell · · Score: 5, Informative

    Yes, portability is...

    Of the 3 major BSD's, NetBSD's goal is to run on as many platforms as possible, FreeBSD's goal is to create a reliable, free UNIX (it may not meet your definition of free, but that's another story), and OpenBSD's goal is to provide the most secure distro possible.

    --
    "I won't mod you down - I feel the need to call you a twit explicitly, rather than by implication."
  7. Re:Even OpenBSD developers can be vain... by neuroticia · · Score: 3, Insightful

    You mean they didn't accept the patch you wrote for them!? Ludicrous. Maybe they're too busy being whipped along by people who don't give anything back to the OS community to evaluate your code. ;) I mean... You obviously feel strongly about it so you HAVE to have written a patch, no?

    If they KNOW about it, and I'm sure they do, then they'll patch it. They're not Microsoft, afterall. In the meantime, if you're not a developer, lay off the whip. Like you said- the bug is recent, if they let a few months fly by without doing anything then you can start complaining.

    -Sara

  8. Re:No thanks by Admiral+Burrito · · Score: 5, Insightful

    Telnet wins hands down. Just use a difficult password, and change it frequently.

    Except telnet does zero encryption. It is a trivial matter to sniff passwords from an unencrypted link, and inserting data is not much harder. Changing passwords frequently is kind of pointless if you are setting your new password over an insecure link.

    One-time passwords are better, but they are still vulnerable to TCP insertion attacks.

    Yes, these things have been exploited in the wild. SSH exists for a reason.

    If security problems in SSH itself worry you (and they should), privilidge-seperated ssh is the answer. By seperating the privilidged code from the code that talks to the client and defining a good interface between them, it limits the amount of stuff that can go wrong and the quantity of code that needs to be audited.

  9. Uh...? by JanusFury · · Score: 4, Interesting

    For those of us without much experience in the encryption and networking fields, anyone mind explaining exactly what this does? I read the page but I'm not sure I understand exactly what's going on.

    --
    using namespace slashdot;
    troll::post();
    1. Re:Uh...? by LinuxGeek8 · · Score: 3, Informative

      I'm not into it that much too. But simply said it starts different processes.
      The parent process starts with root priviliges, and the child processes handle the actual connections, and do not run with root priviliges.
      For things like authentication the child communicates with the parent. Hmm, would that mean a new connection needs to authenticate itself twice then? (in 1 login) I assume so.
      If the child gets corrupted, or someone tries to break in, he will not have the root priviliges of the parent process.

      In previous ssh versions it was always running with root priviliges, even if you were logged in as user. So every exploit in openssh is immediately a remote root exploit.

      This is sort of the same model that Apache has, one root parent, the rest runs as user www or whatever.
      The same as postfix, the secure alternative for sendmail, which also runs only as root I believe).

      --
      Well, don't worry about that. We can get you back before you leave. (Dr. Who)
  10. Re:Packet sniffing by GigsVT · · Score: 3, Insightful

    Who says the attack is local? Your packets cross from 5 to 20 hops before getting to their destination. Routers can be compromised, theough security weaknesses or through deliberate government interference. OpenSSH also allows for host authentication, so you know you are really talking to who you think you are. A secure transport is about more than some guy on your LAN sniffing your password.

    --
    I've had enough abrasive sigs. Kittens are cute and fuzzy.
  11. Ettercap (was Re:Packet sniffing) by Nonesuch · · Score: 5, Informative
    Packet sniffing traffic that crosses your ISP and then the public Internet is definitely a serious and real risk.
    PatJensen asks:
    Is there a tool that allows you to force the switch to forward ethernet frames so they can be sniffed without switch administrator access?
    There are tricks to force the switch to 'flood' ethernet frames (overflow the CAM table, etc). Two common attacks against switched segments are MAC spoofing (easily detected and protected against on Cisco) and ARP spoofing (more difficult to protect against).

    There is also a tool to permit packet sniffing, see ettercap on Sourceforge.

    Ettercap is a multipurpose sniffer/interceptor/logger for switched LAN. It supports active and passive dissection of many protocols (even ciphered ones) and includes many feature for network and host analysis.

    Ettercap is actively being used by the "black hat" community, and has been found on compromised systems on switched LAN segments "in the wild".

    1. Re:Ettercap (was Re:Packet sniffing) by PatJensen · · Score: 3, Interesting
      Thanks for the informative response. Is there a place where I can read whitepapers on the viability of CAM overflows and MAC and ARP spoofing? Does Cisco have anything available that relates to this security? I'm aware of port security (only allowing certain MAC address to join a port) and VMPS (a centralized MAC database for VLANs, network wide).

      Would either of these be helpful in prevent these types of attacks?

      Thanks again.

      -Pat

  12. Re:Packet sniffing by mlyle · · Score: 3, Interesting

    There are plenty of attacks that if you reside on the same virtual lan as one of the victims that allow you to intercept traffic.

    One is sending traffic from the victim's mac address, so that the switch "learns" that MAC is out your port. Port security features on switches can help fix this but are oft-unused.

    Another is ARP spoofing and using that to man-in-the-middle the session. You tell the person logging in that your MAC address is the victim host, and it cheerfully sends all packets to you. This is difficult to detect and prevent.

    In conclusion: switches do not provide security against packet sniffing attacks.

  13. No thanks??? by Nonesuch · · Score: 5, Insightful
    kevinqtipreedy writes:
    Trust old telnet works fine, unless you are worried about people seeing your passwords, and everything you are doing.
    And you're not?
    That is the point of ssh; it encrypts what you do, including passwords so it can not be seen by people on the same network segment.
    That is one of the many points of SSH. The protocol also supports public-key authentication, so you don't need a "shared secret" (reusable password) at all. The protocol also provides authentication that you are really talking to the remote server you think you are, preventing MITM attacks (e.g. spoofing DNS so your telnet session goes through my server). SSH also offers compression, for faster file transfers. And port forwarding, including X11. and much more.

    A difficult password is just as important on telnet as in is on ssh because they can still be cracked either way.
    It is unlikely that anybody is going to bother cracking your telnet password- if they don't sniff it, then there are few scenarios where somebody has the ability to obtain the shadow file from a server but does not already have root.

    One issue with password cracking and sniffing is that it is critical to have a unique password for every site you have accounts at.

    Under SSH, I can set up systems so that password logins only work on the physical console, not over the network. I can create a strong private key (passphrase protected) and install my public key on the remote servers, using the same key for many different servers without the security issues that come from using the same password across disparate sites.

  14. Timothy by jhines · · Score: 4, Funny

    It is Timothy that we don't trust.

  15. What it does - Program, not Protocol Security by billstewart · · Score: 5, Informative
    This isn't a change to the communications protocols or any of the encryption - it's a change to the Unix implementation of the server to make it much less likely that any bugs can let someone break in. (Initially this works for OpenBSD, should be easy to port to other BSD implementations, probably to Linux and Solaris, maybe to WinNT but maybe not.) The basic way that a communications server like this works is
    • A process sits around listening to the well-known TCP port for connection requests. The process needs to be privileged for two reasons
    • The port is a system resource so only the system should be able to control it
    • When a user logs in (on Unix), their connection needs to operate with the permissions of that user, so the server needs to be root so it can start a session as any user who logs in (as opposed to a Web Server, which usually only needs access to publicly readable files.

    When a request comes in, it hands it to a subroutine that handles requests for the server to do different functions, including authentication.

    For some services, such as SSH and FTP, the server may set up multiple connections for things like transferring files, etc.You can write a server like this as one big single-threaded process, or as one big process with multiple threads if your operating system and programming environment support it, but it's more common, especially on Unix, for the main process to spin off several child processes to do the work and go back to listening for new incoming requests. In this case, it spins of one process to handle the control channel communications and that process spins off other processes to handle specific tasks like file transfers, after checking that the connection and the request are authenticated. In a simple-minded implementation, the control channel process runs as root, and any task channel processes start off as root, and maybe change their privileges to an individual user's privileges if they need to (for instance if you're using SSH to log in to a remote system.)

    The problem with this is that if there are any bugs that let a remote connection send messages with unexpected data in ways that break or take over the server process, the server is running as root so it can do anything it wants, however evil or dangerous (or if it's a minor bug that doesn't lead to a complete takeover, it may still be able to burn critical resources and stall the system or do some other denial of service attack.) Two popular kinds of attacks are sending a message that overflows a field (the result of bad protection in the C language combined with careless programming), or sending a message that asks the process to do something that the programmer didn't expect and protect against, such as setting permissions on a system file or making a user's program privileged, so that it can be exploited later, either by another communication from the attacker or by routine activities by the system or the user.

    What the new OpenSSH implementation does is takes the bottom two server processes (the control channel server and the task servers) and splits each of them into two parts that communicate with each other. One part of each processes is a master, that keeps running privileged if it needs to, and the other is a slave process that runs as a non-privileged user (either the user who's requesting the service, for tasks like logins, or as the "nobody" user) and does most of the actual work, passing messages back and forth to the master process to communicate about status and request anything that still requires privileges. This gives you a bunch of security advantages:

    • Each part of the system is smaller, with fewer functions to perform and well-defined interfaces to other parts, so you can do a better job of checking for bugs and each part can validate incoming messages before doing anything.
    • The parts of the system that need to be privileged aren't communicating directly with the remote user, only with the slave processes, so they have a much smaller set of messages to validate.
    • If there's some bug in the system that lets a remote attacker take over one of the control or task processes by sending an craftily designed message, the bug is in the non-privileged slave process, which doesn't run as root, can't do as much damage, and has a limited set of messages that the master process will accept from it.

    The rest of it is basically detail about which functions they separated into which programs, how they made sure that each piece has enough capabilities to do the job without giving it too much power that could be exploited by an attacker, and some stuff about how they validated the pieces. It's adding more complexity to the total system, but each piece is more limited in function, and the security-critical pieces are much easier to validate against bugs and malicious input.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  16. Re:Necessary and useful by __past__ · · Score: 4, Insightful
    FreeBSD's goal is to create a reliable, free UNIX (it may not meet your definition of free, but that's another story)
    I know it's probably unwise to make this up, but how exactly do you define "free" in a way it doesn't match FreeBSDs license?

    The usual complaint from people favoring the GPL is that it's not Copyleft, so it's free even for people not interested in freedom for anyone but themselves, but I think nobody - from the FSF to Microsoft - would say it is not free itself.

  17. Re:Security of SSH by Dwonis · · Score: 3, Insightful

    I agree. IP over SSH is a bad idea for the same reasons why TCP over TCP is a bad idea.

  18. Re:Necessary and useful by Jeremi · · Score: 5, Interesting
    but how exactly do you define "free" in a way it doesn't match FreeBSDs license? The usual complaint from people favoring the GPL is that it's not Copyleft, so it's free even for people not interested in freedom for anyone but themselves


    I think the GPL people would say that FreeBSD isn't Free in the "Free Willy" sense... GPL software cannot be captured back into proprietary software and made non-free again, whereas BSD licensed software can be (and often is). So while Linux code will always roam the wild plains, BSD code spends some of its time laboring in the Microsoft prison camps.... or something like that. :^)

    --


    I don't care if it's 90,000 hectares. That lake was not my doing.
  19. Re:Necessary and useful by Jeremi · · Score: 5, Insightful
    Code that's already out there will always be free to "roam the wild plains" ... it can't be made non-free again. People can base non-free derivative products off it but that still doesn't "un-free" the original code...


    Technically, you're correct, but in the larger view, there is a historical pattern where free code gets 'adopted' by a company, and the company adds lots of functionality to the free code, so that eventually the free code is no longer competitive, and everyone switches over to using the closed-source product. At that point, the code is no longer free (except for the "old" code which is no longer useful or used, and thus doesn't count). This is what happened to Unix in the 70's and 80's, leading to Unix's fragmentation and irrelevance as a platform. With GPL code, you don't have to worry so much about v2.0 coming out as closed-source, leaving you with a choice between staying with v1.0 or losing the benefits of open source.

    --


    I don't care if it's 90,000 hectares. That lake was not my doing.
  20. There is a better way to fix one of these problems by thogard · · Score: 4, Interesting

    You must be root to bind to any port <1024 as a form of "security" however this stupid rule has been the way in for most internet based security problems in the Unix world. Some systems (like Soalris) allow you to turn it off and that lets any process bind to any port but that has issues as well.

    The correct solution is you let a process bind to any port >1024 and any port where the port number is in its group list. This means you put apache process owner in group 80 and 443 and then it can bind it its needed ports no matter who it runs as. Wiht the linux 2.0 kernal this required changing some of one line.

    As far as the other problem of becoming someone else, there are no clean solutions to that but I think it would make sense to allow any process id 10 to become someone else. You also need to allow for some id's to give away files. The problem with this is that it intoduces magic numbers into the system which is bad.

    Based in this, you could set up the ssh user as uid 1 in group 22 and it could bind to port 22 and then become any other user (or maybe any userid > 100). Bind would be running as user 53 with group 53 and have no special privs. The Apache user id would be in group 80 & 433 and its version of suexec would be uid 2 so it could change ownership to any user > 100 to run their cgis.

  21. Re:There is a better way to fix one of these probl by DavidTC · · Score: 3, Informative
    The first solution would have made sense, except for the fact group ids are not that changable on production systems. There probably already is a group number 80. But it's a nice start, someday you'll invent ACLs. However your second suggestion is the silliest thing I've ever heard.

    The problem is that ssh can change to any user it wants. That's the PROBLEM, that's the reason that bit was seperated out and away from the network traffic bit. It's not a solution.

    Making it where the process id X (Where X is supposed to be sshd), can change to anyone else, is pretty much a negative solution to the problem, because now people can get root even after it's dropped privs. Not to mention now you cannot restart sshd if you need to, because it has to be pid X. And god help you when the kernel people come up with yet another 'fake' process that runs when the kernel starts, using no memory but taking up a pid.

    And there is functionally no difference between being able to change to any user except root and being able to change to root. If you can change to the sysadmin's non-root account you can get root trivially by trojaning 'su', or, if he's very paranoid, by trojaning his shell.

    --
    If corporations are people, aren't stockholders guilty of slavery?