Slashdot Mirror


Package Managers As Achilles Heel

An anonymous reader writes "Researchers from the University of Arizona have released a study that takes a look at the security of ten popular package managers. They were able to show all ten were vulnerable to attacks from a mirror or man-in-the-middle that allow an attacker to (along with other things) crash the system or obtain root access. Furthermore, the researchers created a fictitious administrator and company name and were able to lease a server and get it listed as an official mirror for all the distributions they tried (Ubuntu, Debian, Fedora, CentOS, and OpenSUSE). This raised the question: What keeps you up at night, the thought of attacks on your package manager or previously discussed and patched vulnerability in DNS?" justin samuel (one of the Arizona researchers) also points out a synopsis on CERT's blog.

263 comments

  1. Answer by Anonymous Coward · · Score: 5, Funny

    What keeps you up at night, the thought of attacks on your package?

    Yes.

    1. Re:Answer by adminstring · · Score: 5, Funny

      You must have kittens...

      --
      My truck is like a series of tubes.
    2. Re:Answer by jd · · Score: 5, Funny

      The correct modern spelling is kitteh, and you apparently solve that problem by supplying them with elebenty cheezburgers.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    3. Re:Answer by joeava · · Score: 2, Insightful

      Iran's missile keeps me up at night more than my Ubuntu's package manager.

    4. Re:Answer by mrbluze · · Score: 4, Funny

      Iran's missile keeps me up at night more than my Ubuntu's package manager.

      That depends on whether you live next door to one launchpad or the the other.

      --
      Do it yourself, because no one else will do it yourself. [beta blockade 10-17 Feb]
    5. Re:Answer by jank1887 · · Score: 1, Funny

      Iran's package manager keeps my missile up at night...

    6. Re:Answer by robert899 · · Score: 2, Funny

      You must have kittens...

      No, he's an acquaintance of Jesse Jackson.

    7. Re:Answer by Hordeking · · Score: 1

      You must have kittens...

      Kittens are getting kind of expensive these days. They say the supplies are dwindling. We need to find clean non-kitten alternatives that don't depend on foreign supplies. Otherwise, our masturbation based culture will grind to a halt.

      Please, think of the kittens.

      --
      Disclaimer: The opinions and actions of the US Gov't are in no way representative of those held by this author or its ci
  2. Hmmm by Anonymous Coward · · Score: 0

    I don't keep anything open on my firewall so nothing really keeps me awake at night. I got hit by slapper like 8 years ago when I didn't even use a firewall, but since then - nothing.

    1. Re:Hmmm by Anonymous Coward · · Score: 4, Informative

      Your firewall won't stop this type of attack... RTFA.

  3. I better update now by Krneki · · Score: 5, Funny

    ... oh wait!

    --
    Love many, trust a few, do harm to none.
    1. Re:I better update now by Anonymous Coward · · Score: 0

      This reply is written from a debian primary mirror.
      (this is not a joke, check the webserver logs)

  4. Compile from source yourself! by suck_burners_rice · · Score: 0, Troll

    I really don't understand what the big advantage is in using package managers. It's dangerous because you never know what "updates" will come down the pike. Thanks to the good folks who contribute to GNU Autotools, it's very easy to type ./configure followed by make and make install. Even end users can do this with a pretty high success rate. If there is a reason that you really need a package manager (for example, if you're a sysadmin responsible for many computers) then you can easily make your own packages and avoid trusting someone else's package decisions. Updates can be convenient, but they can screw things up really badly.

    --
    McCain/Palin '08. Now THAT's hope and change!
    1. Re:Compile from source yourself! by speedtux · · Score: 4, Insightful

      How does compiling from source help? Trojans can be introduced in source code just as easily as in binaries.

    2. Re:Compile from source yourself! by reset_button · · Score: 2, Insightful

      I like to have the latest versions of programs, with the latest features and bug fixes, without having to check the website for the latest available version, download it, compile and install it. Multiply that by tens of programs, and it's no fun at all. Additionally, when installing programs, there's no hunting down dependencies.

    3. Re:Compile from source yourself! by Anonymous Coward · · Score: 1, Insightful

      It's also very easy to hunt down hundreds of dependencies, right?

    4. Re:Compile from source yourself! by 99BottlesOfBeerInMyF · · Score: 3, Insightful

      I really don't understand what the big advantage is in using package managers. It's dangerous because you never know what "updates" will come down the pike.

      Normal people don't want to have to keep up on what the latest version of everything is as it comes out and what security holes are in it. That's one of the main reasons people use distributions instead of hacking together their own. People want knowledgeable experts to make the decisions and let the computer do the rest.

    5. Re:Compile from source yourself! by Anonymous Coward · · Score: 2, Funny

      It doesn't help at all. The grand parent is a twelve year old that discovered Gentoo yesterday. Gentoo is '1337' yo.

    6. Re:Compile from source yourself! by TikiTDO · · Score: 5, Insightful

      Unfortunately it's not nearly as easy to type:
      wget http://blahblah/dep1.tar.gz
      wget http://foobar/dep2.tar.gz (404 Sigh)
      wget http://woobar/dep2.tar.gz
      wget ftp://wowowow/dep2.1.tar.gz ... ... x20

      Followed by:
      tar -zxvf files.tgz x 20

      THEN followed by:
      times ./configure && make && make install x20 IN THE RIGHT ORDER

      Plus however long it takes you to debug the eventual compile problems because one of those obscure libraries that only one program uses was installed earlier with the wrong version.

      All said and done, I'd rather take my chances with package managers, thanks.

    7. Re:Compile from source yourself! by skeeto · · Score: 4, Insightful

      If you are downloading from a mirror, someone could apply similar methods to insert malicious code in your version of the source. And checking all of the source code is no trivial matter, especially if you are looking for an intentionally obscure bit of code.

      Also, you have to trust your compiler, which you *had* to get from someone else. Your compiler may be inserting malicious code.

    8. Re:Compile from source yourself! by 77Punker · · Score: 5, Funny

      You've got him all wrong. He's a twelve year old with a PhD that reads and understand every line of code before he allows it to execute on his own hardware.

    9. Re:Compile from source yourself! by HappySmileMan · · Score: 3, Insightful

      You don't type './configure', 'make' or 'make install' when installing stuff on Gentoo, it has a package manager, but thanks for playing

    10. Re:Compile from source yourself! by Anonymous Coward · · Score: 5, Funny

      Noob, he doesn't need source. I'm a 13 year old PhD and I assure you even I can read binaries.

    11. Re:Compile from source yourself! by hitmark · · Score: 2

      so you grab the same code from 3+ different mirrors and check them against each other...

      --
      comment first, facts later. http://chem.tufts.edu/AnswersInScience/RelativityofWrong.htm
    12. Re:Compile from source yourself! by rts008 · · Score: 2, Insightful

      Hear! Hear!
      When it becomes a problem like it is for Windows, I will then take notice.

      From my point of view, it's all 'nothing to see here, move along.'

      I will admit that the increasing popularity of *nix will eventually will make this an issue, the time is not now. Give it a few years and marketshare increase on the desktop.

      The source is always available to be checked, so I don't see a problem here unless someone like MS is trying to 'poison the well' to try to increase their marketshare. This is FUD as far as I am concerned. (I maintain backups, so WTF?!- let's see a problem with this before we jump the gun(or shark))

      --
      Down With Slashdot BETA!!! I've been around the corner and seen the oliphant; you can only abuse me from your perspecti
    13. Re:Compile from source yourself! by SMOKEING · · Score: 2, Informative

      ...exactly what happened to PHP a couple of years ago.

      But the general theme this post rings is: in FOSS, if you don't (as hardly any end user does) inspect the source code, know and trust the origin.

      It won't be long before those who write `malware' will start searching for ways to get hold of linux desktops. And for them, prospects aren't that promising with blunt exploits against whatever is running on your linux desktop with some ports open. Neither, I earnestly hope, will an average linux user be so outright... er... end-userish as to go happy-clicking on links in spam.

      Instead, setting up or overtaking some ftp.xx.debian.org is only sensible and effective to this end.

    14. Re:Compile from source yourself! by Anonymous Coward · · Score: 0

      I guess it's one less person you have to trust. With binaries, you have to trust both the person who compiled and packaged the software, but if you compile it yourself, you only have to trust the original author of the software.

      In practice very few people actually bother checking either way.

    15. Re:Compile from source yourself! by shadwstalkr · · Score: 5, Funny

      Also, you have to trust your compiler, which you *had* to get from someone else.

      Nah, I wrote my own compiler directly in machine code. I didn't trust my keyboard manufacturer either, so I tapped out Morse code on a homemade key. I made the BIOS out of coconuts, but that was just because that douchebag Gilligan said it couldn't be done.

      -Roy Hinkley

    16. Re:Compile from source yourself! by SMOKEING · · Score: 1

      In package maintainers we trust. Amen.

    17. Re:Compile from source yourself! by AusIV · · Score: 2, Informative
      Remember that fiasco a month ago where a debian maintainer commented out some code in OpenSSL because it was causing compiler errors? Turns out that code was an essential part of the random number generator.

      It's also plausible that a package manager could be compromised. It's unlikely with a major distributor like Canonical, Redhat, Novell, etc. but more likely if you use third party repositories.

      Packages managers put one more link in the security chain. In most cases, it's probably not the weakest link, but it does add one more vector for attack.

      Don't get me wrong. I use Ubuntu because of the package management. I could get slightly better performance if I compiled everything for my specific processor, and it would be a better security practice to compile my own packages, but for my personal systems the convenience of being able to say "install this package" outweighs the benefits of compiling everything myself.

    18. Re:Compile from source yourself! by BootNinja · · Score: 1

      ever heard of wildcards? you should look into them.
      This isn't to say that I disagree with you about package managers, I use ubuntu as well.

    19. Re:Compile from source yourself! by Quietus · · Score: 1

      LFS was my first ever Linux distribution, and I had no troubles whatsoever, despite being utterly unfamiliar with bash. Only problem I ever had was

    20. Re:Compile from source yourself! by el33thack3r · · Score: 1, Interesting

      Anybody who thinks that compiling from source provides security should read Ken Thompson's Turing Award talk titled Reflections on Trusting Trust.

    21. Re:Compile from source yourself! by Architect_sasyr · · Score: 3, Informative

      BSD Ports

      Now you get your package management AND you get to compile from source. Best of both worlds.

      --
      Me failed English...
      FreeBSD over Linux. If my comments seem odd, this may explain...
    22. Re:Compile from source yourself! by Typoboy · · Score: 1

      and in compilers, too.

    23. Re:Compile from source yourself! by suck_burners_rice · · Score: 0, Troll

      How in the fscking world does a serious opinion like the parent get modded Troll? Only on /.

      --
      McCain/Palin '08. Now THAT's hope and change!
    24. Re:Compile from source yourself! by Anonymous Coward · · Score: 0

      Just a wild stab in the dark, but it could, perhaps, have something to do with the fact that your opinion is totally stupid and unworthy of discussion.

    25. Re:Compile from source yourself! by neomunk · · Score: 1

      ... converting CRLF to newlines...?

    26. Re:Compile from source yourself! by gpuk · · Score: 2, Informative

      If I'm not mistaken, using Debian you can grab source packages as opposed to binaries simply by running apt-get source packagename rather than apt-get packagename

    27. Re:Compile from source yourself! by Anonymous Coward · · Score: 0

      BSD Ports

      Now you get your package management AND you get to compile from source. Best of both worlds.

      Gentoo Portage

      Now you get the above, plus Linux. Best of three worlds.

    28. Re:Compile from source yourself! by Anonymous Coward · · Score: 0

      Yeah, it's a nice story, but while it may be impossible to prove that your compiler is safe, it's certainly easy enough to make it implausible that it's got any hidden backdoors in it:

      1. Audit the compiler source code. Confirm that the source, at least, is good.
      2. Build a version as a cross-compiler to a totally different architecture.
      3. Use that to build another version as a cross-compiler to a third architecture.
      4. Use that to build a cross-compiler back to your actual architecture.
      5. Use that to build your actual compiler.

      It's incredibly unlikely that any adversary has constructed a sufficiently complex backdoor that will manage to propogate itself across an arbitrary choice of three different CPU architectures.

      Then you can disassemble the binary and audit the code in that, too. Again, it's pretty implausible that the adversary has built a backdoor that's clever enough to prevent an arbitrary disassembly tool from working on the compiler binary.

      Or you could write your own simplistic compiler from scratch, and use that to build the sophisticated compiler source code. It's pretty implausible that the adversary has built a backdoor that's clever enough to insert itself into a completely unrelated compiler that did not exist when the backdoor code was written.

      Of course, most people don't bother with any of this because Thompson's scenario is pretty implausible in the first place. The regular process of changing GCC between versions would probably break any malicious hidden code pretty quickly.

    29. Re:Compile from source yourself! by Haeleth · · Score: 1

      Well, you can save yourself quite a bit of time by combining the downloading and untarring in one streamlined step:

      wget -O- $URL | tar xz

      (Some non-GNU tars require "| tar xzf -" instead, or even "| gunzip | tar xf -".)

      Which brings me to another question: why the heck does everyone include the "v" in their tar invocations? Are you that obsessed with watching the contents of the file scroll past your eyes, cluttering up your terminal and actually slowing down the untarring process measurably with all that pointless I/O? Or do people just cargo-cultishly copy everyone else without the faintest understanding of what those letters mean?

    30. Re:Compile from source yourself! by sakshale · · Score: 1

      Right on! It is amazing how current that article remains.

      How far down the food chain do you have to go to insure the integrity of your systems? Are you even sure that the main CPU on your system doesn't have extra instructions that remain undocumented? As complex as the current CPU's are, they could have entire subsections devoted to malware and no one would notice until those sections were activated and did what they were designed to do.

      --
      For every problem there is a solution that is simple, obvious and wrong.
    31. Re:Compile from source yourself! by TikiTDO · · Score: 1

      You can of course do that. Hell, if you really wanted you could even do the other steps on one line too, but that's not quite what I was trying to illustrate with my example. Also, there is the fact that you're downloading data from the internet; It's a lot easier to resume when you have a partial file.

      As for the -v option, I'm not sure about everyone else, but I simply feel better when I see signs of progress on my screen. It's a lot more relaxing to see a few thousand files scroll by than to sit there and wait while your operation finishes. Silence can, after all mean many things: it may have crashed, your SSH may have timed out, or any number of other nasties could have happened. True, it's not as much of a concern for tar, but to be fair, I do quite a bit of debugging for a huge and quirky program. For me an empty screen often means some very unpleasant problems.

  5. verify against other sites by speedtux · · Score: 4, Interesting

    I think a lot of these risks could be reduced if people downloaded from one site and verified against one or more other sites. Furthermore, if the checksums were verified over SSL, some attacks would be harder.

    Right now, verifying packages against a site other than the one they were downloaded from seems cumbersome with apt--or does anybody know of a simple command line to do so?

    1. Re:verify against other sites by WarJolt · · Score: 0, Flamebait

      One could use a fake DNS to route all traffic to exploited servers. This doesn't really make it more secure.

    2. Re:verify against other sites by speedtux · · Score: 4, Insightful

      This doesn't really make it more secure.

      That's the kind of simplistic black-and-white view of security that is responsible for so many security problems.

      Of course it makes it more secure if I verify against multiple sites and over SSL: it protects against many of the attacks described in that paper, so it will be harder for an attacker to mount a successful attack.

    3. Re:verify against other sites by DarkOx · · Score: 2, Insightful

      Anything is better then nothing, even if you don't use SSL its still better. Rather the settup a fake package server ( easy ) and dupe you into using it ( probably easy ), the attacker now must compromise your DNS ( harder ) or dupe you into useing two of his fake package servers ( harder ).

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    4. Re:verify against other sites by Anonymous Coward · · Score: 0

      They could also download the sources themselves and compile them. If in an enterprise setting, they could have a centralized server to host compiled sources done in-house. Get a knowledgeable staff to scour the scripts, compile, then createrepo and you're done. Bunch of ways to deal with source including cvs and svn if not rss as well to inform on which package has been updated and what vulnerabilities to be aware of. I've been developing policies to simplify this and so far it's a hell of a lot easier than it was several years ago.

    5. Re:verify against other sites by houghi · · Score: 1

      SSL would be nice to have, but many things are on mirrors and those mirrors run FTP or HTTP. They are most of the time not under control of the distribution.

      --
      Don't fight for your country, if your country does not fight for you.
    6. Re:verify against other sites by Anonymous Coward · · Score: 0

      Add SSL and Tor (change package manager to access via privoxy 127.0.0.1 : 8118 ) and you have 2 additional layers, works great 4 me!

    7. Re:verify against other sites by rbanffy · · Score: 1

      You could do your package fingerprinting over https. That would take care of the fake DNS attack.

  6. Vendors sign with keys. by Zombie+Ryushu · · Score: 0, Redundant

    Every Linux Vendor I can think of signs the package with a key. Just make sure that the package manager won't install the application without a key.

    1. Re:Vendors sign with keys. by 99BottlesOfBeerInMyF · · Score: 1

      RTFA

    2. Re:Vendors sign with keys. by blueg3 · · Score: 2, Informative

      The article actually discusses attacks that can be made by a malicious mirror even if you are only accepting signed packages.

    3. Re:Vendors sign with keys. by pembo13 · · Score: 2, Informative

      Considering Fedora (at least) signs all packages, seems like the authors should have been clear if the attack still works if the packages are not signed.

      --
      "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
    4. Re:Vendors sign with keys. by Anonymous Coward · · Score: 0

      Every deb package I install is GPG-signed. How can a bad mirror harm me? Distribute malicious packages with a correct footprint?

    5. Re:Vendors sign with keys. by Anonymous Coward · · Score: 2, Informative

      Thanks for reading the article.

      The point is that there are plenty of signed (but old and vulnerable) packages that can be given to your system that it will gladly accept leaving you open to attack.

    6. Re:Vendors sign with keys. by speedtux · · Score: 1

      That's true, but are you sure that you're getting the keys in a secure way in the first place? Since people generally download the ISO without encryption, the ISO may have been altered as well. And are you sure the commands you display things with haven't been altered either? To really be sure, you probably would need to get a physical CD from a trusted source, including all keys, and then verify your entire system from that.

      Still, I think that the larger risk for trojans still comes from people planting them in sources or binaries; any small open source project and any packager could introduce a trojan, and it only takes one.

    7. Re:Vendors sign with keys. by Sloppy · · Score: 3, Informative

      Every Linux Vendor I can think of signs the package with a key. Just make sure that the package manager won't install the application without a key.

      They're saying that signing the package isn't good enough.

      I think the threat they're describing is based on this idea: your Linux Vendor signs package foo-1.0. People being fallible, a security vulnerability is eventually found in foo-1.0. It gets patched. foo-1.1 comes out, and your vendor signs that too, and you install it. You are happy.

      Then, one day, you tell your system to update everything. Your computer talks to some mirror, and gets a list of the latest packages. Then you download the latest packages. Oh look, here's foo-1.0. Oh good, it's signed by the vendor, therefore it's safe. You install it.

      Oops, the mirror just tricked you into installing software with a known bug. The package was signed, but the information about what is the best package to download and install, wasn't signed.

      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    8. Re:Vendors sign with keys. by 99BottlesOfBeerInMyF · · Score: 3, Informative

      Considering Fedora (at least) signs all packages, seems like the authors should have been clear if the attack still works if the packages are not signed.

      The article seemed pretty clear to me. The most vulnerable systems don't have signed packages or metadata or expiring signatures. The least vulnerable systems have all of those, but are still potentially vulnerable for a window of time before the metadata signature expires but after a vulnerability is found and fixed in a package.

    9. Re:Vendors sign with keys. by WarJolt · · Score: 1

      RTFA. The key is valid forever. A server could have your machine load a previous version of software that has already been signed by the vendor. The previous version may not have a security fix and may be exploitable. Then your machine is compromised.

    10. Re:Vendors sign with keys. by kwalker · · Score: 5, Informative

      What package manager silently downgrades packages?

      I can see a package mirror (maliciously) refusing to stock updates, but yum at least picks a mirror at random by default. Apt didn't last I saw, but if you picked your own mirror, you already trust them.

      --
      ... And so it comes to this.
    11. Re:Vendors sign with keys. by blueg3 · · Score: 1

      I could answer that, but the short article you didn't read already does.

    12. Re:Vendors sign with keys. by Lehk228 · · Score: 1

      you download the hashes from the project page over SSL

      --
      Snowden and Manning are heroes.
    13. Re:Vendors sign with keys. by Rakishi · · Score: 2, Insightful

      A server can't make your machine do jack shit. Your machine is the one that pulls an old version and downgrades to it. If your package manager silently downgrades packages then that's a flaw in all cases. What if a mirror just happens to be out of date?

    14. Re:Vendors sign with keys. by Anonymous Coward · · Score: 0

      The replay attack is limited: it freezes your software, so it lasts until your next update with a new server. (Imagine it running from the exploit discovery until a week or so after the security update.) The article mentions a scenario where one is given a snapshot from a year ago, but then the attack would be much less useful because of the downgrade warnings (which could be avoided by having a user install a statically-linked exploitable older package or hoping not enough users will mind the warning to keep the server up for a few more days.).

      The article mentions random repository choosing in light of absolute security: if you are randomly given an replay-attack server, then you are vulnerable for that period. In essence, it implores users to do a better job of verifying server trust than the distributions (which seems circular to me unless someone or a company has the resources to verify servers).

    15. Re:Vendors sign with keys. by alrj · · Score: 4, Informative

      Ok, so foo-1.1 is uploaded on security.debian.org.

      What are the official mirrors for security.debian.org ?
      None. And if you decide to use some mirror anyway, try at least to select one you trust.

      End result : everyone gets the patched foo-1.1

    16. Re:Vendors sign with keys. by Anonymous Coward · · Score: 0

      I'm pretty sure the package lists are signed, too.

      In any case, information about versioning and dependencies and such is usually part of the package, which will be signed. So even if the package list was falsified somehow, it still wouldn't pass the checks.

    17. Re:Vendors sign with keys. by rohan972 · · Score: 1

      I read that, but what package manager _updates_ from foo-1.1 to foo-1.0?

    18. Re:Vendors sign with keys. by speedtux · · Score: 1

      And how do you know that you can trust your browser to display the correct hashes? The attacker knows where the correct hashes are available and what the correct hashes are and can substitute his hashes for the correct ones.

    19. Re:Vendors sign with keys. by maswan · · Score: 3, Informative

      But both Ubuntu and Debian have central security mirrors for security updates, which are added by default.

      For this it doesn't matter (much) if a regular package mirror doesn't have the latest openssh, the security mirror will have one with the security fix in.

      Now, there could possibly be some cases where security fixes gets published as regular updates where a replay attack could be successful. If the story would load off the apparently slashdoted web server, I could see if they had seen such issues, etc.

    20. Re:Vendors sign with keys. by phoenix.bam! · · Score: 1

      How do you even know the world exists? Maybe you're part of an experiment by an evil genius who has your brain in a jar and all of this is just a creation of his making? Nothing you know actually exists.

    21. Re:Vendors sign with keys. by Lehk228 · · Score: 1

      if you are already compromised then there is fuck-all you can do to prevent further compromise anyways.

      --
      Snowden and Manning are heroes.
  7. Depends on bugs in old software by xZgf6xHx2uhoAj9D · · Score: 5, Informative

    Just in case anyone thought (like me) that the vulnerabilities they're talking about might let an attacker install arbitrary software just through the package manager, this doesn't seem to be the case.

    The attack might go like so:

    1. the attacker finds some really old version of some software that they know to be buggy. E.g., they find OpenSSH version negative 5 or something, which had a terrible buffer overflow bug in it. This software has already been signed (years ago) by the package authorities
    2. the attacker then sets up a mirror with only the broken version of OpenSSH on it
    3. when a hapless Linux user goes to update OpenSSH, your mirror replies saying "the newest version is negative 5. See! I even have a 5 year-old certificate for it"
    4. your client says "...oh...okay"
    5. you install the old, buggy version of OpenSSH
    6. the attacker has your IP address and knows that you downloaded (and presumably installed) the old version of OpenSSH
    7. the attacker haxx0rz you

    The simple fix is to change the client so that it never regresses (e.g., never installs software older than what it already has installed).

    1. Re:Depends on bugs in old software by 99BottlesOfBeerInMyF · · Score: 4, Informative

      The simple fix is to change the client so that it never regresses (e.g., never installs software older than what it already has installed).

      That's a start, but then they can just keep you at the current version and when a new buffer overflow is found and an exploit created, then they hack you. Better validation of mirrors and package managers that check multiple repositories and compare the results are probably a more complete fix.

    2. Re:Depends on bugs in old software by blueg3 · · Score: 1

      Or, require the "list of most recent packages" to be signed, sign it with a timestamp, and have the package manager reject old package lists.

      There are plenty of other, more complicated schemes where packages known to have vulnerabilities could have their signatures invalidated.

    3. Re:Depends on bugs in old software by thatskinnyguy · · Score: 3, Insightful

      The simple fix is to change the client so that it never regresses (e.g., never installs software older than what it already has installed).

      That's good and all until you download a bleeding edge version that is buggy as hell and want to go back to the old version.

      The simple fix is to change the update applications so that it never regresses (e.g., never installs software older than what it already has installed).

      --
      The game.
    4. Re:Depends on bugs in old software by f(x)+is+x · · Score: 1

      This also is still a problem for new package installs...

    5. Re:Depends on bugs in old software by tolan-b · · Score: 1

      Existing package managers won't regress unless you explicitly instruct them to. A standard apt-get update won't install older versions of packages just because they're in the list.

      As I understand the 'vulnerability', all they can do is keep you on an existing version known to be buggy, but if that's the case then surely they would already know you don't have the latest version because they've been getting their updates from you, so you don't supply it in the first place, then you hack them.

      Maybe I'm missing something in the article? It doesn't seem to make sense.

    6. Re:Depends on bugs in old software by tolan-b · · Score: 1

      switching subject and object half way through a sentence... go me :p

    7. Re:Depends on bugs in old software by thatskinnyguy · · Score: 1

      Yes I understand that I was wrong there.

      There is quite a difference between Aptitude (Ubuntu, Debian) and Portage (Gentoo). I ran Gentoo for a while and it seemed like every other package I got from Portage was either an Alpha or was buggy as hell. Even the versions of gcc and gtk that initially downloaded with Gentoo had bugs in them that were scary.

      Since switching to Ubuntu, I haven't had nearly as many problems with unstable packages.

      --
      The game.
    8. Re:Depends on bugs in old software by scheme · · Score: 1

      The simple fix is to change the client so that it never regresses (e.g., never installs software older than what it already has installed).

      That's good and all until you download a bleeding edge version that is buggy as hell and want to go back to the old version.

      You can force the package manager to install an older package by using a force option to account for this instance. But this option needs to be given and the default behaviour for most (all?) package manager is to never downgrade.

      --
      "When you sit with a nice girl for two hours, it seems like two minutes. When you sit on a hot stove for two minutes, it
    9. Re:Depends on bugs in old software by scheme · · Score: 1

      That's a start, but then they can just keep you at the current version and when a new buffer overflow is found and an exploit created, then they hack you. Better validation of mirrors and package managers that check multiple repositories and compare the results are probably a more complete fix.

      At least for yum, the software will randomly pick and check a different mirror each time it is run so unless you have subverted a large fraction of mirrors, you've managed to delay the update for a short time period at best.

      --
      "When you sit with a nice girl for two hours, it seems like two minutes. When you sit on a hot stove for two minutes, it
    10. Re:Depends on bugs in old software by Culture20 · · Score: 1

      Hasn't yum been able to use https for a while, IIRC, YAST2 can too, and so can apt. Several mirrors have https available. Seems mirror validation is solved, it's just not widely adopted by default.

    11. Re:Depends on bugs in old software by 99BottlesOfBeerInMyF · · Score: 1

      At least for yum, the software will randomly pick and check a different mirror each time it is run so unless you have subverted a large fraction of mirrors, you've managed to delay the update for a short time period at best.

      That's not really a good thing. Your machine picks a random mirror, which just happens to be a compromised one. It updates OpenSSH or whatever to fix that flaw, but at the same time knows your machine's IP and that it is running a vulnerable version, exploits it and loads a trojan which fires up later. Sounds like an easy way to compromise a significant number of systems. In fact, one of the recommendations in TFA is to choose a particular repository from someone you know and trust since it was so easy for them to get one running and people using it with no credentials.

    12. Re:Depends on bugs in old software by 99BottlesOfBeerInMyF · · Score: 1

      Seems mirror validation is solved, it's just not widely adopted by default.

      True enough, but most people don't end up picking a repository they know they can trust, as demonstrated by this study. I've seen very few free servers with HTTPS that I would know I can trust and most people let their system pick one for them.

    13. Re:Depends on bugs in old software by Anonymous Coward · · Score: 0

      Yes I understand that I was wrong there.

      There is quite a difference between Aptitude (Ubuntu, Debian) and Portage (Gentoo). I ran Gentoo for a while and it seemed like every other package I got from Portage was either an Alpha or was buggy as hell. Even the versions of gcc and gtk that initially downloaded with Gentoo had bugs in them that were scary.

      Since switching to Ubuntu, I haven't had nearly as many problems with unstable packages.

      Uh, were you running Gentoo Stable, or Unstable? Gentoo Stable isn't really that different than most other binary distribution's package version set.

  8. I don't know about you but... by angusthefuzz · · Score: 1, Funny

    I can't sleep because of the "thought of attacks on my package"...

  9. "project" managers by heroine · · Score: 2, Funny

    The headline should be project managers as achilles heal.

    1. Re:"project" managers by drinkypoo · · Score: 1

      Okay, but what is "managering" and what is an achille?

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  10. Sounds real and exploitable.. by moreati · · Score: 5, Informative

    Until I RTFA, I was ready to dismiss this as 'failing to understand signed packages. Wrong, they understand package signatures all too well.

    The basic attacks seems to be.

    1. Obtain old, signed packages.
    2. Become a mirror for debian|fedora|ubuntu|$distro.
    3. Wait for vulnerabilities to be found in some package.
    4. Do not serve the updated packages, continue to serve the vulnerable version.
    5. Log IPs of machines downloading from your mirror.
    6. Root them.

    This works because some package manager software will download and use package metadata even if it's older than what's cached.

    One long term solution would be to sign package metadata and serve it only from one central location, over https/sftp. There may be others.

    Alex

    1. Re:Sounds real and exploitable.. by jmorris42 · · Score: 5, Insightful

      > One long term solution would be to sign package metadata and serve
      > it only from one central location, over https/sftp.

      Even that won't help. The authors got so caught up in the complex exploiting they didn't notice the BIG implication of their work. The problem can't be fixed with tech, crypto or anything but https connects to known to be trusted mirror operators.

      Follow along as I demonstrate. Spamgang wants zombies so they install a massive mirror farm for all of the major distros. They run it perfectly, fully updated with upstream as fast as their phat pipe can get it, perfectly signed metadata, packages and everything offered by http or https. Then they wait.

      Sooner or later another remote root bug, in openssh for example, will hit and they are ready. Thousands of machines either automatically connect or their owners see the story here on /. and hit the update button. They download that signed, correct metadata and sure enough their machines realize they need that new openssh package and ask the mirror for it. And are 0wned a few milliseconds later.

      Because in the act of requesting the package all those machines just told the spamgang that a specific IP is a) running openssh, b) it is the vulnerable version and c) that host is currently connected to the network and very likely has the vulnerable software running. So in the time it takes the updated package to transfer, unpack and install they have ample time to get in and install a rootkit. The beauty is that the victim will patch the hole and thus prevent anyone else from getting the zombie.

      Wait a random time before beginning to use the new zombies to help prevent people from getting wise to what is happening and the spamgang could likely get away with it for years.

      --
      Democrat delenda est
    2. Re:Sounds real and exploitable.. by v1 · · Score: 1

      If the package manager simply refused to use metadata signed more than say, 3 months ago, wouldn't this help?

      --
      I work for the Department of Redundancy Department.
    3. Re:Sounds real and exploitable.. by Daengbo · · Score: 1

      Torrent/Jigdo the current package list AND the packages. The tracker would be on a trusted server.

    4. Re:Sounds real and exploitable.. by tolan-b · · Score: 1

      Thanks for explaining what I was trying to explain in another comment much better than I managed to.

    5. Re:Sounds real and exploitable.. by Wrath0fb0b · · Score: 1

      Even that won't help. The authors got so caught up in the complex exploiting they didn't notice the BIG implication of their work. The problem can't be fixed with tech, crypto or anything but https connects to known to be trusted mirror operators.

      There's an easy technological fix -- signing expiration. Instead of signing a package forever, the distro should sign it for, say, 2 weeks. When each signature expires, the distro team should re-sign it only if there is no newer stable version. The client can then easily know if the update mirror is out of date (maliciously or otherwise).

      The whole process could be implemented and automated in a week or two (no, I'm not volunteering).

    6. Re:Sounds real and exploitable.. by Anonymous Coward · · Score: 0

      OK, then. Let the update manager add an iptable rule to block *all* incoming traffic from the moment you contact the mirror until either the update is complete or it finds out there are no relevant updates.
      A bit lame, but blocks this particular attack. Sadly, it does not prevent the malicious mirror from replying "no updates available" and attacking anyway.

    7. Re:Sounds real and exploitable.. by LordLucless · · Score: 2, Informative

      You miss his point. The mirror in the parent's scenario acts, in all respects, as a proper, correct mirror should.

      It also logs all requests for updates, and roots any box that requests an update from a known-to-be-vulnerable package. While it acts as a respectable mirror, it is also getting detailed information on what out-of-date packages you have, and has the ability to exploit them *before* the fix you requested is downloaded/installed.

      The mirror is never out of date, it keeps it's signatures up to date - and it still compromises machines.

      --
      Just because you're paranoid doesn't mean there isn't an invisible demon about to eat your face
    8. Re:Sounds real and exploitable.. by Anonymous Coward · · Score: 0

      >Sooner or later another remote root bug, in openssh for example, >will hit and they are ready

      Spamgang needs to craft an exploit faster than the first wave of updaters. They're already only getting a fraction of the possible
      targets.

    9. Re:Sounds real and exploitable.. by scheme · · Score: 1

      This works because some package manager software will download and use package metadata even if it's older than what's cached.

      This doesn't work. If you have an outdated package metadata list then, the package manager won't try to download any packages since the installed packages on the system are as new or newer. If you have an up to date package metadata list but don't have the packages, the package manager will go to another repository and try to download the package from there when it notices your repository is missing the relevant packages.

      --
      "When you sit with a nice girl for two hours, it seems like two minutes. When you sit on a hot stove for two minutes, it
    10. Re:Sounds real and exploitable.. by XanC · · Score: 1

      It sounds like Debian users are still okay, since there are no official mirrors for security.debian.org. Sometimes this causes problems; I remember it being unreachable back when X was one enormous package and there was a big bugfix. But it helps for situations like these.

    11. Re:Sounds real and exploitable.. by Wrath0fb0b · · Score: 1

      Well, I was responding to a different parent but I acknowledge that the scenario is not covered in my proposed system. Proposed system 1.1 requires only a client-side fix, however.

      After downloading the updated package meta-data, but before requesting any packages (and therefore before it has revealed anything to the mirror), any services that are to be upgraded are disabled. This will require all packages that interact with internet-facing services to include a field detailing how to bring the service down. For instance, the OpenSSH package might list 'kill 9 $SSHD_PID' in this field. After the service has been successfully taken down, the request for the package is sent, things are updated, and everyone is happy.

    12. Re:Sounds real and exploitable.. by nabsltd · · Score: 1

      5. Log IPs of machines downloading from your mirror.
      6. Root them.

      Even if you get this far without the system updating the package from a non-hostile mirror, you're rolling the dice again for your ability to execute an attack.

      First, the vulnerable package has to be exposed to a public IP. Using OpenSSH as an example, it's installed on all of my Linux machines, but only one has it available on a public IP, so all the rest are safe (at least from an initial attack).

      Then, you have to scan pretty much every port in case they have changed the default for the package...this can alert an IDS which could protect the system.

      Last, you have to hope they download the package using the same IP address that the vulnerable program is bound to. In my case, my only exposed Linux machine listens for inbound connections on one public IP, and initiates most outbound connections on another public IP, with a few outbound on a third public IP (depending on the protocol and destination host and/or port). So, you could bang every port on the IP address that retrieved the package and still get nothing.

      This is not a unique situation, either, as I work with several sites that do the same thing where connections to/from the same machine are on different IP addresses...one in which the in and out are behind completely different firewalls.

    13. Re:Sounds real and exploitable.. by rgmoore · · Score: 2, Informative

      After downloading the updated package meta-data, but before requesting any packages (and therefore before it has revealed anything to the mirror), any services that are to be upgraded are disabled.

      That will only work until the vulnerability is in something that can't be shut down during the update process, like the package manger or the kernel. That list might be small enough that it's practical to have a single, secure server for those updates, but it's an added complication to the problem.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    14. Re:Sounds real and exploitable.. by chrono325 · · Score: 1

      Clever and nefarious. Nice.

      It seems that the solution to that would be only to download updates from
      trusted servers over HTTPS (or some other encrypted connection).

      A more interrupting solution would be to shut off any remote-exploitable
      services between the time the package is requested and when it is
      installed. This could be included with the (signed) metadata of
      packages. Something like "OpenSSH needs to be updated, and has a
      remote-exploitable vulnerability, so shut it down before grabbing the package."
      This might be acceptable for some workloads.

      You could combine the two by allowing the package manager to mark certain
      mirrors as trustworthy or not and shutting off remote-exploitable services when
      downloading an update to that package from an untrusted mirror.

      This might be going overboard, though.

    15. Re:Sounds real and exploitable.. by Anonymous Coward · · Score: 0

      Well, the attack does not work on stock openSUSE install because it uses a redirector controlled by openSUSE, which redirects to mirror only for RPM packages, never for metadata.

      This means the client will get up-to-date metadata (including the checksum of the packages), so a mirror serving old package will be detected by the package manager as a package failing the checksum.

    16. Re:Sounds real and exploitable.. by drinkypoo · · Score: 4, Informative

      It's easier just to firewall all new connections until updates are complete.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    17. Re:Sounds real and exploitable.. by RAMMS+EIN · · Score: 1

      So, what it boils down to, really, is that you trust the server you pull updates from. In itself, that is nothing new. What is new is pointing out some specific attack vectors that you open yourself to.

      --
      Please correct me if I got my facts wrong.
    18. Re:Sounds real and exploitable.. by Anonymous Coward · · Score: 0

      Sooner or later another remote root bug, in openssh for example, will hit and they are ready. Thousands of machines either automatically connect or their owners see the story here on /. and hit the update button. They download that signed, correct metadata and sure enough their machines realize they need that new openssh package and ask the mirror for it. And are 0wned a few milliseconds later.

      Because in the act of requesting the package all those machines just told the spamgang that a specific IP is a) running openssh, b) it is the vulnerable version and c) that host is currently connected to the network and very likely has the vulnerable software running. So in the time it takes the updated package to transfer, unpack and install they have ample time to get in and install a rootkit.

      This can be guarded against, fortunately.

      Have the package manager install firewall rules to block new incoming connections whilst it is downloading and installing the new packages. Then remove the rules once installation is complete.

    19. Re:Sounds real and exploitable.. by Dionysus · · Score: 1

      After downloading the updated package meta-data, but before requesting any packages (and therefore before it has revealed anything to the mirror), any services that are to be upgraded are disabled.

      Except the fact that metadata update and the package request/update is two steps for a reason. You might have set it to download the package metadata on a set schedule, so that when you are doing the maintenance, you only have to do the package download/upgrade.

      For instance, Ubuntu will update your package metadata once a day, so that it can notify you whether there are new packages. If you don't provie any time between updating the package metadata and upgrading the package, then lots of systems will be out of commission the first time a network service is set to be updated.

      For instance, the OpenSSH package might list 'kill 9 $SSHD_PID' in this field. After the service has been successfully taken down, the request for the package is sent, things are updated, and everyone is happy.

      Except the people who ssh into their servers to do maintenance.

      --
      Je ne parle pas francais.
    20. Re:Sounds real and exploitable.. by Anonymous Coward · · Score: 0

      Why not just connect to the server via Tor, or other anonymising proxy? Then, unless the package manager itself is subverted, there is no return path for the hacker to connect to.

    21. Re:Sounds real and exploitable.. by Boris_SDC · · Score: 1

      I think Debian Stable should be safe from this, because the security updates all come from security.debian.org (which is centralised AFAIK).

      I can see how this would be a problem for other versions though.

    22. Re:Sounds real and exploitable.. by Anonymous Coward · · Score: 0

      Solution: Shut down the daemon before downloading the update.

    23. Re:Sounds real and exploitable.. by cowbutt · · Score: 1

      Yet another good reason to set up a private local mirror of your chosen distro(s') update repositories and configure all your hosts to use it as their only source of updates.

      Then, even if your mirror pulls from a mirror operated by spamgang[TM], they don't get any visibility of the vulnerable software within your organisation, other than (maybe) the machine performing the mirroring.

    24. Re:Sounds real and exploitable.. by Ant+P. · · Score: 1

      What you've just described is the update system Gentoo has used for years. And they're notably missing from the list of distros tested (but then again, that list includes Debian twice...)

    25. Re:Sounds real and exploitable.. by jmorris42 · · Score: 1

      > It sounds like Debian users are still okay, since there are
      > no official mirrors for security.debian.org.

      Partly. As was implied in my original post, the only total solution is https hits to a trusted server. At least as of etch, Debian is only doing http connects to security.debian.org. But the trusted server solution won't scale without adding subscription fees, opening up the admission requirements to mirror or a major donor. Imagine if every Ubuntu user converted to debian and tell me it wouldn't break the current servers.

      Without https you are still vulnerable to packet sniffing, dns poisioning and man in the middle attacks.

      --
      Democrat delenda est
    26. Re:Sounds real and exploitable.. by XanC · · Score: 1

      Without https you are still vulnerable to packet sniffing, dns poisioning and man in the middle attacks.

      True, but at least those are much more difficult than just getting on the mirror list.

    27. Re:Sounds real and exploitable.. by psydeshow · · Score: 1

      And what package managers have you worked with that would shut down a service _before_ downloading the package?

      True that this solution would prevent a mirror from owning your box... it creates a nice healthy denial of service attack, instead. And if the service in question is openssh, good luck reconnecting.

    28. Re:Sounds real and exploitable.. by psydeshow · · Score: 1

      Nice work on your OpenSSH setup. You realize you are an exceptionally careful admin, right?

      Most folks run standard services on standard ports. Imagine a remote exploit in Apache or Postfix (or in the Debian packages of those otherwise bug-free daemons). If your Postfix daemon doesn't listen on port 25, you don't get any mail.

    29. Re:Sounds real and exploitable.. by nabsltd · · Score: 1

      I'm not careful...I'm lazy. ;->

      I got tired of script-kiddies banging away at port 22 and filling up my logs and forcing me to make sure nothing was wrong (even though they don't have hope in hell of logging in, as they don't have a valid certificate for any user on my machine). Ever since I changed the port, I've seen no failures in the logs from anyplace that wasn't just a known user making a mistake.

      Definitely true about services that pretty much have to run on fixed ports. MOD PARENT UP for this.

  11. Not a real issue with Debian today by spotter · · Score: 2, Informative

    they basically say so themselves

    Use signed repository metadata. If your package manager or distribution does not yet support signed metadata but only signed packages, at least require signed packages until signed metadata is supported.

    Debian does that. The Release file defines what Package database files are available, and their md5sum's. It is signed.

    the Package files include md5sum for the packages (can't modify the Package file otherwise signed md5sum in Release file will fail, can't modify the actual package as wont match md5sum in package file).

    I would argue, that manually using the package manager (dpkg over apt) is less secure if one has apt set up correctly.

    1. Re:Not a real issue with Debian today by Anonymous Coward · · Score: 0

      Indeed.
      A man-in-the-middle-attack with Debian would be pointless, what with their frequent updates.

    2. Re:Not a real issue with Debian today by virtual_mps · · Score: 1, Informative

      More than that, Debian has a very limited set of security mirrors, and the default configuration points to a round-robin set of mirrors (so even if one of n was compromised and stopped serving updates, and nobody noticed--very unlikely--you'd only hit that mirror roughly one out of n updates).

      This article has all the hallmarks of a sensationalized report from someone either trying to impress people or generate page views. Sure it's relatively easy to add a relatively untrusted tertiary debian mirror, but the article fails to explain how that's relevant to compromising security updates from the security mirrors (which are, by default, added as a separate entry in the sources.list file).

      It's also possible to put a close, fast mirror at the top of the list and add another slower but more reliable one lower in the list. apt will automatically choose the newest package from the closest available mirror.

      Did the article's authors really investigate the debian infrastructure before writing their faq entries?

    3. Re:Not a real issue with Debian today by hweimer · · Score: 2, Interesting

      If you use the Debian Security Analyzer, you cannot simply supply vulnerable versions of packages as they will still be listed by debsecan.

      --
      OS Reviews: Free and Open Source Software
  12. Re:So, Linux is not more secure? by Anonymous Coward · · Score: 2, Funny

    Yes. Yes you must.

  13. MD5 by InlawBiker · · Score: 1, Redundant
    The summary is a little misleading because you can't just replace, say, 'ls' with 'exploit-binary-named-ls' because it'd fail the MD5 check. But a MITM constructed like they suppose could easily work. Briefly, it is:

    1. Set yourself up as a mirror
    2. Put old packages up with known vulnerabilities.
    3. Distribute "updates" listing the old packages as new updates.
    4. Watch your logs to see who updated with old packages, then go PWN them.

    It also counts on lazy admins, but garsh how rare are those.

    I guess it comes down to controlling distribution of the updates. Kudos to these Arizona guys. This is a really simple method that can cause complete mayhem in uncountable ways.

    1. Re:MD5 by blackest_k · · Score: 1

      Then surely the key is not to get the current package list and md5 check from the same mirror that you download from.

      If source 1 says package x should be this version and with this md5 sum then a mirror offering a different version and different md5 sum shouldn't be trusted automatically.

      I don't think it would be too difficult to make the packaging system more robust than it is at present.

  14. experience with Gentoo by Anonymous Coward · · Score: 0

    It's quite a while back, that I used Gentoo, so I can't remember all details.

    I wasn't able to update a system package, because updating the portage tree had killed the file responsible for the system to know about the system packages. I was told this was no bug but a feature and within days I had migrated all machines to another distribution.

    In this context we discussed the vulnerability of all these package systems.

    cb

  15. Did anyone check Mandriva? by f2x · · Score: 1

    I've been using Mandr(ake/iva) for years now, and some of their releases were OK, while others crashed and burned. It was cool though, because it was usually fast and breezy to set up. When Mandriva One 2008.1 came to town, I was impressed! Hardware detection and support was faster and better than ever! It set up so smooth and dreamy, you would have to be crazy to use anything else. Then the updates started happening... Sometimes several every week. Then it got cranky. Web access isn't quite so responsive as it used to be. I had to give it up on my EEE and resort to using XP. My desktop is lumbering through it, but I'd still like to format and re-install with 2007.1. The major trouble with Mandriva One 2008.1 is they don't actually include your make/install, build tools so you have to use their package manager over the net. It's not such a dreamy feeling anymore.

    All that, and I'm not so sure Google or Firefox are necessarily my friends anymore either... Did the good guys lose or something? What's happening here?

    --
    Blessed with all the brains that God gave a duck's ass, and twice the charisma.
    1. Re:Did anyone check Mandriva? by Anonymous Coward · · Score: 0

      Don't use Mandriva One then. If you install from the DVD or use the CD Image from the DVDPath/i586/install/images/boot.iso and install over the 'net it will give you the option of installing all the build tools OR you can install the meta-packages such as task-c-devel, task-c++-devel and the like. The 2008 distro of Mandriva allows you to see only these meta-packages in the package manager. I've been using Mandriva for years, have tried Ubuntu and Fedora and others and always come back to Mandriva.

    2. Re:Did anyone check Mandriva? by Zombie+Ryushu · · Score: 1

      You always know the troll pushing XP.

      I have a rather complex Mandriva operation myself, I've talked about it before. Anmd You are wrong. totally wrong. You can install autotools, automake, and all that other stuff.. Thats a dependancy of the rpm-build package. I have all Mandriva 2008.1 domains up and running, '

      I am currently chasing an ALSA buffer under run in D2X-XL.

      But anyway. Yes my machines otherwise work fine. This person is probably having other issues. Like, bad DNS redirection.

      Notice how the first time things get a little flaky he runs for XP as fast as he can?

    3. Re:Did anyone check Mandriva? by Anonymous Coward · · Score: 0

      Parent post is proof positive that just because you run Linux it doesn't mean you're a nerd.

    4. Re:Did anyone check Mandriva? by f2x · · Score: 1

      Me? A troll? No.

      Sorry, but you got me wrong. I started using Mandrake as my primary OS in 2001, so it's hardly the first time things have gotten flaky. Now say it with me: "It's an operating system, not a religion." Besides, I can't seem to get my SCR331 USB CAC reader working under Linux.

      My home built 3GHz Prescott based desktop system (exclusively Mandriva and has never run XP) also did the update and now it's turned into goo. Booting takes forever, and KDE is not its usual perky self. I even had to shut it down hard because it went non-responsive. (The mouse was moving but nobody home.) I could be wrong, but I suspect that somebody poisoned the well.

      My only other computer (a rather generic "Enpower" laptop) is also running Mandriva. It's still using "2007.1 Free" and last checked, seemed to work just fine. Sadly I haven't touched it in weeks because it's no longer the "New Hotness". I purchased it "new" several years ago sans OS. It has never run XP.

      Also, the make tools and other stuff aren't actually on the Mandriva One 2008.1 disk! You have to get them off the net if you want that functionality... So I'm NOT "totally wrong".

      Please don't paint me with the MS astroturfer brush. I may not be out there seething at the gums over every evil deed carried out by those big, bad, terrible, nasty corporations, but I don't really have the patience to waste time with every two bit revolutionary. I'm just trying to find the solutions that work best for my situation.

      --
      Blessed with all the brains that God gave a duck's ass, and twice the charisma.
  16. Re:Neither by HappySmileMan · · Score: 4, Funny

    I bet your girlfriend doesn't keep you up at night either... It's ok, someday you'll find someone who loves you

  17. university repos! by friedman101 · · Score: 0

    this is by no means a cure all but you're generally going to be okay if you only use mirrors that end in .edu. i use arch linux which doesn't do any fancy digital signing stuff but until someone hacks the repo at georgia tech i won't start to panic.

    use established repos, duh

  18. Re:Neither by HappySmileMan · · Score: 2, Funny

    I'm almost certain I posted that as AC...

  19. Not too worried by gweihir · · Score: 1

    Yes, the vulerabilities are there. Not surprising to anybody that ever did a Debian mirror, for example. DNS spoofing already is enogh, not even a man-in-the-middle needed. Still, these are high-effort attacks. And with the IP addresses of the update servers used (instead of their names), MiM becomes neecessary. From my observations, MiM attacks oten need to be done in close physical proximity of the attacked machine. If somebody manages to get there, they can direcly manipulate my servers, with me possibly not even noticeing. The effort for that is hogh enough that I do not care, since the stuff on the servers is not worth enough to justify the attack cost by a fair margin.

    So, no, I have 2 v-servers and one remote and one local dedicated server, all with Debian and automated updates and I sleep fine.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  20. and they said by Anonymous Coward · · Score: 0

    teen pregnancy was on the decline.

  21. The maintainers are the real threat by Anonymous Coward · · Score: 0

    Who cares about the managers as a whole. As long as you have clueless people maintaining the packages in question it doesn't really matter what manager you use. Does anyone recall the Debian openssl debacle? I still wonder what happens with a cluebie like that..

    And if I may vent some personal annoyance.. People kept whining about GoDaddy not too long ago (they ripped 'm off, some GoDaddy dude bid on domains which were already ignored and vacant and they abused some peoples hamster) but why aren't we reading how GoDaddy now acknowledges their role as a true SSL Certificate Authority and as such allows people who have been using "suspected" openssl versions to re-issue their certificates?

    And to get back on topic; that gesture too is the result of a single package maintainer (not manager) screwing up. So; beware the maintainers, not the managers as a whole.

  22. The more things change.... by domatic · · Score: 1

    ....the more they stay the same. I was a Mandrake user 5 years ago. Compared to everything else around, it was the slickest out of the box. But the the Drak* tools were always flaky, as were the update tools, and I could never find a mirror that was worth a damn even if the package manager was working well that day. Hell, it made Windows ME look like a paragon of polish and stability.

    Going to Debian after that was like a breath of fresh air. Sure it wasn't packed full of wizards and GUI config tools but once configured into a working configuration it STAYED working. I've been running either Debian or a Debian derivative since. I've thought that maybe by now Mandr(ake|iva) would have improved. It looks like they're still up to their old ways of surface polish atop a creaky collection of dirty hacks.

  23. Comment removed by account_deleted · · Score: 5, Funny

    Comment removed based on user account deletion

  24. I definitely worry most about... by Anonymous Coward · · Score: 0

    ...attacks on my package.

  25. Re:Neither by neokushan · · Score: 4, Funny

    I'm almost certain you didn't.

    --
    +1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
  26. Windows Update not vulnerable? by schwaang · · Score: 2, Insightful

    TFA doesn't address Windows much. In the FAQ they say something like "since the vendor controls the repos for Windows and OSX, they are less vulnerable".

    True, I can't set up a bogus mirror for Windows -- except in a corporate environment, where I believe MS has some facility to allow a local cache of patches to reduce external bandwidth usage.

    But the authors keep talking about man-in-the-middle attacks on FOSS repos. Couldn't someone just as easily do that for Windows? And then use it to only offer outdated (known-vulnerable) versions of patches?

    1. Re:Windows Update not vulnerable? by darkpixel2k · · Score: 1

      True, I can't set up a bogus mirror for Windows

      Windows Software Update Services 3.0
      Hell--I can restrict or allow any updates on the corporate network that I want!
      (...as long as Microsoft gives me permission.)

      --
      There's no place like ::1 (I've completed my transition to IPv6)
    2. Re:Windows Update not vulnerable? by Anonymous Coward · · Score: 0

      To change the setting that controls where Windows looks for its updates, you need to have root/Administrator permissions. If you have that, then what else could you want?

    3. Re:Windows Update not vulnerable? by totally+bogus+dude · · Score: 1

      Or you need to be able to hijack the target's DNS.

      Or you need to be able to MITM in the update servers... the fact they use Akamai helps here (as it means you'd have to MITM a hell of a lot of servers), but also perhaps hinders (there's a lot more different networks, and surely some are poorly secured).

    4. Re:Windows Update not vulnerable? by SEMW · · Score: 1

      But the authors keep talking about man-in-the-middle attacks on FOSS repos. Couldn't someone just as easily do that for Windows?

      Using https instead of http or ftp prevents man-in-the-middle attacks. Windows update uses https. The vast majority of FOSS mirrors use http or ftp, not https, due to the expense of key signing.

      --
      What's purple and commutes? An Abelian grape.
    5. Re:Windows Update not vulnerable? by f(x)+is+x · · Score: 1

      There is an excellent research paper on the vulnerabilities in software updaters available at: http://www.cs.duke.edu/usenix/06hotsec/tech/bellissimo.html

  27. Re:Neither by pipatron · · Score: 2, Funny

    I'm fairly certain you didn't.

    --
    c++; /* this makes c bigger but returns the old value */
  28. Slackware by FPCat · · Score: 5, Funny

    Good thing I'm running Slackware!

    1. Re:Slackware by Anonymous Coward · · Score: 0

      Good thing I'm running Slackware!

      this is called masochism :)

  29. As a maintainer of a repository.. by Junta · · Score: 1

    The metadata is signed as well as all the packages. This mitigates the situation, i.e. a malicious mirror cannot host arbitrary combination of packages to suit their needs, they must mirror some permutation that I had at one point approved all together.

    --
    XML is like violence. If it doesn't solve the problem, use more.
    1. Re:As a maintainer of a repository.. by XanC · · Score: 2, Informative

      But the malicious mirror also has a steady stream of data coming in, which includes IP addresses of people running vulnerable services, and which services those are. Before the patch is finished installing, the user is rooted.

  30. The actual vulnerability by jmorris42 · · Score: 5, Interesting

    > The article actually discusses attacks that can be made by a malicious mirror...

    Yes a mirror can keep you from getting a security update. But if you don't contact that mirror every day you will eventually get a good mirror and update, and since none of the package managers will downgrade automatically this is a mostly theoretical exploit.

    Yes if a really BIG bug hits somebody could keep some subset of machines from updating, and since they would also KNOW the ip of each vulnerable host it could be very bad. That is the part that worries me, hell, they could even deliver the update from their perfectly up to date repo of signed packages, signed metadata AND perfectly in sync with the distro prime mirror.... and root your ass while the update is in flight. This gets to the real security vuln involved, telling an untrusted entity exactly which version (sorta) of a package you are running.

    --
    Democrat delenda est
    1. Re:The actual vulnerability by nabsltd · · Score: 2, Insightful

      Yes a mirror can keep you from getting a security update. But if you don't contact that mirror every day you will eventually get a good mirror and update, and since none of the package managers will downgrade automatically this is a mostly theoretical exploit.

      Also, the article says "the malicious mirror can provide the client a signed list of packages from the year before", but I don't see how that can cause a problem, either, if I have updated a package within that year.

      If I have foo-3.1.0 installed and the malicious mirror offers me foo-2.8.0, then I won't download it, because it doesn't provide newer versions of anything.

      The big key in all of this is signed packages (no pun intended), since that keeps the bad guys from modifying the package to claim to be foo-3.2.0 but really contain trojan-1.0.0. As long as the packages are signed, I can't see anything that a malicious mirror could do other than delaying you getting updates for a few days, which isn't good, but its really no different from waiting a day or two to update your production system until you have time to make sure the updates don't break anything.

    2. Re:The actual vulnerability by justin+samuel · · Score: 2, Interesting

      To give one example of why it can be bad for a package manager to accept older metadata when it has previously seen more recent (valid/signed) metadata: If you are installing a new package (rather than updating a package) and the old package you are served doesn't conflict with your currently installed packages, you will be installing a package that may have known security vulnerabilities. Additionally, the attacker who gave you that package may know your IP address now.

      In this case it does not matter that the packages are signed. And if the metadata isn't signed, the above still applies but is easier to exploit.

    3. Re:The actual vulnerability by Zero__Kelvin · · Score: 2, Insightful

      "If I have foo-3.1.0 installed and the malicious mirror offers me foo-2.8.0, then I won't download it, because it doesn't provide newer versions of anything."

      No. Your missing how it is done. The cracker mirror takes foo-2.8.0 and renames it foo-3.1.1

      Since the file metadata (e.g. filename) isn't used in the signature calculation it still verifies as a valid signed package, and the system installs foo-2.8.0 because it believes it is foo-3.1.1.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    4. Re:The actual vulnerability by nabsltd · · Score: 4, Informative

      There is considerably more metadata than the filename in all package systems.

      Although I generally only use RPM, I have seen enough of others to know that each package has information inside it that says things like "supplies foo-2.8.0.so". For example:
      $ rpm -q --provides openssh
      config(openssh) = 4.3p2-24.el5
      openssh = 4.3p2-24.el5

      This sort of metadata is part of the headers that are downloaded by the package manager to determine whether the system needs the package, and what other packages might be needed to fulfill dependencies. So, the system probably won't even download the file just because it was renamed. But, even if it does download it, when it tries to install it, you would get an error because a newer version of the capability (RPM term) named "openssh" is already installed.

      You could always force the install, but no package manager does this sort of downgrade as an out of the box default

    5. Re:The actual vulnerability by Anonymous Coward · · Score: 0

      I am a pretty new convert to the open source/linux group so I may be talking out my ass here, but couldn't you prevent (or at least hinder) this attack by not using the same mirror? Or even better having the package manager deliberately avoid using the same mirror 2x in a row?

    6. Re:The actual vulnerability by Zero__Kelvin · · Score: 1

      That is a great point I hadn't considered. This *is* a non-issue, and there is no vulnerability. I should have stuck with my original post on the matter!

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    7. Re:The actual vulnerability by TheRaven64 · · Score: 2, Informative

      This is one of the advantages of something like the BSD ports system. You download the entire ports tree, which contains recipes for building every package. When you get the source, you typically get it from the upstream host (e.g. sourceforge), but they have no way of knowing whether you are running that program, installing it for the first time, or simply grabbing the source to build packages for deploying on other machines.

      --
      I am TheRaven on Soylent News
  31. results in short: what manager(s) are the best? by wandm · · Score: 1

    FTA:

    Q: I'm worried about security and have a choice of package managers. What package manager should I use?

    A: It depends on your situation. If you are using a distribution like RedHat Enterprise Linux or SUSE Linux Enterprise that support HTTPS and do not have mirrors run by outside organizations, then you are most likely safe from the attacks described here.

    If you use a distribution that does not have these features, we strongly recommend using a package manager that signs the repository metadata and supports HTTPS. Of the package managers we examined, APT-RPM, Stork, and YaST have this support by default and APT has an optional package to support HTTPS.

  32. n00by question by neokushan · · Score: 1

    Forgive me for my lack of *nix prowess, but I've noticed that Package managers seem to be a predominantly Linux thing and unfortunately, I've not had the chance to get properly acquainted with the OS yet (I know, wtf am I doing here?). I've never encountered one in Windows, unless you count the handy package manager in DevC++.

    Are there any good windows alternatives, or is it simply not needed thanks to windows having many a dedicated installation packaging program?
    I wouldn't mind having one so I could get the latest and greatest Open Source/Free software that I may or may not have heard of, would be a great help for when I want to switch over to Open Source only apps.
    My thinking is if there's an easy way to find/install good OSS, then I can get used to that first and thus my eventual transition to an Open Source OS will be much easier as I will only have to figure out about 200 things to do differently instead of 300.

    --
    +1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
    1. Re:n00by question by neokushan · · Score: 1

      Oh and in case anyone complains, I already had a google around and could only find one project that hadn't been updated in about 2 years.

      --
      +1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
    2. Re:n00by question by Sir_Lewk · · Score: 1

      I know it may sound harsh, but I sincerely suggest just making the jump and going with a dual boot install. Choose a distro that's GUI intensive and let Gnome or KDE cushion you while you get used to the rest of the system.

      --
      "linux is just DOS with a UNIX like syntax" -- Galactic Dominator (944134)
    3. Re:n00by question by neokushan · · Score: 1

      I'd love to, but unfortunately I don't really have the time to properly sit down and get used to a new OS.
      I have far too many things to be doing and can only really migrate piece by piece.
      At least if I can get used to working with Open Source equivalents to all of the applications I need to do whatever work I have, then eventually changing the OS isn't going to affect that too much. That's the theory, anyway.
      I've tried just "switching" like that many times before and all it's done is just frustrate me as Linux is just so different from what I'm used to. Not knowing how to do even the simplest of tasks, such as mounting a Hard Drive (something I could do on windows with my eyes closed), just makes me feel stupid and completely puts me off.

      --
      +1 IDisagreeSoHeMustBeATrollOrAnAstroturferOrAShill
    4. Re:n00by question by darkpixel2k · · Score: 2, Informative

      Are there any good windows alternatives, or is it simply not needed thanks to windows having many a dedicated installation packaging program?

      There really isn't an equivalent in Windows. I would imagine that it's because Linux is very modular, and almost all the software is free. Windows developers charge money and want you using their installer which (in some cases) requires license keys, etc...

      It would be cool though if someone build a front-end for the Windows Installer (msiexec) that would let you 1-click download and install some of the open-source apps out there that are packaged as MSIs. (Think OpenOffice, Java, etc...)

      --
      There's no place like ::1 (I've completed my transition to IPv6)
    5. Re:n00by question by darkpixel2k · · Score: 1

      There really isn't an equivalent in Windows.

      Bad form to reply to my own comment, but I just realized the equivalent is the "Add/Remove Windows Components" section of the "Add/Remove Programs" control panel.

      It lets you install some of the modular components in windows--the down side is that it usually requires a CD instead of downloading the 'packages' from the 'net.

      --
      There's no place like ::1 (I've completed my transition to IPv6)
    6. Re:n00by question by drinkypoo · · Score: 1

      Cygwin will let you do it for the subset of stuff included in cygwin, some of which is pretty cool even on Windows. I used to use it when I used XP on my system, in order to get a Unix-like environment (including an OpenGL-accelerated X server.)

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    7. Re:n00by question by Anonymous Coward · · Score: 0

      Here you go. You're welcome.

    8. Re:n00by question by Hatta · · Score: 1

      Cygwin comes with a nice gui setup utility that allows you to install all sorts of open source unix programs that work on windows through their compatibility layer (cygwin.dll). It's not quite the same thing, the unix programs aren't well integrated into the OS, but it's worth looking at.

      I'd really recommend just trying out the slick desktop distro of your choice though.

      --
      Give me Classic Slashdot or give me death!
    9. Re:n00by question by Lennie · · Score: 1

      I guess you mean Wubi in this case ? ;-)

      --
      New things are always on the horizon
  33. Re:So, Linux is not more secure? by sammyF70 · · Score: 5, Insightful

    The short answer : yes

    The longer answer : every OS is vulnerable one way or another. The difference lies mostly in the response and the response time by the vendors.

    Linux : take the debian ssh disaster a few month ago as example. I read about it at Google News, head over here to check how the linux bashing was coming along, and while I was reading, the "update available" icon appeared. A few minutes later and the vulnerability was no more.
    Admitedly, it took a *VERY* long time to find out about the problem in the first place, but the response time from then on was very short, and the update contained concise information about the whole mess.
    Today's vulnerability will probably take a bit longer to be fixed, as it requires some primordial changes in the way packet manager work to be fixed. But I'm rather sure people are already looking for a solution (you know .. people who actually CAN fix this kind of problems, not your average /. reader)

    Apple Mac : when Apple admits that there is a vulnerability in their products, they take their dear sweet time to fix it. As a matter of fact, Apple just released a security fix for Apple TV, covering vulnerabilities dating back to, at least, January 2008 (at which time it was fixed for OSX, but NOT for Apple TV). I can't comment on how detailed the security fixes are, as I don't own apple products

    Microsoft : the Zero Day initiative still lists 12 issues concerning Apple product, classified as "high severity", but the oldest item is a Microsoft vulnerability dating from September 2006 (more or less quoted verbatim from the iWire article I'll link to a bit later). Microsoft updates are particularly obscure in their descriptions, and, if I remember correctly, they are sometimes even applied without asking the user first, and have a bad habbit of breaking other stuff.

    So, is Linux 100% secure? No, and it will never be. But at least the devs react in a timely manner, and they don't just install something without telling you what it is or that they are patching at all. Therefore it is better secured than Apple and Microsoft products whose vulnerabilities are often left open, for the sake of obscurity I suppose.
    "Superiority" is a highly subjective term, so I won't even start to thread on this subject. It is for me, but your mileage might vary

    Apple TV fix article

    Zero Day Initiative upcoming advisories

    --
    "DRM is like the Ford Pinto: it's a smooth ride, right up the point at which it explodes and ruins your day."-C.Doctorow
  34. debtorrent sounds neat by rubberglove · · Score: 3, Interesting

    from the cert overview:

    Another potential solution to this problem is P2P technology. If widely used, programs like DebTorrent may allow official repositories to distribute metadata and tracker information while decreasing bandwidth costs.

    I wonder why Ubuntu doesn't make this a standard option. Is port forwarding too complicated? From what I understand, if the package is not available via bittorrent, DebTorrent degrades to using http.

    1. Re:debtorrent sounds neat by drinkypoo · · Score: 1

      if the package is not available via bittorrent, DebTorrent degrades to using http.

      I hope it's smart enough to degrade if it's just not practical to download via bittorrent (available, but just not coming, for example.)

      I just want to know why the functionality isn't provided by default. I'm not convinced it should also be active by default, although that WOULD dramatically increase its value.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    2. Re:debtorrent sounds neat by f(x)+is+x · · Score: 1

      Another potential solution to this problem is P2P technology. If widely used, programs like DebTorrent may allow official repositories to distribute metadata and tracker information while decreasing bandwidth costs.

      Using P2P has other issues. Our webpage doesn't talk about this because we don't have a clever solution in place yet, but as wily slashdotters have mentioned there is also a disclosure problem. When are updating a package, you disclose to an untrusted entity (a mirror) that you are likely to have an outdated package installed. Using P2P exasperates this effect because you are now disclosing this to a larger number of people. As such, I'm not sure it's a security win to use DebTorrent.

      Personally, I think that openSUSE provides a good solution in this space by having signed repository metadata downloaded from their main repository and packages downloaded from mirrors. However, it would be nice if they would add HTTPS support to protect against man-in-the-middle attackers when retrieving the repository metadata.

      Justin Cappos

  35. It's a true risk. by drolli · · Score: 2, Insightful

    It is really risky not to have a revokation mechanism for packages, but definig this by availability of a new package somewhere. The only solution would be to have servers, which contain a list of revoked packages. If connecting to these list fails, the update should stop.

  36. Simple Solution by Anonymous Coward · · Score: 0

    Disclaimer: Mirrors/Package Download Managers are the risk, not the Package Manager.

    APT is not a package Manager, it is a Package Manager Manager. RPM/Debs are the package Managers.

    That said, simple solution:

    1 - make the latest list available and mirrored only in trust places like DNS Root Servers.
    2 - sign, md5, sha1 sum it.
    3 - make the hash of the list available on every package.
    4 - If you (or apt) ever gets a new hash, it will know that a new list is out and has to be checked.
    5 - Older packages will has older hashes, but it is ok as the new list will say that package still the latest version.

  37. or just not update so much by Anonymous Coward · · Score: 0

    Run only from a known good iso image burned to a read only disk that you got direct from the project pages ftp server and be done with it, and stop worrying about day to day minuscule and near useless point.xyz updates. Once or twice a year, get a new one. Make your surfing machine be just an appliance, fast cpu, ton of ram, turn it off and on when you need it. See, it isn't that hard. Leave all your other work stuff for a non internet connected machine or machines. Airgap the important stuff, run from disk for casual surfing. If you need to move some stuff over, sneakernet it, keep that airgap intact. If you are doing this professionally for your business and need to stay current and it has to be hard drive installed all across your LAN, just get it direct one time and serve it out to your users, skip all the mirrors. Heck, pay the dudes their dollars (they deserve it really and you can deduct it anyway as a biz expense) and get them to send you the disks direct, eliminate most MIM vectors that way (if joe badguys have compromised the *post office*, for some reason you are a major target, so little hacked software packages are the least of your worries right now).

  38. Not an issue for Debian: security.debian.org by Anonymous Coward · · Score: 0

    Debian security updates do not come from mirrors. They all come from security.debian.org directly.

  39. Re:Neither by __NR_kill · · Score: 2, Funny

    Neither keep me up at night, I have a girlfriend and things to get done.

    Perhaps you should consider changing your girlfriend, mine can always keep me up.

    (for those without sense of humour up is used as erected)

  40. Re:Neither by MisterSchmoo · · Score: 4, Funny

    Neither keep me up at night, I have a girlfriend and things to get done.

    Perhaps you should consider changing your girlfriend, mine can always keep me up.

    (for those without sense of humour up is used as erected)

    Do you often find yourself having to explain your erections?

  41. Package are already *signed* by DrYak · · Score: 5, Insightful

    No need for anything as complicated as verifying packages accross several source :

    most modern package managers use key-signing on package.
    You can't setup a bogus repository and start serving malware to unaware users - those packages will fail the key check.

    For that to work, the crackers would also have to find a way to inject their own keys into the ISO of the distribution, and they'll have to find a way doing it that still pass the checksum of the peer-2-peer client with which the users downloaded the ISO.
    That might be possible with older p2p protocols relying on older weak hash, like eDonkey2k whose MD4 has known collisions, or even older protocols lacking checksums. (Some companies working for the media corporation back then used such possibility to pose as peer on the network and poisoning it by injecting bogus packets).
    But distribution currently rely on bittorrent which use SHA-1 hash and it's (currently) much harder to find a way to inject tampered data and have the resulting file still pass the checks.

    Another solution would be to trick the users into accepting a new set of keys to get onto the fake repository. For this, this repository will have to pose not as a mirror (as proposed in the TFA) but as an additional 3rd party repository hold functionalities not available in the original source (this is something that would benefit from the harsh imaginary-properties laws as most distro can't provide packages processing some media, and users have to rely on 3rd party repositories for this).

    Besides, the summary is misleading. They didn't actually setup a bogus mirror that served maliciously crafted files, or otherwise injected malware (that would be impossible given the signatures).
    They simply setup a mirror, that wasn't up to date on purpose, potentially exposing computer to exploit due to only older versions of software being updated.

    As actual legit mirror may lag behind the release, it is nevertheless preferable to always add the original repositories to the list of source : thus get the files from the mirror if available there, or straight from the original website if not replicated everywhere.

    This work around is even useful when there's no malicious intent.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Package are already *signed* by Zero__Kelvin · · Score: 5, Interesting
      Actually, what they are saying is that they can set up a mirror with older packages that have known flaws in them and in effect downgrade you from having the latest security fixes to having one with vulnerabilities.

      The packages are still signed with an a valid key. They are just older packages rather than the latest ones.

      I have to give more thought to think if this will work, but I doubt that this has not occured to anyone else. I certainly thought of it before. Most likely the package managers have a way to keep this from happening already.

      Their entire Proof of Concept seems to be:
      1. We asked to be added as a mirror
      2. We succeeded without the distributions doing a cavity search
      3. A11 y0ur L1nux are b3l0ng t0 us!

      I wouldn't panick until I see a CERT advisory, or as someone else pointed out, at least one real world incedent.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    2. Re:Package are already *signed* by justin+samuel · · Score: 4, Interesting

      Just to be very clear about this one point because it is sensitive: the public mirrors we setup and had listed as official repositories were kept up-to-date and we only served current metadata and packages. We served nothing that was out-of-date (beyond normal mirror update lagtime between rsyncs with the upstream mirrors) and we served nothing that had been modified.

      All tests we performed related to what a malicious mirror could do (e.g. serving out-of-date metadata, serving modified metadata in the case of package managers that don't sign metadata, etc.) were performed using separate mirrors and clients of our own. Nothing we did with our mirrors put users at risk.

    3. Re:Package are already *signed* by Anonymous Coward · · Score: 0

      So in other words, we have an article header and title that looks like we actually compromised you all, and all your bases belong to us, yet please don't sue us?
      Sorry BZZT, if we can't sue you, you're not doing serious security research.

      DMCA sez we can sue anyone doing security research for zillions of dollars and winz, where's my money?
      What do you mean, it only works if I'm already a billion dollar company like M1cro$soft?

    4. Re:Package are already *signed* by houghi · · Score: 1

      Their entire Proof of Concept seems to be:

            1. We asked to be added as a mirror
            2. We succeeded without the distributions doing a cavity search
            3. A11 y0ur L1nux are b3l0ng t0 us!

      openSUSE does the following. You are asked to be added as a mirror and they add you. However YaST (or better zypper) will point to http://download.opensuse.org/distribution/11.0/repo/oss/ by default which will then point you to the mirror.
      Then they also look if you have the latest version available or not. If not, they will not point to you untill you do.
      The reason is that this way they can spread the traffic among the mirrors, so that not everybody is using the same mirror, making the idea of mirrors obsolete. They also test if the mirror is up.

      So there is already a big barrier to overcome. Obviously you could still make your own repository like Packman or http://download.nvidia.com/opensuse/11.0 and then see that people point there. This will need some social enginering and can be done, just as you can convice people to type in a code for a ziptfile, unpack it and then run the file inside as admin.

      Even easier would be to ask them to do `sudo rpm -Uvh http://example.com/hAxOr.rpm`

      --
      Don't fight for your country, if your country does not fight for you.
    5. Re:Package are already *signed* by Anonymous Coward · · Score: 0

      That and you can set up your own local mirror which synchronizes with a known host and your Linux systems update against that.

    6. Re:Package are already *signed* by Anonymous Coward · · Score: 0

      > I wouldn't panick until I see a CERT advisory

      Not quite an advisory but: http://www.cert.org/blogs/vuls/2008/07/using_package_managers.html

      The research also describes other attacks than replay attacks. All of the attacks we discuss on our website are a problem even if your distribution signs everything that your package manager supports and the crypto is perfect.

      (Disclosure: I'm one of the authors)

    7. Re:Package are already *signed* by hesaigo999ca · · Score: 1

      FYI SHA-1 has been broken, so it would be possible to intercept and inject on this one as well.

  42. This could be an issue... by Ortega-Starfire · · Score: 1

    Except that it is solved by MD5 checksums as noted by several people. A sophisticated attack of this nature would require being added as a mirror, accepted by your target as being genuine, and then taking on the provider of the checksum to provide a false one.

    Of course, someone might take the time to develop a package with the same checksum as the actual file I suppose, but it has been so long since I've read up on encryption that I don't know how feasable this is. Anyone else? I'm fairly certain that by the time you get the package developed now, a new version will be released, killing all that time and effort.

    Rather than going through all that effort, I'd just take an assault team to the datacenter and take what I need by physical means. A few chainsaws, some C4 (or close equivalent thereof courtesy of roguesci&company) , and a few Walther PPKs handed out so we can feel like James Bond while going in, and call it good.

    If someone is truly determined to take on your company and steal data, they will. The trick is to mitigate all the easy to use venues of attack. As you start to protect against more and more esoteric attacks that require the subversion of a good amount of external access sites, the usability of your systems will decrease.

    --
    ---- Liquid was a patriot ----
    1. Re:This could be an issue... by drinkypoo · · Score: 1

      How old are you? If you have passed teenagerhood, you read too many spy thriller novels or have played too much Metal Gear.

      Anyway you are way lost, because they DID get added as a mirror, and with fake contact info. And you don't need to fake a checksum, you just distribute an exploitable package as if it were a current one and root the victims immediately.

      It's true that there is a real risk of men with guns coming to steal your technology, it has happened to many companies. But this sort of attack seems most useful for building Linux botnets. The two groups of users most likely to provide powerful botnet members are gamers and users of (comparatively) esoteric operating systems; the latter is the group most likely to provide backdoor access to interesting systems. They're also traditionally the hardest to hack these days.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    2. Re:This could be an issue... by Ortega-Starfire · · Score: 1

      You fail at MD5 checksums. You download the file from the mirror, and use the checksum from the main website.

      Also, as much fun as MGS and spy thriller novels and movies are, the thoughts I posted on the datacenter break-in plan was based on actual events.

      --
      ---- Liquid was a patriot ----
  43. No regressions by DrYak · · Score: 1

    Two minor points to object :

    - Current package managers don't downgrade automatically. (Yast will show the version numbers in red, but keep the highest version anyway).

    -People have at least 2 source for packages :
    1. a mirror of the distribution (containing all the packages)
    2. a "security" update website, which generally is also able to use delta-packages.
    some even add :
    3. the original repository, in case the mirror is lagging and doesn't have the latest version
    Under those circumstances, the packages manager only considers the latest version between the one already installed and the one on the 2 or 3 mentioned repositories. With a slight preference for the delta package on the security site, to save some space.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  44. Re:Neither by MisterSchmoo · · Score: 0, Flamebait

    Like your mum?

  45. Option 3 by Bob9113 · · Score: 1

    Furthermore, the researchers created a fictitious administrator and company name and were able to lease a server and get it listed as an official mirror for all the distributions they tried (Ubuntu, Debian, Fedora, CentOS, and OpenSUSE). What keeps you up at night, the thought of attacks on your package manager or previously discussed and patched vulnerability in DNS?

    The man-in-the-middle attack is valid enough - particularly with ISPs now regularly committing that kind of attack (under the guise of traffic shaping and ad injection attacks) and not being cruelly and unusually punished.

    As for the fictitious company? I'm going to go with option 3: Thank you, Debian, for not wasting money on something I can do myself.

    It is not Debian's job to vet the sources.list. For me, it's my job. I use U.C. Berkeley's repositories, because I personally trust UCB. Some people hire systems administrators to do the vetting. Others buy commercial distros like RHEL. Lots of freedom of choice - that is a feature, not a bug.

    It is the beautiful world of FLOSS - where self-reliance, personal accountability, and Darwinian smackdowns are available for free. The water is absolutely sublime - but be careful not to attempt to breath while your head is under water, as you will drown (or give it a try if you like - you are free to do so if you wish). If you are not sure that you know how to avoid breathing while under water, you may wish to hire a personal lifeguard, or join a fitness club that provides communal lifeguards. You may even want to write your city council person and ask them to provide a public distribution, akin to a public swimming pool. The opportunities are endless. This is Free. This is beautiful.

    1. Re:Option 3 by kashani · · Score: 1

      I hired an intern two years ago at a startup. He had passable skills when he started and after a few months he was a decent jr admin. I wrote him a recommendation letter and he got a job doing admin work when he went back to Berkley. From the stories he told me Berkley might be the last place you'd want to pull packages from. Our crazy startup was far more organized, documented, and well run then the nonsense that passes for administration at Berkley.

      I can't say how true his stories were, but just because your packages are coming from a large institution it doesn't mean that anyone with half a brain is actually running things.

      kashani

      --
      - Why is the ninja... so deadly?
    2. Re:Option 3 by moderatorrater · · Score: 1

      The water is absolutely sublime - but be careful not to attempt to breath while your head is under water, as you will drown (or give it a try if you like - you are free to do so if you wish).

      Just as long as you return the changed water back to the pool, that is.

  46. major pkgs were attacked yrs ago by Anonymous Coward · · Score: 0

    not a new topic
    active dev pkg are watching by active dev guys
    such code pollution can be easily spotted

    gentoo and kernel was attacked like that way yrs ago

  47. Re:Neither by mrbluze · · Score: 3, Funny

    I'm moderately certain you didn't.

    --
    Do it yourself, because no one else will do it yourself. [beta blockade 10-17 Feb]
  48. Well, sign the catalog then. by Anonymous Coward · · Score: 1, Interesting

    Hmm. How to defeat that. Easy enough.

    Firstly, the catalog would have to be signed. (The list of the current versions of the packages, I guess it's the metadata rather than the data.) And it would have to have a datestamp in it. And the catalogue would have a copy (or the copy of) the signature that would otherwise be attached to the packages themselves.

    Then it's easy for a client machine to verify the catalog is correct (is correctly signed by a trusted key). Validate the datestamp in it and alert if the catalog is old (say, older than three months ago). When you download a package, it takes the signature from the trusted catalog and uses that signature to verify the package, proving the package file is a currently supported version.

    (If the package download doesn't match the signature then it will fail the signature check like any other modification. Technically, checking this is a fullly signed singature isn't required, merely that it matches a cryptographically secure hash in the catalog but I imagine it's safer and easer to just verify the signature on the package in its own right. Packages may carry the signature themselves which would allow stand alone installations of the package - but of course, no guarentee that it is the latest version.)

    Yes, this means monthly updates to the catalog, but the only parts changing (aside from actual updates) are the catalog datestamp and catalog signature, which I imagine would be reasonably small if something like rsync copied the data.

    And, yes, this does mean a three month window for this attack. One way around that is for the 'current datestamp' to be available on a trusted central site (signed and/or SSL protected) and the package manager refuse to load a catalog until it has the catalog version that matches that current datestamp. This would probably only be a couple of hundred bytes at most. Maybe a weekly check would be sufficient.

    1. Re:Well, sign the catalog then. by Zero__Kelvin · · Score: 4, Interesting

      Actually, it is much easier than that. Simply include the metadata for each package in the signature calculation. Every package already has an increasing number scheme. Once this is done, the filenames cannot be changed, and the package manager simply must not allow numbers to go down instead of up.

      I just verified with my distribution, and the package metadata is not used when calculating the signature, so this is a valid vulnerability.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    2. Re:Well, sign the catalog then. by Zero__Kelvin · · Score: 4, Informative

      I guess keeping the "Interesting" mods is OK so I won't request that they be removed (though I would understand if someone throws a few "overrateds" at me), however I misspoke. Someone else pointed out that the package files, such as yada-yada-2.6.7.myarch.rpm have the important metadata in them already, it is signed, and changing the filename doesn't change the dependency information therin, so there is no vulnerability, and this is much ado about nothing. I stand corrected, and should have stayed with my original post on the matter.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    3. Re:Well, sign the catalog then. by Anonymous Coward · · Score: 0

      There are reasons to downgrade, especially for enterprises...
      RPM is good at downgrading, whereas APT s not.

    4. Re:Well, sign the catalog then. by Anonymous Coward · · Score: 0

      What distribution do you use? At least debian is not vulnerable to that.

    5. Re:Well, sign the catalog then. by skeeto · · Score: 1

      In that case downgrading is intentional, and the user will know to be aware of old vulnerabilities in the downgraded package. The potential package manager vulnerability we are worried about would be the case where an old package is marked as new, and a user "upgrading" a package would be re-introducing old vulnerabilities without knowing.

      If metadata is included when signing the package (which is the case for the parent's system), this cannot be done, short of discovering an algorithm a few orders of magnitude faster than the general number field sieve (this is very unlikely).

  49. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  50. It's just a shill by BhaKi · · Score: 0, Troll

    You brain-dead slashdot users, are you still unable to understand? Timothy is just a Microsoft shill.

    --
    The largest prime factor of my UID is 263267.
    1. Re:It's just a shill by Anonymous Coward · · Score: 0

      Uh oh, looks like another Twitter sockpuppet?!?

  51. Re:Neither by gustolove · · Score: 2, Funny

    I'm somewhat certain you didn't.

  52. Re:Neither by beav007 · · Score: 1
  53. Gentoo & package-signing by Robbat2 · · Score: 2, Informative

    For anybody interested on this in Gentoo, I have updated my GLEPs about signing the portage tree to include a Gentoo-specific solution for this, by distributing a copy of the top-level signatures by a trusted system:
    http://robbat2.livejournal.com/226512.html

    --
    ICQ# : 30269588
    "I used to be an idealist, but I got mugged by reality."
    1. Re:Gentoo & package-signing by Ant+P. · · Score: 1

      Serious question: has anyone ever considered using git for the portage tree? Most of that stuff is part of its design.

    2. Re:Gentoo & package-signing by Robbat2 · · Score: 1

      Yeah, we had a Summer of Code project that did a full-scale review of it before. It's just gaining the traction needed now, and convincing folks that they don't need partial subtree checkouts really.

      --
      ICQ# : 30269588
      "I used to be an idealist, but I got mugged by reality."
  54. bad, but actually could be an advantage by radarsat1 · · Score: 1

    I would agree that it's too bad there could be vulnerabilities in the package manager of several systems.

    But on the other hand, it's pretty cool to think of the package manager as being a kind of bottleneck for attack vectors. In other words, though it may allow for some possible attacks, it's interesting to think that attacks could be concentrated there, and thus extinguished in one fell swoop --- once the package manager is "perfected" and all vulnerabilities taken care of, you could argue that the system as a whole is incredibly more secure for having discovered and destroyed the main source of them.

    This could be compared to systems without package management (*cough* we know who you are *cough*), where EVERY SINGLE installed program has its OWN attack vectors that come with it, since every program comes with its own installer, running native, unmanaged, and often priviledged code.

    Does that make any sense? It's late...

  55. I feel safe by Slashdot+Parent · · Score: 1

    I run Debian at home, and security.debian.org doesn't have any mirrors, so it would be a little hard to set up a fake mirror and refuse to distribute security updates (or distribute old versions of packages).

    I chose my mirror to be the university I attended, and I'm pretty sure they are not going to screw with the packages.

    --
    They don't grade fathers, but if your daughter's a stripper, you fucked up. --Chris Rock
  56. Re:Neither by drinkypoo · · Score: 1

    I'm entirely certain I just added you to my foes list. Thanks for outing yourself as an AC troll.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  57. AFAICT - Debian is not vulnerable by default by Sun · · Score: 4, Insightful

    As far as I can tell, Debian is not vulnerable in its default install mode.

    a - Debian will never automatically downgrade a package.
    b - Security problems (as opposed to mere changes) get published in the Debian security repository.
    c - The Debian installer automatically adds the debian security mirror to the end of your sources file.

    So, you can create a mirror, easily inject it into the list of official Debian mirrors, and freeze the packages offered on it. You can do all that easily. It won't help you. If you take the CERT example, of the vulnerable openssl package, the fix was pushed through the security repository, and that is added by default to all new Debian installations. The attack would fail.

    Furthermore, even if your mirror offered a security mirror as well, I, personally, always keep the Debian source as well, lower in the list. This way, if the local security mirror is up to date, I take stuff from there. If it's not, I take it from the Debian server. This means that even if you deviate from the default behavior, you can still be not vulnerable.

    Shachar

    1. Re:AFAICT - Debian is not vulnerable by default by f(x)+is+x · · Score: 1
      It depends on what you mean by vulnerable. We tried cover this in the FAQ, but I'll repost a synopsis here.

      1) Apt is certainly vulnerable to the endless data attack listed on the otherattacks page of the website. This crashes a box instead of allowing a malicious install. (The default of having a fairly large number of install sources increases the risk)

      2) HTTPS is not used when talking to the security repo, so a man-in-the-middle can perform replay attacks for packages hosted by the security repo.

      3) Mirror selection tools (netselect-apt, Software Sources, etc.) may remove the security repository from the list of used sources. Users should be made aware of this.

      In general, we think that apt's signatures on the repository metadata are the right thing to do (assuming replay / freezing protection is added).

      We also looked a little at the information we could find about Debian's developer update process (this is mentioned in the TR linked to from our website). We would be interested to hear your feedback if you'd like to email our project email address with any comments.

      Justin Cappos

  58. Been there, done that by Xtifr · · Score: 2, Interesting

    You joke, but I've actually built gcc with a C interpreter, and used that to build gcc binaries. We did it primarily as a stress-test of the interpreter, but it was nice see that the resulting gcc binaries were the same as those built with a compiled gcc.

    1. Re:Been there, done that by skeeto · · Score: 1

      It's still the "chicken or egg" problem: what compiled your C interpreter? :-P Or is it "interpreters all the way down!"

      Your self-compiled version of gcc may match the distribution-compiled one simply because they both have the same malicious insert. Of course, this is probably all less likely than, say, winning the lottery a dozen times in a row, so I wouldn't lose any sleep over it. Whoever could manage to pull it off would deserve to own your computer anyway: they earned it.

    2. Re:Been there, done that by Haeleth · · Score: 1

      It's still the "chicken or egg" problem: what compiled your C interpreter?

      Do, please, share your magical malicious insert that is actually capable of recognising when the compiler is being used to compile a C interpreter, and then crafting a new malicious insert -- tailor-made for that C interpreter that didn't even exist when the original hacker wrote his malicious insert -- that will add the original malicious insert into any compiler binaries that the C interpreter is used to build.

      Frankly, if anyone is capable of producing such a thing, they wouldn't bother trying to pwn computers, because they would be too busy being world-famous for developing the first true AI.

  59. That's why Debian signs repositories by Xtifr · · Score: 3, Insightful

    They're saying that signing the package isn't good enough

    That's why Debian doesn't sign packages; they sign repositories. (Actually, they sign a list of md5sums of all avaiable packages.) You can actually argue that signing a package is counterproductive--it means that an insecure package out in the wild will still have a valid signature.

    When you sign the repository, then an attacker has to freeze their whole repository if they want to keep the insecure package available. For Debian Unstable, people will get very suspicious if more than two days go by without any updates. And for Debian Stable, well, the security repository isn't mirrored, so owning an "official" mirror won't help you there. (The security repository could be vulnerable to a MITM attack, but then so could MS's system.)

    So, while the attack vector they mention for Debian seems superficially plausible, in practice, it's unlikely to be as effective as they suggest.

  60. An obvious solution? by neuromancer23 · · Score: 0

    The following seems self-evident to me:

    1. That mirrors were created to offload traffic.
    2. That a collision-free message digest is a guarantee against tampering, provided that the message digest itself has not been tampered with.
    3. That the size of a message digest is typically several million times smaller than the size of the package.
    4. That the obvious solution is for the vendor to mirror the packages but maintain control over message digest package signatures, thereby insuring that a mirror cannot tamper with a package. Then, the package manager can go to any mirror to select a package, but must return to the vendor to verify the integrity of the package.

    Anyway, there should probably be a trust network and/or independent certification for mirrors also. Hopefully the authors will post something useful, like a detailed explanation of the strengths and weakness of each of the package managers.

  61. Re:So, Linux is not more secure? by Anonymous Coward · · Score: 0

    Ah yes. The typical Linux answer. "LOLZZ its fixed now." , "I HAVE THE SOUCE I CAN FIX IT !!!111".

    Yeah. And what do corporate users do? Those who rely on redhat or other Enterprise Linux vendors to make sure the update is tested, not buggy, and most definitely works on *all* machines in their network?

    Rant:
    Another thing I've observed with Linux users on /. When a vulnerability is found in a component that ships with a majority of distros' they are quick to disown it. Mostly the first or second post is a shill for linux who is quick to point that out. "This is not in linux, this is a Vulnerability". And why do consumers care that its a software vulnerability? IMO It most definitely *is* a Linux vulnerability.

    Similarly Apple users are quick to point out that the bug is in Safari or in Quicktime or whatever. If it affects the OS and I *didnt* put the software there, Apple is to blame.

    Hah, and Windows.. I wont even go there.
    ----
    Considering the OS as the kernel and the shell, Could you make a list of all the vulnerabilities in all the OSs on the market and see who comes out first?

  62. Easy fix by V!NCENT · · Score: 1

    Here is my solution:

    When you go to the official distro website and click on the download link, ask the user for two, 6 digit numbers (xxx-xxx format to make it easy) over a secure https connection and tell the user to write it down because he/she will need it later. Now let the server automatically check the database to see if the first submitted 6 digit key matches with another first 6 digit keys another user has already submitted. If that is true; ask the user for another first 6 digit key and keep doing this until the key is unique. You'll understand later in this post why). Now hash those two 6 digit number and put it in a database and link the two keys (which is rather easy by doing 6+6 is one 12 digit key). In the meantime redirect the user to the actual download page.
    When the user runs into the installer upon booting the image, ask him/her for the two 6 digit keys. When inserted, hash the keys and write the hashed keys to the medium you're installing the distro on (6+6=12). Now ask the user to get rid of the two 6 digit number he/she has written on a piece of paper because he/she will not need it anymore.
    Now that the user and the official server have two identical 12 character (because it got hashed) keys each, pass the first 6 characters of the 12 character key to the server, over a secure connection, upon checking for updates for the first time (which can only be done by the user or the user's distro and not by any server. Let the distro ignore any incoming update notifications that it or the user didn't ask for him-/her-/itsef). The server will then check for a 12 character key that starts with these first 6 characters and send back the other 6 characters plus another 12 randomly generated characters (1). The distro will now check if the received first 6 characters matches the last 6 characters with it's own 12 character key. If it does; check for- and download updates and replace it's own 12 character key with the last 12 characters (1) that were send along with the first 6 characters. If the it doesn't; do nothing and tell the user what's up and direct him/her to a security section of the official distro website to see if the server is down and if not tell the user that a cracker tries to hack his system (repeat this sequence every time a check for updates is done, but do it only about max 3 times a day because a cracker can brute force the other 6 characters).

    (1): The order of the (6+12=) 18 characters in this package that the server sends should be determent by the previous 12 character key, so that if this package is intercepted, no one will know what characters belong to the 6- and 12 character keys. If you want to increase the level of security even further, then you can add meaningless characters to the package so that if a cracker intercepts the package, and he knows the current/old 6 key, he can't just filter out the characters of the 6 character key and brute force the order of the 12 remaining characters, so brute forcing will take longer. And another problem is that each time the user check for updates, the key changes, so it will be a pain in the ass to get the key combination right in one time, and it gets harder for the hacker to predict the next 12 character key because he can never know what the last one whas for certain.

    Ofcourse this method is not crack-proof, but aint security a bitch?

    --
    Here be signatures
  63. Re:So, Linux is not more secure? by Anonymous Coward · · Score: 0

    oops; The sentence is:

    "This is not in linux, this is a (insert popular software) Vulnerability". And why do consumers care that its a (insert popular software) vulnerability? IMO It most definitely *is* a Linux vulnerability.

    I used the less / greater than brackets; shows how much i comment here.. heh.

  64. Linux is already compromised anyway by Anonymous Coward · · Score: 0
    The security of the package manager is insignificant, since a growing number of Linux developers are working for the NSA and similar agencies throughout the world. Heck, given the interest of having a backdoor in the system and the number of parties interested in it, all developers might work for one or another of these parties.

    Of course, it's open source and so I can audit all the source code. That makes me feel really safe.

  65. This article fails by Anonymous Coward · · Score: 0

    Debian security updates ONLY come from a trusted server (security.debian.org). Security updates are not mirrored because of exactly the vulnerability pointed out in this article. Only the base distribution (as last updated) is mirrored. It is impossible to forge a "newer" version than those on the security.debian.org server, so you won't miss the patch.

    The only way you could possibly exploit this would be to wait until the fixes are rolled into a new release of debian and no longer on the trusted security update server. However, I bet there is some verification that your release is new enough too. Debian administration is not stupid.

    1. Re:This article fails by turbidostato · · Score: 1

      "Debian security updates ONLY come from a trusted server (security.debian.org)"

      So that means...
      1) If I owned a single server (security.debian.org) I own all updating machines in the whole world (good to know).
      2) If I DoS security.debian.org I'll win a window of opportunity to all debian servers in the whole world (good to know).
      3) Since security.debian.org serves through http and ftp it's opened to a MiM attack (good to know).

      "It is impossible to forge a "newer" version than those on the security.debian.org server, so you won't miss the patch."

      Who told you that? Say that openssh-server is currently at version 1:4.3p2-9etch2. Say I own apt.mymirror.com and that you use it on your sources.list file. Then, if I host an 1:4.3p2-9etch2 on my mirror you will update it next time you aptitude update && aptitude upgrade. There's nothing within apt structure that will restrict updates to just those from security.debian.org.

      Now, *if* security.debian.org provided a signed packages.list (both for the "base" distribution and security updates) through https *and* packages.list both provided current packages list *and* their checksums you would:
      a) Allow for security.debian.org to be securely mirrored (this way you'd avoid for the most part DoS, either deliberated or due to excess of "legal" traffic -I think to recall this already almost happened last year). Only packages.list would be forcibly downloaded from the security.debian.org master itself.
      b) Avoid MiM-based attacks
      c) A (currently to-be-developed) mechanism could be hooked to apt and related client-side utilities so for security update lists provided by a trusted source (https://security.debian.org by default) nothing but the package versions referred on that trusted packages.list would be accepted.

      Note that even this wouldn't cope with the fact that if security.debian.org is owned, then everything is lost. But then again, security.debian.org would service just one port and service (https) and only a short list of trusted people would need access to it, so it could be reasonabily easy to secure against all but the most determined attacks.

  66. Re:So, Linux is not more secure? by harry666t · · Score: 1

    But what is funny is the 25-years old bug in all of the BSDs, which has been spotted and hacked around (but not reported and fixed) by the SMB guys years ago :)

  67. Back to commercial support by bytesex · · Score: 1

    One of the safer ways to do solve this, is by having a pre-determined set of key-pairs between the OS-enduser and the distributor of updates. But I very much doubt that the distributors would do such a thing for free, as you would have to use an alternate channel (like email), or pre-printed media (certified CD's), and perhaps certification by a CA. A cheaper alternative would be to have a distribution come with a public key of the distributor, and establish a public key on your behalf during the installation. You would only have to trust the downloaded installation media then. Plus, the distributor would have to maintain a database of joined subscribers for updates.

    --
    Religion is what happens when nature strikes and groupthink goes wrong.
  68. Hasher by WetCat · · Score: 1

    A package for safe building is made in Russia,
    used in AltLinux/Sisyphus especially to prevent those security hacks. Named Hasher.
    Here is source code and FAQ of this project
    http://git.altlinux.org/people/ldv/packages/?p=hasher.git;a=blob;f=hasher/FAQ;hb=HEAD

  69. Slackware by ledow · · Score: 2, Insightful

    There seem to be a lot of distributions whose package managers rely on the keys/hashes to "secure" the packages, where the mirrors are providing those keys/hashes. Silly idea - always has been, what makes this news?

    What this article is basically saying is "anyone can be a mirror" (Yes, that's the point, without that you wouldn't be able to get a release/security update for ages after its release, or you could just take one website offline and stop all package updates worldwide - both are worse for security than the alternative) and "some package managers don't properly check the authenticity of a package from a mirror". The second is a problem that's easily fixed and shouldn't be present, granted. What idiot would accept a valid signed package without first checking that the root key it's signed with isn't current, valid and not revoked? This is like your web browser navigating to random SSL websites without first checking that the certificate chain is correct and valid and ends in a trusted root.

    1) Download key from "redhat.com" or wherever (DO NOT USE MIRRORS), or from the CD, on first install.
    2) Everytime you are asked to fetch a list of available packages, check the authenticity of that key against "redhat.com" directly (DO NOT USE MIRRORS), check the expiry date, check for revocation information, or allow the user to override (their fault), or check public keychains.
    3) If the key ever changes, ALERT THE USER before you do anything with it (don't try and get smart by signing a package with the old key that introduces the new key to the world, or automatically accepting a new key). Then the distribution should NEVER use that old key ever again, and maybe even resign all old packages with the new key.
    4) Use that key to verify all packages downloaded from any mirror against the GPG signature from that package (for ultra-security, get that from a second, random mirror, or the official website).

    There's a small window of opportunity for compromise on machines that install packages without checking first, or assume that because a key was once valid it always will be, or are significantly out of date and don't check the "definitive" source for a new key first but you'll never remove that completely. The way to do that is to check the root key, reliably, on a regular basis. But then if you have an old machine that still has the key from the install CD, and that key is compromised, and the machine does not have reliable (read SSL with significant trusted chain) means of contacting the main server without possibility of spoofing for a new key, then you have a problem.

    I don't see why this is "news" or even vaguely important except to show up distros that aren't ALREADY doing it this way.

    BTW: This is why I do package management on Slackware using a script that makes *me* get the GPG-KEY from slackware.com first if it ever changes (including checking if the IP of ftp.slackware.com has changed, the date of the file has changed, the key itself has changed etc. but if they can compromise my access to Slackware.com without hitting one of those checks, I'm stuffed anyway), why I have an RSS feed of Slackware and check the website myself regularly (just in case the key requires changing and news is posted about it), why I only use trusted mirrors, why I download the GPG signature and package from seperate mirrors and why nothing gets installed without that GPG check succeeding. To be honest, I see this just as being sensible for anything that goes into production. I'm still waiting for a rogue Windows Update, but it surprises me that some distros (or administrators) don't ALREADY do all this...

  70. Why do mirrors exist? by Ed+Avis · · Score: 1

    Why do we still have 'mirrors' in this day and age? It made some sense when Internet users had beards and understood the network topology and how many hops they were away from Kevin Bacon's VAX. In those days you also needed to specify email addresses giving the routing explicitly, as foovax!kremvax!buffy!user. But that long since got replaced with giving everyone a fixed address and letting the computer figure out the boring details of how to route it.

    Why not just use Bittorrent to distribute package updates and forget about the whole mirror network? People who spend time setting up and maintaining mirrors can enjoy more free time to hack on more interesting things.

    --
    -- Ed Avis ed@membled.com
    1. Re:Why do mirrors exist? by Zero__Kelvin · · Score: 2, Insightful

      "Why not just use Bittorrent to distribute package updates and forget about the whole mirror network? "

      Well, to start with, Bittorrent is P2P, and some ISPs block it. In an ideal world you might have a point, but I'm not going to think about it too much. Alas, we live in a world where network neutrality is not a given, and they may start arresting people for using BitTorrent any day now :-(

      ... I hope I am being alarmist with that last part, but it wouldn't surprise me if the next step after Telecom Immunity is P2P Gitmo.

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    2. Re:Why do mirrors exist? by kv9 · · Score: 1

      I think mirrors are still useful. I like the fact that I can pull shit at 30meg instead of the ~5meg I get from the rest of the internets.

    3. Re:Why do mirrors exist? by John+Hasler · · Score: 1

      There are no official mirrors of security.debian.org which is the only source of official updates to Debian Stable.

      --
      Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    4. Re:Why do mirrors exist? by psydeshow · · Score: 1

      In my view, mirrors exist so that you can make your own, on your own trusted hardware.

      The public mirrors are a nice bonus for amateur users of a distro, but you are under no obligation to use or trust them.

      When you have to update more than a handful of boxen at a time, having a mirror of the official repositories on your local network can save hours if not days.

  71. How to fix this by Anonymous Coward · · Score: 0

    The basic issue is that the vulnerable software can't be running when you download the new version.
    The way around it that I see is:

    1) Stop the service before requesting the new version
    2) They try and root you, but it fails
    3) Install the new version, knowing that is correct due to the signature
    4) Start the new version

    Problem solved

    This would be easy to do in apt, for example, just stop any services that need upgrading, before downloading, rather than stopping them after downloading and installing up the new package.

  72. Re:So, Linux is not more secure? by jumperboy · · Score: 1

    Linux : take the debian ssh disaster a few month ago as example. I read about it at Google News, head over here to check how the linux bashing was coming along, and while I was reading, the "update available" icon appeared. A few minutes later and the vulnerability was no more.

    I think the response time of most Linux or BSD distributions is admirable where security patches are concerned, but the Debian OpenSSL fiasco was a longstanding bug that went undetected for years and will have ramifications for a very long time. It didn't merely affect running SSH servers, it made it easier to crack a variety of keys, regardless of their strength. Many of these were generated a long time ago and will remain in production until some overworked admin gets a chance to test the keys for the vulnerability. The test itself is pretty easy, and victims will be open to a variety of attacks. Those in the know are already incurring a labor cost of replacing SSL certificates (thank god the commercial CAs stepped up to the plate and offered free replacements), and face the even harder task of identifying vulnerable SSH keys used for public key authentication to their systems (any system, not just Debian-based). There may even be mounds of data that's been encrypted and archived, but not really safe. I'm extremely happy I switched from Debian before this bug was introduced (I loved Woody, but couldn't stand the way they were tampering with upstream source in Sarge, an instinct that I'm glad I followed). But I've watched other shops jump on the Ubuntu wagon for servers, because it's "easy", and all they've done is run the update. They haven't made an attempt to replace vulnerable keys. This has set the stage for a smear campaign against Linux in the enterprise, which is undeserved for most distributions. Kudos to Debian for their response, but this mess is reminiscent of the Victor Hugo story, "A Fight with a Cannon", where the hero is given a medal, then executed for being the cause of the catastrophe in the first place.

  73. yet another misapprehension by reiisi · · Score: 1

    The problem is not old or modified packages being supplied. That was somebody's early lazy reading.

    This has been noted above, and I'll note it here to hopefully clog one loose parse.

    The problem is the ability to harvest IP addresses of vulnerable machines, and the time it might (not) take to succeed in an attack.

    In other words, before the package is updated.

    1: Bad guys watch a perfectly good mirror sending updates out. They own the mirror, but they maintain it properly, so no one has reason to suspect the mirror is dangerous.

    2: Bad guys have installed on the mirror a script that logs the IPs of machines downloading updates. The script probably analyzes the IPs, probes a little in a non-invasive way, then, when it finds something that looks like it has left the default port open to the internet, launches the attack. With a little luck (and a finite time to complete the update), the attack completes before the update.

    It's a (well-known, really) window-of-opportunity issue, supposedly exacerbated by the volunteer nature of mirrors. Volunteerism is the so-called vulnerability.

    The "workaround" is to (follow best practices and) shut down default ports. (This has also been mentioned above.) That will probably close the window of opportunity. And, then, there's also the technique of running incoming and outgoing ports on separate port numbers, etc.

    If the attacker can't find your ssh port, it's going to bee difficult for him/her to take advantage of a vulnerability in ssh, etc.

    Now, to consider why this is FUD against voluntarism, consider whether Microsoft's paid update network employees are paid enough to refrain from pulling a trick like this. Can money prevent this better than voluntarism can?

    (There is also the issue of whether Microsoft can fix vulnerabilities in thei)r own update servers to avoid them getting owned between the vulnerability being discovered and the vulnerability being fixed..

    --
    Computer memory is just fancy paper, CPUs just fancy pens with fancy erasers; the 'net is just a fancy backyard fence.
  74. Kittens? Ha! by GameboyRMH · · Score: 2, Funny

    Let me know when you have a 14lb. cat with bigass claws who likes to sit in your lap and use you as a scratching post.

    --
    "When information is power, privacy is freedom" - Jah-Wren Ryel
    1. Re:Kittens? Ha! by snoyberg · · Score: 1

      At that point I might be too preoccupied to remember to let you know.

      --
      Thank God for evolution.
  75. Re:Neither by Lobster+Quadrille · · Score: 2, Funny

    I don't think you did.

    --
    "The cup is in turn designed for holding hot or cold liquids, and has an open rim and closed base." --US Patent #5425497
  76. stop being so naive by speedtux · · Score: 1

    Tricking people into believing that the hash they get from the web site is the correct one is a tiny alteration to Firefox. Any hacker worth their salt would, of course, do that if they tried to take over your machine, and checking the hash from a machine that's potentially compromised is useless.

  77. Re:So, Linux is not more secure? by Anonymous Coward · · Score: 0

    Linux : take the debian ssh disaster a few month ago as example. I read about it at Google News, head over here to check how the linux bashing was coming along, and while I was reading, the "update available" icon appeared. A few minutes later and the vulnerability was no more.

    That's not true. Just because the stupid code was fixed, the exploit was based on the keys already generated. They all had to be regenerated and installed everywhere, and that is a complete pain! So you can be damn sure there are loads of debian machines just begging for attacks.

  78. One of the authors responds... by f(x)+is+x · · Score: 2, Informative
    Part of the confusion may be with the term metadata. There are two types of metadata which I'll call package and repository metadata. The package metadata describes a package (foo is version 1.2, has size 34K, needs the package bar, etc.) and is typically extracted from the package itself and provided in a tarball on the repository (for dependency resolution). The repository metadata describes where on the repository one can find the packages, and tarballs of package metadata(*).

    In yum (which I will assume you are using since it's the most popular RPM based package manager and you refer to rpms) there are no signatures on the repository metadata or package metadata. There are signatures on the packages themselves, but not the extracted package metadata.

    The fundamental way the replay attack works is that I can have my mirror host outdated versions of packages that are correctly signed. I can use an old repository metadata file or write my own repository metadata file that refers to package metadata and packages that are out of date. A client may ask to install firefox and I would provide a correctly signed version of firefox-2.0. Clearly if this package contains a vulnerability that I can exploit remotely, I now can control your system.

    The fact that the package metadata in the tarballs isn't signed also enables some other attacks. Yum will blindly trust any package metadata it receives. So when you download the package metadata for firefox, I can modify the package metadata to say it depends on additional packages (which will cause you to install them as well), say that it has a dependency on a package that does not exist (which prevents you from installing firefox at all), or return a huge list of packages to attack another repository (details on website / papers). Yum does not check any signature until after it finished dependency resolution and downloads all of the packages.

    Surprisingly yum does not verify that the package metadata it received from the repository matches the metadata embedded in the signed package. So if I say firefox depends on apache (both packages correctly signed), yum will install both even though after downloading it could check the firefox RPM to see it doesn't depend on apache.

    We think that the right way to tackle this problem isn't to sign the package metadata, but the repository metadata. Since the repository metadata has the secure hash of the package metadata (in most repository layouts), signing the repository metadata covers all of the content on the mirror / repo. We advocate using timestamps and expiration times to prevent an attacker from providing an older but correctly signed version of the repository metadata or freezing the metadata perpetually. (please see our papers for more information)

    Anyways, we understand the skepticism and appreciate the spirited emails and slashdot comments we've received about these vulnerabilities!

    Justin Cappos

    (*) Not all package managers download package metadata in separate tarballs (some actually scrape information from the headers of the packages on the repository). Regardless of how the information is stored, if it's not signed then an attacker can substitute malicious data. I'm simplifying here to make the discussion clearer and more generally applicable to a wide range of package managers.

  79. An author responds... by f(x)+is+x · · Score: 1
    Yum's mirror selection scheme MirrorManager isn't by random and allows an attacker to do nasty things. Suppose I know your company has IP addresses 1.2.3.0/24. I can set up an Fedora mirror and then select that I want to serve content to the subnet 1.2.3.0/24. My mirror will be the _only_ mirror a user with one of those IPs will use. This can be used to easily target attacks to governments, military computers, etc.

    if you picked your own mirror, you already trust them.

    While this is a fairly common opinion, we believe this is the wrong security model for package distribution. I mean, if you trust your mirror, why sign packages in the first place? I would argue that if a distribution is going to support outside mirrors it needs to ensure that a mirror cannot compromise the security of the clients in any worse way than refusing to serve requests.

    Also it's worth noting that there are many tools like Source Selector, netselect-apt, etc. which automatically choose a single mirror for you based upon bandwidth, etc. An attacker with a well provisioned system could obtain a huge number of clients.

    Justin Cappos

  80. Selective perception? by Anonymous Coward · · Score: 0

    Reading the article, it sounds like a security flaw to me. And i can think of a few simple work arounds to solve it.

    I love how whenever a vulnerability appears in a Linux distro or piece of OSS, there is an horde of people on Slashdot 'defending' the software and claiming said flaw isn't a flaw, as it can be easily fixed in Y X or Z way. But when it's Windows, the majority of people just flame Microsoft in oblivion without applying the same thought process.

    I work in a large corporate environment with Windows & Unix systems. They are both fantastic in different ways and they both have flaws. They both have software unique to each OS which is brilliant.

    Why do we always have to say one OS or piece of software is superior to another? What's wrong with just saying they are 'different'?

  81. Re:So, Linux is not more secure? by sammyF70 · · Score: 1

    I can only talk about the distro I'm using, which is Ubuntu 8.04. The ~stupid code~ was fixed, but the stupid patch also tried to find all the keys on your system and generate new.
    Still a pain, but as much as was humanly possible was fixed automatically.
    I agree that the ssh bug was *VERY* bad and had a particularly stupid source, but the way it was handled was adequate.

    Now, how do you think Apple or Microsoft would have handled a similar problem?

    --
    "DRM is like the Ford Pinto: it's a smooth ride, right up the point at which it explodes and ruins your day."-C.Doctorow
  82. As an aside... by QuoteMstr · · Score: 2, Informative

    As an aside, here's the famous "don't use kill -9" letter:

    No no no. Don't use kill -9.

    It doesn't give the process a chance to cleanly:

    1) shut down socket connections

    2) clean up temp files

    3) inform its children that it is going away

    4) reset its terminal characteristics

    and so on and so on and so on.

    Generally, send 15, and wait a second or two, and if that doesn't
    work, send 2, and if that doesn't work, send 1. If that doesn't,
    REMOVE THE BINARY because the program is badly behaved!

    Don't use kill -9. Don't bring out the combine harvester just to tidy
    up the flower pot.

  83. Re:So, Linux is not more secure? by Julian352 · · Score: 1

    Well, you could look at the GDI issue from the Microsoft side. They released a tool to try to find vulnerable code in libraries used by the third parties.