Slashdot Mirror


New ssh Exploit in the Wild

veg writes "In the last few hours there have been several reports of a new ssh bug, with an exploit seemingly in the wild. Oh god not again... The lengths some people will goto to try and damage Theo's pride." Update: 09/17 00:24 GMT by T : friscolr writes "Hot on the heels of rev 1 of the buffer.adv advisory, here is revision 2, which fixes more than revision 1 did. Also see the 3.7.1 release notes."

25 of 754 comments (clear)

  1. Uh oh by Anonymous Coward · · Score: 5, Funny

    Best patch and upgr..&*[NO CARRIER]

  2. Questions. by grub · · Score: 5, Interesting


    I have to wonder if UsePrivilegeSeparation was enabled. (see the manpage)

    One message in the thread indicates it is but this isn't first-hand knowledge. If PrivSep was enabled then is OpenBSD immune to this attack due to other parts of the OS being hardened (much like the zlib hole a few months back)? Also are these default installations or are they "tweaked"? As an aside, PermitRootLogin defaults to enabled, something I always disable as I have no need for it.

    Even if this does count as a new remote hole in OpenBSD, it's still a phenomenal track record they can be proud of.

    --
    Trolling is a art,
  3. Public Service by Morologous · · Score: 5, Funny

    Posting this to slashdot is actually a public service, as the exploit description will be /.'d and unable to effectively be disseminated to the bad actors.

  4. Telnet by Henry+V+.009 · · Score: 5, Funny

    Thank god I'm using something secure like Telnet instead.

  5. Bits and pieces so far... by Oestergaard · · Score: 5, Informative

    Yes, there is a vuln. in 3.6. You need to upgrade to 3.7 which was released today, to be safe (well, 'safer' anyway).

    It will be 3.7p1 for us non-OpenBSD people.

    It is a patch to one file, buffer.c, which fixes some allocation/offset stuff.

    It seems that privilege separation does *not* help here - so get them systems patched (and firewalled)!

  6. guess who by dwakeman · · Score: 5, Funny

    Damn trinity and her sshnuke...

  7. Suggestions for a newbie? by johnny1111_23 · · Score: 5, Interesting
    Am pretty new to Linux, and am currently running a Lindows 4.0 installation my dad put on my computer.

    How worried should I really be about this? And what steps should I be taking (or ask dad to take)? Since I gather Lindows is similar to Debian, should I just look for a Debian tutorial?

    Thanks in advance.

  8. GOOD!! Red Hat, fix your RPMs!! by RedHat+Rocky · · Score: 5, Insightful

    Great, now maybe Redhat will fix their damn openssh RPMs that they fubarred with their last patch!

    --
    Anything is possible given time and money.
    1. Re:GOOD!! Red Hat, fix your RPMs!! by opkool · · Score: 5, Informative

      How to fix your RedHat box:

      1.- Download the file openssh-3.7p1-1.src.rpm from any of the mirrors. For example:
      ftp://ftp.easynet.be/openssh/portable/rp m/SRPMS/op enssh-3.7p1-1.src.rpm

      2.- Build an .rpm for your RedHat Linux version:

      # rpm --rebuild openssh-3.7p1-1.src.rpm

      3.- Upgrade your OpenSSH packages:

      # rpm -Fvh /usr/src/redhat/RPMS/i386/openssh-*.rpm

      4.- Re-start your sshd daemon:

      service sshd restart

      5. Profit!^H^H^H^H^H errr, that's it.

      Peace.

  9. I saw this exploit used by teamhasnoi · · Score: 5, Funny
    I was at the local library, and some kids were on a computer, talking loudly. They seemed to be rather excited about something.

    A librarian peeked around the corner to see where the noise was coming from, then put her finger to her lips and said, "Ssh!"

    The kids ignored her and kept talking, completely and utterly exploiting the hole, and circumventing the 'Ssh'!

    Never was I so frightened.

  10. Re:Update for debian by bartman · · Score: 5, Insightful

    Debian is absolutely amazing.

    bug 211205, which deals with this expoit, was resolved in 2h after the announcement. I had my box patched 15min after the slashdot story hit.

    Really good stuff.

    --
    -- bartman
  11. For Gentoo by jehreg · · Score: 5, Insightful
    Just go to your net-misc/openssh directory:
    • cp openssh-3.6.1_p2.ebuild openssh-3.7_p1.ebuild
    • emerge --update openssh
    The emerge will fetch the file and complain that there is no digest.
    • ebuild openssh-3.7_p1.ebuild digest
    • emerge --update openssh
    Just tested it here, worked fine.
    Pat
  12. OpenSSH 3.7 Release Announcement by Tuck · · Score: 5, Informative

    Rather than subject someone's server (like mine!) to a slashdotting, here's the full text of the announcement (slightly mangled to sneak past the lameness filter).

    Subject: OpenSSH 3.7 released
    Date: Tue, 16 Sep 2003 14:07:00 +0200
    From: Markus Friedl
    To: openssh-unix-dev _at_ mindrot.org

    OpenSSH 3.7 has just been released. It will be available from the mirrors listed at http://www.openssh.com/ shortly.

    OpenSSH is a 100% complete SSH protocol version 1.3, 1.5 and 2.0 implementation and includes sftp client and server support.

    We would like to thank the OpenSSH community for their continued support to the project, especially those who contributed source and bought T-shirts or posters.

    We have a new design of T-shirt available, more info on http://www.openbsd.org/tshirts.html#18

    For international orders use http://https.openbsd.org/cgi-bin/order and for European orders, use http://https.openbsd.org/cgi-bin/order.eu

    Security Changes:

    All versions of OpenSSH's sshd prior to 3.7 contain a buffer management error. It is uncertain whether this error is potentially exploitable, however, we prefer to see bugs fixed proactively.

    OpenSSH 3.7 fixes this bug.

    Changes since OpenSSH 3.6.1:

    * The entire OpenSSH code-base has undergone a license review. As a result, all non-ssh1.x code is under a BSD-style license with no advertising requirement. Please refer to README in the source distribution for the exact license terms.

    * Rhosts authentication has been removed in ssh(1) and sshd(8).

    * Changes in Kerberos support:

    - KerberosV password support now uses a file cache instead of a memory cache.

    - KerberosIV and AFS support has been removed.

    - KerberosV support has been removed from SSH protocol 1.

    - KerberosV password authentication support remains for SSH protocols 1 and 2.

    - This release contains some GSSAPI user authentication support to replace legacy KerberosV authentication support. At present this code is still considered experimental and SHOULD NOT BE USED.

    * Changed order that keys are tried in public key authentication. The ssh(1) client tries the keys in the following order:

    1. ssh-agent(1) keys that are found in the ssh_config(5) file
    2. remaining ssh-agent(1) keys
    3. keys that are only listed in the ssh_config(5) file

    This helps when an ssh-agent(1) has many keys, where the sshd(8) server might close the connection before the correct key is tried.

    * SOCKS5 support has been added to the dynamic forwarding mode in ssh(1).

    * Removed implementation barriers to operation of SSH over SCTP.

    * sftp(1) client can now transfer files with quote characters in their filenames.

    * Replaced sshd(8)'s VerifyReverseMapping with UseDNS option. When UseDNS option is on, reverse hostname lookups are always performed.

    * Fix a number of memory leaks.

    * Support for sending tty BREAK over SSH protocol 2.

    * Workaround for other vendor bugs in KEX guess handling.

    * Support for generating KEX-GEX groups (/etc/moduli) in ssh-keygen(1).

    * Automatic re-keying based on amount of data sent over connection.

    * New AddressFamily option on client to select protocol to use (IPv4 or IPv6).

    * Experimental support for the "aes128-ctr", "aes192-ctr", and "aes256-ctr" ciphers for SSH protocol 2.

    * Experimental support for host keys in DNS (draft-ietf-secsh-dns-xx.txt). Please see README.dns in the source distribution for details.

    * Portable OpenSSH:

    - Replace PAM password authentication kludge with a more correct PAM challenge-response module from FreeBSD.

    - PAM support may now be enabled/disabled at runtime using the UsePAM directive.

    - Many improvements to the OpenSC smartcard support.

    - Regression tests now work with portable OpenSSH. Please refer to regress/README.regress in t

    --
    $ find /pub -beer "James Squire Amber Ale" -drink
  13. Re:very early by s.d. · · Score: 5, Insightful

    Even though there is no patch available (yet)

    There is a patch available, as well as it being fixed in 3.7, which was just released this morning. That's the point of all of this. The mention of the bug was in the 3.7 release notes, i believe.

  14. Why all the lsh plugs? by kakos · · Score: 5, Insightful

    It seems to me that a package that goes through code security audits regularly and is actually finished is infinitely more secure than an incomplete package?

    Why are there people suggesting to go from a secure package to an insecure one?

  15. Trust me... View the srpm by ChiefArcher · · Score: 5, Informative

    I've released the SOURCE RPM...
    you can always grab it and see for yourself..
    I only changed buffer.c

    Feel free to see for yourself..

    I had to make all of these this morning to patch our systems..

    ChiefArcher

  16. Re:interesting comment on how to stop it... by andreas · · Score: 5, Informative

    This is the README from 1998, talking about a beta version of lsh. Don't let age-old doumentation fool you.

    lsh has grown mature since then, and has an excellent code quality. I recommend it. Any day over OpenSSH, after having looked at the code of both projects. Up-to-date documentation, as on the web page, or the README inside the tarball, doesn't contain the warning.

  17. intentions are noble and MIRROR now by ChiefArcher · · Score: 5, Informative


    you have an email address to...
    and a resume www.briangannon.com
    and the Source RPMS.

    http://stradlin.com/ssh
    if you do a diff on the sources, you will see I only edited buffer.c
    my intentions are completely noble.
    How can you really trust Redhat? One of the disgruntled developers could put a backdoor in a patch?

    ChiefArcher

  18. Re:Mirror of the vulnerability description by coyul · · Score: 5, Interesting

    The bug must center around this line:

    /* Increase the size of the buffer and retry. */
    buffer->alloc += len + 32768;

    It looks like the problem here is that buffer->alloc (which presumably stores the size of the buffer) grows on every try, while the actual size of the buffer grows only on successful tries. So you could have a situation where, after a couple of tries, the buffer is 65536, but buffer->alloc is 98304. This could potentially cause another part of the program to run past the actual end of the buffer.

    The patch addresses this by only updating buffer->alloc after the new memory has been successfully allocated.

  19. Re:deceit by danormsby · · Score: 5, Funny

    Ssh, don't tell anyone.

    --
    Omnis amans amens
  20. Re:Does this effect Cygwin??? by funkman · · Score: 5, Funny

    You are already running windows. You have more serious problems.

  21. Re:MOD PARENT DOWN by Syberghost · · Score: 5, Funny

    A demonstration would be nice.

    It'd serve you right if he gave you one. :-)

  22. Another place to find the patch/bug advisory by vt0asta · · Score: 5, Informative
    --
    No.
  23. Fixed that ancient LSH README by Anonymous Coward · · Score: 5, Informative

    Ooops, I had totally forgotten about that old copy of the README file in the ftp archive. After it was pointed out to me in private mail, I've replaced it with the current README. /Niels (LSH author)

  24. iptables and ipchains scripts to limit SSH access by getnuked · · Score: 5, Informative
    If you can't get to an update for your distro, here is a quick and dirty script for both iptables and ipchains based machines to limit SSH access to only specific IPs (replace 1.2.3.4 with the address you want to connect from, add more lines to add more hosts) - of course these only apply to Linux based machines with either iptables or ipchains in the kernel or available as modules:

    iptables:

    #!/bin/sh

    insmod iptables

    iptables -F INPUT
    iptables -P INPUT ACCEPT
    iptables -A INPUT -j ACCEPT -p tcp --destination-port 22 -s 1.2.3.4
    iptables -A INPUT -j DROP -p tcp --destination-port 22
    iptables -A INPUT -j DROP -p udp --destination-port 22

    ipchains:

    #!/bin/sh

    insmod ipchains

    ipchains -F input
    ipchains -P input ACCEPT
    ipchains -A input -j ACCEPT -p tcp --destination-port 22 -s 1.2.3.4
    ipchains -A input -j DENY -p tcp --destination-port 22
    ipchains -A input -j DENY -p udp --destination-port 22