Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Security

OpenSSH Package Trojaned 574

cperciva writes "The original story is here. And more details are available from the guy's weblog here." Here's a mirror of that email message. Another reader writes, "Not really a trojan because all it does is make a connection to 203.62.158.32:6667." Still another writes "The tarball of the portable OpenSSH on ftp.openbsd.org is trojaned. The backdoor is only used during build - generated binaries are fine." There isn't much authoritative information available, but this appears legitimate - please be careful if you're updating any of your machines with code from ftp.openbsd.org, and we'll update this story with more links as information is available. Update: 08/01 19:13 GMT by M : OpenSSH now has an advisory.
This discussion has been archived. No new comments can be posted.

OpenSSH Package Trojaned

Comments Filter:
  • I'm suprised... (Score:2, Insightful)

    by DJPenguin ( 17736 ) on Thursday August 01, 2002 @08:19AM (#3991168)
    ...that this doesn't happen more often.

    People keep harping on about how open source software means that they can trust downloaded source code, but who actually reads through to source code for something before they actually compile?

    Usually it's just ./configure && make && make install.

    James
  • by frleong ( 241095 ) on Thursday August 01, 2002 @08:21AM (#3991182)
    Do you check the packages downloaded from sites that you usually do not have problems with? Like from redhat.com, debian.org and in this case openbsd.org?

    Also, how many people do read the makefiles before running them on your machine? And when installing binaries require root access?

    If this story is really true, how much safer is open-source programs, when compared with closed source programs? Notice that even with closed source programs, *some* people will eventually discover that they are trojan or not.

  • Re:203.62.158.32 (Score:3, Insightful)

    by CrazyDuke ( 529195 ) on Thursday August 01, 2002 @08:24AM (#3991200)
    Packet kiddies like to have their zombies join an irc channel so they can tell the bots to ddos by just typeing something like "!flood 127.0.0.1."

    I dunno if thats what this one does though.
  • Re:203.62.158.32 (Score:2, Insightful)

    by jorleif ( 447241 ) on Thursday August 01, 2002 @08:34AM (#3991259)
    Except if the port was closed recently when this whole thing came out?
  • Re:Trojan (Score:1, Insightful)

    by Anonymous Coward on Thursday August 01, 2002 @08:39AM (#3991277)
    Tell me how this isn't a trojan again?

    It is a trojan, like the article title says. It's a completely independent program that a user is tricked into running on his own box that does something other than that user expects.

  • by tburkhol ( 121842 ) on Thursday August 01, 2002 @08:48AM (#3991306)
    Has anyone else thought about ways to solve this problem?

    Check MD5 sums

    make -n

    Unplug from the net and log all traffic while you compile, install and test. Check the log.

    Don't unpack a tarball within 48 hours of its creation...let someone else find the problems.

    Be one of the "many eyes" and actually learn some of the source code.

  • by maxwell demon ( 590494 ) on Thursday August 01, 2002 @08:48AM (#3991311) Journal

    Well, the problem with the md5 checksum is that it only protects against download errors, not against replacement at the server (unless you have an independent source for that checksum): It's trivial to calculate the checksum for the changed package, and if you manage to replace the package file, you most probably manage to replace the file with the md5 key as well.

    The only way to really secure against such replacements is to use public-key cryptography to sign the package. Then no one can recreate the signature without having the private key.

    Maybe for installing, a safer way would be to give the user account temporarily access to the destination directories, then install as a user, and finally change owner permissions by hand. Of course this won't work if installation consists of more than just copying files to other directories, and this extra stuff needs root permissions. However, I guess that's rare.

  • by Mr_Silver ( 213637 ) on Thursday August 01, 2002 @08:55AM (#3991349)
    The guy caught it because of the installer automatically checking the MD5 checksum

    I'm a little confused. How can you trust a package to check it's own MD5 checksum? If I'd slipped a malicious program into another app, the next thing I would do is hack the checking code to falsly tell the user than the checksum is fine.

  • Re:203.62.158.32 (Score:2, Insightful)

    by JPriest ( 547211 ) on Thursday August 01, 2002 @08:59AM (#3991365) Homepage
    What exactly are the odds of that?
  • Re:hmmm.... (Score:2, Insightful)

    by NumberSyx ( 130129 ) on Thursday August 01, 2002 @09:07AM (#3991405) Journal
    So tell me, are you 100% sure Word isn't Trojaned ? Seriously thousands of programers have worked on it over the years, how can we be sure a Trojan wasn't introduced. Microsofts policy is not to do complete rewrites of code, they always start with what they already have, try to fix bugs and add features. It is certainly within the realm of possibility that a Trojan has existed in Word for years undetected (it is not likely, but it is possible). Even if they did find it, they would certainly take it out in the next version or even in a service pack, but they probably wouldn't tell anyone and they would only admit to it if a third party exploited it and made it public.
  • by Anonymous Coward on Thursday August 01, 2002 @09:13AM (#3991431)
    I download lots of tarballs from sites that provide a sum file as well. Presumably, you check the file to make sure it's checksum matches that in the sum file. If it does, you should be good to go.

    So, in this case, couldn't someone just as easily generate an md5 sum for the hacked file and put that in the sum file? I know on bsd you have ports which would prevent this, but what about Linux? Everything would seem kosher if the hax0r replaced the sum file...

    thx for responses.
  • GnuPG a good idea (Score:2, Insightful)

    by giminy ( 94188 ) on Thursday August 01, 2002 @09:18AM (#3991457) Homepage Journal
    Once again I call people's attention to GPG [gnupg.org], which can be used to digitally sign source code. Then, if something is trojaned, you know who to blame for including the bum code.
  • by Anonymous Coward on Thursday August 01, 2002 @09:37AM (#3991547)
    Are you saying it's not the fault of the OpenBSD OS or the OpenBSD team?

    If they are the ones managing the box, why aren't they securing it? If they aren't in a position to manage the box, why are they even using it?

    Also, nobody has done a report on how the trojan was uploaded, so we can't say for sure it was the fault of the OS. It could have been a sniffed password, or social engineering, or whatever.

    These guys do good work, but don't discredit the possibility that they make mistakes themselves once in awhile.
  • Re:hmmm.... (Score:1, Insightful)

    by Anonymous Coward on Thursday August 01, 2002 @10:23AM (#3991871)
    Microsofts policy is not to do complete rewrites of code

    Microsoft does not have policy against code rewrites.

    I hate the evil bastards from Redmond more than anybody, but still, don't be absurd: all programmers would prefer not to reinvent the wheel.

  • by bee ( 15753 ) on Thursday August 01, 2002 @10:36AM (#3991976) Homepage Journal
    Since the trojan dies if it sees an A first thing, obviously the guy running the box it's trying to contact should run something like this:

    yes "A" | nc -p 6667

    Then every daemon that connects gets an A right away, and thus dies. End of problem.
  • by fizbin ( 2046 ) <martin@s[ ]plow.org ['now' in gap]> on Thursday August 01, 2002 @11:06AM (#3992196) Homepage
    Except that then you would be bitten by stuff like this that trojans the makefiles.

    As far as trojaning individual .deb packages, apt-get will indeed abort if the download md5sum doesn't match the md5 recorded in the Packages file. However, there is damn near nothing to verify that the Packages file is what it ought to be. (And since .debs and Package files are pulled from the same place...)

    Every time this comes up on debian-devel the end result is a classic example of "the best is the enemy of the good". The suggestions for minimal signing of anything (say, having the process that creates the Packages file sign it) are always rejected because they wouldn't address the whole problem. (What if master.debian.org were hacked?) Unfortunately, no one can ever come up with an acceptable consensus definition on what the whole problem actually is, so nothing ever comes close to being implemented.
  • by gimpboy ( 34912 ) <john,m,harrold&gmail,com> on Thursday August 01, 2002 @11:59AM (#3992650) Homepage
    another more likely possability would be that he was using passwordless authentication. so by rooting a box he has access to, the cracker could ssh to any other computer/user with his public key in the authorized_keys file. they could also scp the trojaned file in the same manner. this is not very unlikely.
  • by Inoshiro ( 71693 ) on Thursday August 01, 2002 @12:12PM (#3992741) Homepage
    Alan Cox was calling Theo to task because he didn't like how Theo concealed the exact security problem until a workaround was given out. This is an attitude some developers have. It's not the best attitue from a customer/end-user standpoint, but some people who write code and give it for free use still don't understand it. Alanx Cox sounds like, despite him being a valuable asset to the community, he does not understand this.

    If he'd have said, "for all we know, OpenBSD could attract near-earth bodies" would you post this comment as "eerily prescient" on the recent asteroid stories? Sometimes things just aren't related. Despite what Mulder may think.
  • by Anonymous Coward on Thursday August 01, 2002 @12:24PM (#3992839)
    The md5sums are not enough. Someone trustworthy[1] should
    sign the package and then make the public key available
    from various other trustworthy sources (three, at least).
    Red Hat does this *right*:

    http://www.redhat.com/solutions/security/news/pu bl ickey.html

    Both the openssh and openssl people have to make pages like
    the one above. If such pages do exists please pretty please
    post them here because I haven't seen them. Where are the
    "official" openssh and openssl public keys? They are not
    mentioned anywhere on either sites' pages!

    [1] The definition of "trustworthy" is not trivial. Personally,
    a public key found on both the Red Hat site *and* a
    box-wrapped CD qualifies. YMMV.
  • by Sloppy ( 14984 ) on Thursday August 01, 2002 @02:02PM (#3993604) Homepage Journal
    OpenBSD's reputation has taking a bit of a beating lately, but a lot of it has been mostly superficial. The recently-found bugs in OpenSSL and OpenSSH don't really bother me a lot. Programming mistakes happen, and it looks like they're getting found. (Whether they're being found as part of the auditing process or because someone got bitten and was investigating why it happened, I don't know. I haven't looked into it.) And when they're getting found, fixes are being distributed lightning fast.

    I don't think these bugs are symptoms of a systemic problem.

    This trojan disturbs me a bit more than those bugs buried in thousands of lines of code. I guess I expect the OpenBSD guys to be good sysadmins, since, well, it just seems like something that should be their bag, baby. And maybe some will disagree with me, but I think that securely adminning a box is easier than writing secure code. (Maybe I'm just prejudiced because I'm a programmer. ;-)

    If a trojan got onto OpenBSD's own FTP server, it means that somebody fucked up. Maybe they're not keeping their box up-to-date with the latest fixes. (And it looks like they're not "eating their own dog food," and eating Sun dog food instead. That is ridiculous.) Or maybe, worst of all, some black hat knows about a hole that nobody else knows about. I don't know; I just know I really don't like this. I hope they get on the ball, regarding their unsecure server, muy pronto.

    There is a good side to all this, though. I actually give money to OpenBSD (not a lot, but it's something) because I want somebody out there doing OS and OS-related stuff, to be over-the-top paranoid, and I think OpenBSD is the right team (I guess they've got the best slogans). I selfishly want more secure tools to get into circulation, so that I can be among those who use them. And from that perspective, this incident is a fscking godsend, because I think it might result in people starting to adopt some better habits, which will also require some better tools and social networks:

    The solution to this trojan problem is not for people to start checking the MD5 sum on their tarballs. If you can't trust an FTP server to give you an unaltered file, then you can't trust a web server to give you a web page with an unaltered MD5 sum. Surely this is common sense?

    The real solution is digital signatures (i.e. an MD5 sum encrypted with a private key). And for that to really work, we're going to have to build up a web of trust, so that people will know whether or not they really have a publisher's public key, or an imposter's. Maybe this will get us a little closer to the day when I can encrypt every email I send, and have to decrypt ever email I receive, except for the spam which gets thrown away automatically since it's the only thing that isn't signed by someone accountable.

    It is hard to get people to use GPG. Real hard. Try convincing a friend (I mean a geeky friend; non-geeks are impossible) to use it, or try to organize a signing party sometime. I don't know why there's so much resistance and apathy, but it's there. We need all the help we can get, and today we got some.

  • by SN74S181 ( 581549 ) on Thursday August 01, 2002 @02:02PM (#3993606)
    You raise a point that for some reason everybody here is ignoring.

    I don't care how fancy the mechanism is to catch this kind of thing. All fine and well.

    How did the trojan get into the code in the first place? Are we to assume there's no oversight in code submissions for a package as critical as OpenSSH?

    In any commercial entity where a problem like this was uncovered, there would be a thorough audit of the submission path in process. Perhaps there is in this case as well. But why is nobody even discussing it??
  • by glwtta ( 532858 ) on Thursday August 01, 2002 @03:13PM (#3994148) Homepage
    Maybe now they will.

    why now? this whole episode seems to be a good example of the current system working well... tarball trojaned, ports system detects md5 mismatch, no compromise, no problem.

  • by 1729 ( 581437 ) <slashdot1729@nOsPAM.gmail.com> on Thursday August 01, 2002 @05:16PM (#3994982)
    In case you didn't already know this, you can easily check if there is: run netstat -a -n -p|less and check for any suspicious ports or processes. Better still, run pstree -p|less and check for any suspicious processes, whether they're connected to the network or not.

    Of course, this assumes that netstat and pstree haven't been replaced with compromised versions.

To do nothing is to be nothing.

Working...