Slashdot Mirror


Weakness In Linux Kernel's Binary Format

Goodfellas writes, "This document aims to demonstrate a design weakness found in the handling of simply linked lists used to register binary formats handled by the Linux kernel. It affects all the kernel families (2.0/2.2/2.4/2.6), allowing the insertion of infection modules in kernel space that can be used by malicious users to create infection tools, for example rootkits. Proof of concept, details, and proposed solution (in PDF form): English, Spanish.

281 comments

  1. 1 meg PDF? by Lehk228 · · Score: 4, Funny

    yes, a pdf linked from slashdot will last a long time...

    oh wait it's already gone

    --
    Snowden and Manning are heroes.
    1. Re:1 meg PDF? by Kingrames · · Score: 2, Funny

      Let's hope it didn't contain the malicious code. You know someone thought of it.

      --
      If you can read this, I forgot to post anonymously.
    2. Re:1 meg PDF? by Anonymous Coward · · Score: 0

      I can't believe something on /. is in spanish!!!

      Aguante Argentina!!

      (by anonymous argentinean coward)

    3. Re:1 meg PDF? by rolandog · · Score: 0, Offtopic

      Mexico es muy bien! //anonymous mexican coward //Foamy reference.

    4. Re:1 meg PDF? by bruno.fatia · · Score: 1

      Actually it loaded here... took a while but yeah.

    5. Re:1 meg PDF? by Lehk228 · · Score: 1

      6 hours later

      it wasn't actually fully dead earlier, but transferring in the bytes per second range may as well be dead.

      --
      Snowden and Manning are heroes.
  2. Criptic summary by Anonymous Coward · · Score: 0

    > of simply linked lists used to register binary formats handled by the Linux kernel.

    Is the fact that I only allow elf and a.out via my kernel config enough to mitigate this, or do I have to RTFA?

    1. Re:Criptic summary by Anonymous Coward · · Score: 1, Informative

      Apparently (according to another poster) it is. So who enables misc binaries in a kernel build and why would they do this? The only people I can think off are mono users but they're fools anyway.

    2. Re:Criptic summary by bcat24 · · Score: 1

      Well, whatever you think about mono (why do some people hate anything even remotely connected with MS?), I think most users and distros will have miscellaneous binary support enabled. How were they supposed to know that such a simple feature was insecure?

    3. Re:Criptic summary by Anonymous Coward · · Score: 0
      How were they supposed to know that such a simple feature was insecure?

      I think the big clue here is that it potentially lets someone use binary formats other than COFF and ELF. WHOOOO WHOOOO, did you hear that? That was the clue train and you'll have to be faster if you want to get aboard.

      why do some people hate anything even remotely connected with MS?

      Could it be something to do with their unethical business practices and shoddy, derivative software? What's that you say, "mono is good for linux"? Hey, lay yourself down accross these tracks because I think I hear the cluetrain a'comin'.

    4. Re:Criptic summary by doti · · Score: 1

      Why a.out? It's very old, nobody uses it. Unless you have a specific ancient binary-only software, go elf-only. I'm doing it for many years now without a single issue.

      --
      factor 966971: 966971
    5. Re:Criptic summary by Anonymous Coward · · Score: 0
      gcc file.c; ./a.out
    6. Re:Criptic summary by Xabraxas · · Score: 1

      Apparently (according to another poster) it is. So who enables misc binaries in a kernel build and why would they do this? The only people I can think off are mono users but they're fools anyway.

      I use mono and I don't have misc binary support enabled. It is not necessary. What's the big deal with mono anyway. Oh no it came from Microsoft!!! So what. Just use F-Spot, Banshee, Beagle, or any of the other very well put together mono apps and you might change your mind. It changed my mind. There is really nothing to fear using mono unless you are using Windows.Forms, which is completely unecessary for Linux native applications.

      --
      Time makes more converts than reason
    7. Re:Criptic summary by Anonymous Coward · · Score: 1, Informative

      Hint: that is not an a.out file.

    8. Re:Criptic summary by FunkyELF · · Score: 1

      I'm not an expert or anything but can't you have malicious ELF binaries?

  3. And? by ledow · · Score: 4, Informative

    Although any auditing is welcome and they may be a problem here, the fact is that it's hardly news and not exploitable. The reports says itself that you have to be root to exploit it. It's already game-over. Yes, look for these sorts of things and find them but it's hardly worth the shock-factor of "Massive Hole Found In Linux" panic headlines.

    1. Re:And? by Anonymous Coward · · Score: 2, Informative

      How many average-Joe-who's-friends convinced-him-to-run-Linux's run as root, though?

    2. Re:And? by IWannaBeAnAC · · Score: 1
      I cannot RTFA as it is slashdotted, but if you need to be root then yes, it is over and not much more to be said. Any non-hardened linux kernel will likely have things like /dev/kmem, or even something like insmod will let root insert code into kernel space for goodness sake!

      A hardened kernel would most likely not allow runtime binary formats anyway (I'm pretty sure you can restrict it to just elf if you want). So it is a complete non-event. I'm not sure the kernel developers would even bother fixing it.

    3. Re:And? by Vo0k · · Score: 3, Insightful

      still, a stealthy nest for your rootkit is always welcome. A system should remain transparent enough to make the intrusion obvious, this trick allows to install stealthy backdoor.

      --
      Anagram("United States of America") == "Dine out, taste a Mac, fries"
    4. Re:And? by dubbreak · · Score: 1

      Any rootkit is going to be stealthy. It hooks to kernel calls, so say you search for the binary on the hardrive, hmm well that involves a kernel call which you grabbed so you respond by saying all files but yours is there. What about running processes? Oh yeah, have to make a kernel call for that, which was intercepted again by the rootkit, and guess what, it doesn't show that it is running!

      The original poster was correct, this isn't news. It is trivial to install a rootkit with root access. Do this in usermode on any linux kernel and I'll be impressed.

      --
      "If you are going through hell, keep going." - Winston Churchill
    5. Re:And? by Cheapy · · Score: 1

      Good thing this headline wasn't a "Massive Hole Found in Linux" panic headline!

      --
      Would you kindly mod me +1 insightful?
    6. Re:And? by buanzo · · Score: 1

      Oh well, what do you expect from a company that has zone transfers enabled? Of course, some would argue that closing axfr is security through obscurity... sure. For me, it plays as a script-kiddie-countermeasure to slow them down:

      shellcode.com.ar has address 0.0.0.0
      mail.shellcode.com.ar has address 200.42.47.10
      ftp.shellcode.com.ar has address 200.42.47.10
      www.shellcode.com.ar has address 200.42.47.10
      lists.shellcode.com.ar has address 200.42.47.10
      dns1.shellcode.com.ar has address 200.42.47.10
      shellcode.com.ar has address 0.0.0.0
      mail.shellcode.com.ar has address 200.42.47.10
      ftp.shellcode.com.ar has address 200.42.47.10
      www.shellcode.com.ar has address 200.42.47.10
      lists.shellcode.com.ar has address 200.42.47.10
      dns1.shellcode.com.ar has address 200.42.47.10

      At least they used the good'ol zoneedit.com service.

      greetings from dubai

      --
      Buanzo Consulting - 15 Years of GNU/Linux experience, for you.
    7. Re:And? by phorm · · Score: 1

      And they're still detectable. That's what security bootdisks are for, possibly with regular MD5 filesums sent to a secure medium (read-only storage or write-once location).

    8. Re:And? by theLOUDroom · · Score: 1

      still, a stealthy nest for your rootkit is always welcome. A system should remain transparent enough to make the intrusion obvious, this trick allows to install stealthy backdoor.

      If they have root this is simply not possible.

      --
      Life is too short to proofread.
    9. Re:And? by tricorn · · Score: 1

      They're complaining that when you add a new binary format handler, the new one is inserted at the beginning of the list instead of at the end. Since your fake handler can always return "not mine", it doesn't affect the others, but allows your code to get control every time a process does an exec(). They recommend adding the new handler at the end of the list, so it usually doesn't get called (in fact, will only get called when something tries to exec a file type that isn't recognized).

      It's effectively a way of patching the exec call in a somewhat sneaky fashion that might not be detected by some counter-measures. Technically, adding the new handler to the end of the list is more secure, since a new format can't hijack any existing formats (by accident or on purpose). Operationally, putting it at the end of the list is less flexible, as it makes it easy to override an existing format, thus being able to test a new handler, or conditionally run the new or old handler for some cases. Since this is a highly sensitive operation in the first place, adding slightly more security doesn't seem to me to be worth removing the added flexibility. In either case, you already own the system.

    10. Re:And? by moro_666 · · Score: 1

      The reports says itself that you have to be root to exploit it.

        This is actually a problem these days. 7 years back you were root once in a month when you rebuilt your 2.2 kernel and lived happily afterwards as a normal user. Netscape 4.7 refused to start under root ...

        However, if you look around now, there are tons of guide out there how to install "this damn ati" on suse or how to hack "this nvidia" in fedora or how to apply "that qemu patch" in ubuntu. People provide weird patches and suggest the users to "sudo" the commands for this that and that. Guess what, anyone providing a guide out there can "root" all these machines, provided that his guide & software|patches is up long enough without being spotted.

        The distros today don't put pressure on the "root factor", they just try to catch the dummy users from windows, but if those all endup sudo'ing just about anything to get the permissions correct, then the whole idea of linux security is gone.

      ps does anyone have a mirror for the pdf ?

      --

      I'd tell you the chances of this story being a dupe, but you wouldn't like it.
    11. Re:And? by Yvanhoe · · Score: 2, Insightful

      but it's hardly worth the shock-factor of "Massive Hole Found In Linux" panic headlines.

      The title reads "Weakness In Linux Kernel's Binary Format", quite accurate if you ask me.

      --
      The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
    12. Re:And? by bcmm · · Score: 1

      It needs root? Then it isn't actually a problem. Root can do anything. If you want to insert malicious code in kernel space, use insmod. For stuff that can't be done that way, in theory, (!) you could perform any modification you like on the kernel through /dev/mem. Root is SUPPOSED to be able to fuck things up!

      --
      # cat /dev/mem | strings | grep -i llama
      Damn, my RAM is full of llamas.
    13. Re:And? by sowth · · Score: 1

      Wait...letting other people have your root password is bad? Oh crap!

      ...

      It was all on AOL, so I'll just ask them to shutdown their service for a while and copy their user list for me so I can track down all the people I told. Easy fix. :-)

    14. Re:And? by Anonymous Coward · · Score: 0

      Not long ago, there was a vunerability in X Windows, (a classic "if (setuid()=0)" error, twice in the same file), that allowed one to get root. Everybody was vunerable.

    15. Re:And? by jnf · · Score: 1

      where this is news however is in bypassing ACLs to be able to install rootkits, consider environments where /dev/kmem and such are not writeable by root and modules are not loadable/etc, something like this yields ring-0 access, which in a lot of security models is way more important than uid 0 access.

      I agree though, its not frontpage news.

  4. Too bad you have to be root. by czehp · · Score: 5, Funny

    OMFG! I have a security flaw... but you have to be _root_ to execute it! AHHHHH It's the end of the world!

    I discovered a new one too... if you run rm -rf / as root you'll bork your system!

    We should all go back to windows, where rm doesn't exist ^_^

    1. Re:Too bad you have to be root. by networkBoy · · Score: 1

      deltree

      I think they removed it from the normal windows distro back in win2K though.
      -nB

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    2. Re:Too bad you have to be root. by Viraptor · · Score: 1

      But in Win. you have to be admin, to use pagefile attack ;)

      Seriously though - root can't do anything. Without kmem, modules and other things that you can turn off manually, you shouldn't be able to access kernel memory. EVEN as a root. Especially with "new" security concepts like selinux. If you can get to kernel mem in any unauthorized way, even from root account - it is a big problem.

    3. Re:Too bad you have to be root. by SanityInAnarchy · · Score: 1

      From what I understand, without reading TFA (currently slashdotted), all you have to do to prevent this attack is to disable binfmt_misc. I believe the attack is works even if module loading is disabled, so long as binfmt_misc is loaded or compiled in.

      --
      Don't thank God, thank a doctor!
    4. Re:Too bad you have to be root. by tomstdenis · · Score: 1

      yeah no shit. As root you can just pwn things running ring-0 [or equiv] on the processor. You don't need to exploit a bad API to do this.

      Now if you could insert modules as a non uid=0 user then that'd be something...

      Tom

      --
      Someday, I'll have a real sig.
    5. Re:Too bad you have to be root. by Anonymous Coward · · Score: 0
      No rm? Some years back my brother used this following command "to free up some space":
      deltree windows
      Dad was rather unamused.
    6. Re:Too bad you have to be root. by Com2Kid · · Score: 1

      deltree

      I think they removed it from the normal windows distro back in win2K though.
      -nB


      rm /s
    7. Re:Too bad you have to be root. by PitaBred · · Score: 1

      Yeah. Del now deletes directories and all files under it :)

    8. Re:Too bad you have to be root. by Anonymous Coward · · Score: 0

      Microsoft Windows XP [Version 5.1.2600]
      (C) Copyright 1985-2001 Microsoft Corp.

      C:\Documents and Settings\Dad>deltree
      'deltree' is not recognized as an internal or external command,
      operable program or batch file.

      C:\Documents and Settings\Dad>exit

    9. Re:Too bad you have to be root. by Foofoobar · · Score: 1

      MOD PARENT UP. I nearly puked I laughed so hard.

      --
      This is my sig. There are many like it but this one is mine.
    10. Re:Too bad you have to be root. by Duhavid · · Score: 1

      On AIX, I think it was a last 3.x version, a friend of mine
      found that a "simple" chown -R from the root was quite
      sufficient to bork a system.

      --
      emt 377 emt 4
    11. Re:Too bad you have to be root. by ewilts · · Score: 0

      Yeah, but believe it or not, but Windows will prevent you from shooting yourself in the foot better than a standard Linux distro will.

      Try rm -Rf / from a bash shell and see if your system is bootable.
      Try to remove the Windows directory on a Windows XP or 2k3 system and see if your system is bootable.

      For those not interested in building virtual machines to prove this, the answers are no and yes in that order.

      In the same light, you can't fdisk your boot disk on Windows you can repartition your boot disk on Linux.

      We actually ran into this at a Veritas meeting on their Bare Metal Restore product. One user group member had to bork a Solaris system and one a Windows system so Veritas could demo BMR. The sad part was that it actually hard to bork the Windows system.

      --
      .../Ed
    12. Re:Too bad you have to be root. by Lehk228 · · Score: 4, Informative

      that is more due to limitations on NTFS and FAT* than self protection

      unix filesystems can delete an in-use file and only physically remove it when it is no longer in use, windows cannot do that. hence having to reboot for so many updates and some configuration changes (such as changing host name)

      --
      Snowden and Manning are heroes.
    13. Re:Too bad you have to be root. by The_Wilschon · · Score: 1
      If you can get to kernel mem in any unauthorized way, even from root account - it is a big problem.
      If root does not constitute authorized access, then what does? Is there some kind of supersuperuser that only the pentagon knows about? This doesn't make sense. I suppose you could have a separate account from root which could access kernel memory, but root can su to any account it likes, so that doesn't really help.
      --
      SIGSEGV caught, terminating

      wait... not that kind of sig.
    14. Re:Too bad you have to be root. by The_Wilschon · · Score: 1
      if you run rm -rf / as root you'll bork your system!
      Not if you use the immutable attribute. `chattr +i files' It protects the files so they cannot be changed at all (hence the name) even by root. Of course, root can remove the attribute, so it is not a security measure, but a protection against typos and stupidity.
      --
      SIGSEGV caught, terminating

      wait... not that kind of sig.
    15. Re:Too bad you have to be root. by Mancat · · Score: 1

      Yeah because nobody has ever leveraged an exploit like this by executing it through an exploited privelege escalation vulnerability in another part of the system.

      NEVER EVER.

      --
      hello dear sirs my name is jamesh i are india (bihar) can u guide me install red had linux 9?
    16. Re:Too bad you have to be root. by Tanktalus · · Score: 1

      Actually, there is a reason for this. And it's not just limitations of the filesystem. It's that it actually was not uncommon for Windows users to "accidentally" delete their Windows directory (sometimes thinking they're clever for freeing up space for other things). Since there is no filesystem security on Windows by default, you ended up deleting many (but not all) DLLs ... and next time you tried to load something, crash. (Had that happen to my dad with Win3.1. Luckily, Win 3.1 was easy enough to reinstall.)

      Meanwhile, Linux users generally don't run as root - so all they can bork is their own home directory. However, if you do make a typo as root ... well, yeah, you run into problems. There are ways around that, too, if you're paranoid enough. One way is to use setacl's to mark everything in /usr, /lib, /boot, /bin, and /sbin as immutable. Another is to put those on their own partition(s), and mount them as read-only. Both solutions make it a royal PITA to upgrade things, but they do take care of the accidental-delete idea.

      Hmmm - I wonder if I could convince the Gentoo guys to do the setacl's thing in their portage. Since they always do a temp-install to /var/tmp/packagename anyway, they could automatically unset the immutable bit on everything they're about to overwrite, overwrite it, reset the immutable bit, all automatically. RPM (the only other package manager I'm familiar with) would make this much more painful without serious changes to the RPM code.

    17. Re:Too bad you have to be root. by Anonymous Coward · · Score: 0

      well, i know for a fact that typing "rd c:/windows -q -s" will make your windows xp computer not start up anymore

    18. Re:Too bad you have to be root. by Viraptor · · Score: 1

      Do you really want to have your (for example) IDE controller memory avaliable in root's userspace? I don't think so - you wouldn't like bugs in any program then. One overflow and you've lost harddrive. Even Connector interacts with kernel memory by sockets.
      So, if you want access to kernel from root account - please give us a reason why. What do you expect to gain by that? It's just the way it works. You should not be able to overwrite kernel by accident. You shouldn't be able to read it also. If there are some standard ways to interact with that memory (modules, connector, kmem), that are tested -> only things you lose are many ocasions to mess things up accidentally.
      Even if root can be trusted, can programs he runs be trusted?

    19. Re:Too bad you have to be root. by siride · · Score: 1

      Umm, no. You need read your intro OS textbook again. root and ring-0 have nothing to do with each other.

    20. Re:Too bad you have to be root. by cafucu · · Score: 1

      Try rm -Rf / from a bash shell and see if your system is bootable.
      Try to remove the Windows directory on a Windows XP or 2k3 system and see if your system is bootable.
      </blockquote>

      What is this "bash shell" and how do I find it on XP? I tried using Find but it was nowhere on all my drives :~(
      I'm using SP2??
      --
      :%s:work:/.:g
    21. Re:Too bad you have to be root. by meowsqueak · · Score: 1

      I agree totally. 'root' doesn't mean unrestricted access to the machine's resources. If it did, you wouldn't want to run *anything* as root without risking total disaster.

      (Formatting /dev/hda is not the same as overwriting part of a process's address space and causing it to spew random garbage all over the disk sectors).

    22. Re:Too bad you have to be root. by tomstdenis · · Score: 1

      ring-0 tasks run with uid=0 permissions. They're typically kernel processes, but as root you can do things like pwn other process memory spaces.

      Tom

      --
      Someday, I'll have a real sig.
    23. Re:Too bad you have to be root. by Anonymous Coward · · Score: 0

      READ.

      I think they removed it from the normal windows distro back in win2K though.

    24. Re:Too bad you have to be root. by julesh · · Score: 1

      that is more due to limitations on NTFS and FAT* than self protection

      unix filesystems can delete an in-use file and only physically remove it when it is no longer in use, windows cannot do that. hence having to reboot for so many updates and some configuration changes (such as changing host name)


      Windows has been capable of deleting in-use files for the last 5 years (i.e., since XP was launched). Applications, however, are able to prevent open files from being deleted by specifying appropriate locking flags when they open them. See CreateFile and search for FILE_SHARE_DELETE.

    25. Re:Too bad you have to be root. by Anonymous Coward · · Score: 0

      2 points:
      a) I don't like Linux
      b) escalating privileges and becoming root is usually the destination, not part of the journy.

      Have a nice day.

    26. Re:Too bad you have to be root. by Tony+Hoyle · · Score: 3, Informative

      You misunderstand what FILE_SHARE_DELETE does.

      That just allows other processes to open a file that is opened with delete access. It does not allow you to delete a file that is in use - that is still impossible in Windows.

    27. Re:Too bad you have to be root. by The_Wilschon · · Score: 1

      I was asking what does constitute authorized access to kernel memory. Your post seemed to imply (through the use of the word unauthorized) that there was some mode of authorized access, and I asked what it was. Don't jump all over me just because you misread what I said. Now, could you answer the original question please?

      --
      SIGSEGV caught, terminating

      wait... not that kind of sig.
  5. This is so not serious by Spikeles · · Score: 5, Informative

    For those who won't read it..

    Basically there is this table that contains a list of handlers for the various exes, if if a handler returns a failure the loop that parses the table will stop iterating. If you insert a kernel module first you can take control of all executable types b4 any other handles get to handle it.

    BUT...It requires root access and wont work on SELinux. This is a serious how? I mean if you have root access, then the entire system is compromised already.

    --
    I don't need to test my programs.. I have an error correcting modem.
    1. Re:This is so not serious by Anonymous Coward · · Score: 0

      ... because some "user friendly" distros make the default user root and not everyone uses SELinux?

    2. Re:This is so not serious by cp.tar · · Score: 1

      This is akin to an acquaitance of mine who claims that Linux is insecure because if you have physical access, it's usually easily crackable.

      Well, duh.

      --
      Ignore this signature. By order.
    3. Re:This is so not serious by windex · · Score: 1

      That's crap. It dosen't work on SELinux, but may if any bypass-type holes in SELinux show up.

      Any complete memory protection/RBAC system can prevent stuff like this (e.g. http://www.grsecurity.org/), but it shouldn't. For example, you can make it impossible to insert kernel modules after startup in grsecurity, but for a long time a 'root only' bug in the kernel allowed you to insert a module and execute it anyway (this may be the same bug, who knows). Good RBAC setups assume root is untrusted.

    4. Re:This is so not serious by SanityInAnarchy · · Score: 1
      ... because some "user friendly" distros make the default user root

      Name one.

      and not everyone uses SELinux?

      I can name a user friendly distro that has SELinux enabled by default: Fedora.

      --
      Don't thank God, thank a doctor!
    5. Re:This is so not serious by fimbulvetr · · Score: 1

      It seems to me that having root access != having easy backdoor access to exes.

      For instance, if I can load a wrapper around your financial program, without modifying your financial program (So AIDE would find it), I could more easily grab your data.

      For the record, SELinux is nice, but should not be considered your first defense against attackers. Even if it's considered a good secondary defense, the primary defense should certainly be fixed ASAP.

    6. Re:This is so not serious by Anonymous Coward · · Score: 0
      ... because some "user friendly" distros make the default user root

      Name one.


      Fedora Core. Unless you explicitly create a user account during the installation, the only account you'll be able to use is root. Many users who are new to Linux or UNIX, and who do not yet know how to add other accounts, just end up using the root account. It essentially ends up becoming the default account, and of course that is a risky thing to be doing.

    7. Re:This is so not serious by Anonymous Coward · · Score: 0

      ... because it will make detecting a rootkit exploting this harder to find

    8. Re:This is so not serious by jesdynf · · Score: 1

      I got aggravated as soon as I saw the summary -- hey, big news guys, install ssl/omgpwned.o into the kernel as root and you're in ~o trou-ble o~ !!!

      'Tards.

      --
      Yahoo! Pipes are awesome. How awesome? http://pipes.yahoo.com/jesdynf/slashdot
    9. Re:This is so not serious by FST777 · · Score: 1

      Linspire.

      And don't say "yeah but" or "if you want to run things like root you wouldn't use Linux anyway" or "no one would just execute or use said application, cause that would be foolish and they thus would not use Linux"...

      It should be secure for Average Joe. He might not be running Linux now, but it should be the goal. If it isn't, we shouldn't bash Windows any longer and be happy with the niche-market we have as FOSS-lovers (right along with OS/2 and BeOS).

      --
      Free beer is never free as in speech. Free speech is always free as in beer.
    10. Re:This is so not serious by Anonymous Coward · · Score: 0

      You're talking out your ass. The FirstBoot of FC has a screen for adding a user and it says right there that it's recommended. Try bypassing and you get another warning. Quit the FUD.

    11. Re:This is so not serious by cortana · · Score: 1

      AFAIK, Linspire hasn't done that since before it changed its name from Lindows.

    12. Re:This is so not serious by SanityInAnarchy · · Score: 2, Insightful

      As someone else mentioned, Linspire has not done this in a long time. In fact, I believe they've never actually released a stable version that ran as root. They just (quite retardedly) went around claiming that running as root was secure, in defense of what they did once, in a development version, likely never seen by Average Joe.

      It should be secure for Average Joe. He might not be running Linux now, but it should be the goal.

      If that's the goal, Average Joe can fire up Ubuntu, right now. Ubuntu never tells the user anything about root, but requires the user to enter their own password occasionally, so that sudo can grant privileges to change critical system settings, install software, etc. This is the same model OS X uses, yet Ubuntu is more secure, because installing new apps does not necessarily require downloading and executing unverified executables.

      --
      Don't thank God, thank a doctor!
    13. Re:This is so not serious by FST777 · · Score: 1

      I stand corrected in the Linspire case. But in the Ubuntu case: doesn't that pave a way for this exploit? From an Avarage Joe POV (huh? password? sure...)?

      --
      Free beer is never free as in speech. Free speech is always free as in beer.
    14. Re:This is so not serious by bogado · · Score: 1

      There is only so much you can do for your clueless users. If the user is willing to type a password to see "dancing pigs" then you might as well ask for his bank acount and password. :-)

      --
      []'s Victor Bogado da Silva Lins

      ^[:wq

    15. Re:This is so not serious by SanityInAnarchy · · Score: 3, Interesting

      If you assume Average Joe doesn't get even the least suspicious when something asks him for a password, then Average Joe is doomed.

      Think about it. Average Joe will demand admin access in order to change settings and install software. So we have to choose between removing that access entirely (so there's no password for Joe to type), or praying that Joe is smart enough to realize he's giving something admin access.

      Really, can you possibly think of a solution to this kind of stupidity? Hell, I could simply craft a website -- maybe a Flash page -- that looks just like the Ubuntu password prompt. That way, I don't even need local user access.

      I say this solution is reasonably secure because we don't really have anything more secure. Kind of like how Democracy sucks, but it's also the best we've got.

      --
      Don't thank God, thank a doctor!
    16. Re:This is so not serious by Architect_sasyr · · Score: 1

      This is serious in the same way one could be serious on, for example, OpenBSD. Just because they have root on a system doesn't necessarily mean game over. If I run at a high security level on my router and/or firewall then users can't modify the rules, and they can't load kernel modules to include things like the bpf for sniffing.

      With this kind of exploit its possible that it could be leveraged to bypass these... THAT is why it is a problem. If you think root is the end of the world for your system, your missing some important bits of information.

      --
      Me failed English...
      FreeBSD over Linux. If my comments seem odd, this may explain...
    17. Re:This is so not serious by Feyr · · Score: 1

      you can remove the privilege to insert kernel modules in the standard kernel too, even by root. no need for a fancy patch. look up linux "capabilities"

    18. Re:This is so not serious by tchiwam · · Score: 1

      You need either...

      -Root Access
      -Physical access

      One involve breaking and entry... not something that easy. My servers are behind some serious locks. No one logged root for the last 2 years. Sudo is the only access allowed for root things and is only allowed on the local console.

    19. Re:This is so not serious by Anonymous Coward · · Score: 0
      If I run at a high security level on my router and/or firewall then users can't modify the rules, and they can't load kernel modules to include things like the bpf for sniffing.

      What if you need to load a new kernel module for a new device? What if you want to troubleshoot your network or sniff stuff? What if you want to add a new firewall rule? Is there a way around it? Do you have to be root to get around it? ... ... ?

    20. Re:This is so not serious by FST777 · · Score: 0

      I'm not suggesting Ubuntu should change. But an exploit in the Linux kernel that requires root-access is as serious as any other exploit. We geeks don't go root that easily, but the average user will.

      "In order for this game to run on Linux, you need to add a precompiled binary added to your kernel. Type your password to do that automatically."
      Linux geek: yeah right...
      Average Joe: OK!

      --
      Free beer is never free as in speech. Free speech is always free as in beer.
    21. Re:This is so not serious by julesh · · Score: 2, Informative

      It seems to me that having root access != having easy backdoor access to exes.

      For instance, if I can load a wrapper around your financial program, without modifying your financial program (So AIDE would find it), I could more easily grab your data.


      Yes, but there are already so many ways that modification could be made:

      * Modify libc.so to perform the task you want (applicable to all modern unix systems)
      * Modify ld-linux.so or equivalent to perform the task you want (applicable to all ELF-based systems)
      * Modify the system config to automatically load an additional shared library to perform the task you want
      * Modify the user's config to automatically load an additional shared library to perform the task you want
      * Add a module to the kernel that intercepts the system calls the program wants and performs the task you want
      * Add a module to the kernel that allows an additional process to snoop on the program's memory and perform the task you want
      etc.

      There are plenty of ways of using the operating system's features to do just about anything you want to, even to other programs. This is intentional. It allows flexibility. There is a reason why new binfmt handlers are added to the front of the list, rather than the back, and that is to allow a new handler to override specific cases that would usually be handled by an old one. You add generic handlers first (typically just the ELF loader these days) and then specific ones afterwards (perhaps a handler for broken ELF files produced by a strange compiler). You don't want to have to load the specific ones first, because specific stuff is less likely to be actually needed, so you really want it to be a module.

    22. Re:This is so not serious by SanityInAnarchy · · Score: 3, Insightful

      But an exploit in the Linux kernel that requires root-access is as serious as any other exploit.

      No, it's not, and you're an idiot for suggesting it. I really hope you're joking.

      Average Joe: OK!

      Average Joe will have already hosed his system, and there isn't a damned thing we can do about it other than send Average Joe to a newbie concentration camp. (Before you say anything, I was raised Jewish. I don't really condone newbie genocide. Think of it more like driver's ed.)

      Let me put it this way: If Average Joe will type his password to add a precompiled binary to his kernel, he'll certainly type his password to install a custom kernel to his /boot. He also won't have a problem with rebooting -- Windows makes him do that all the time, whether or not the installed program really needs him to. Thus, even if we completely prevent the kernel from being modified at runtime, the kernel can be replaced wholesale.

      That's ignoring the numerous other ways to modify a running kernel. /proc/kmem is one. But this exploit in particular requires a module to be loaded. If you can convince the user to load a module, you don't NEED this exploit -- there is nothing to stop you from rampaging all over the kernel space anyway.

      But even with modules disabled, it's far too easy for root to install a rootkit, or do other evil things to users. Hell, a rootkit could be as simple as writing a glibc wrapper. And if Average Joe will go root so easily, Average Joe is probably not a good target for a rootkit. How often is he going to actually look for files that a rootkit might otherwise hide? Couldn't malware simply hide in dot-files and be perfectly safe from Joe?

      There simply isn't a way of giving the user enough power to do what they want, without also giving them the ability to screw it all up. The only solution for morons like Joe is to not give them that power. Reserve enough for admins, and Joe is not an admin.

      Your statement is like saying a pistol you can shoot yourself in the foot with is just as dangerous as a pistol that explodes in your face. Look, it's simply not possible to make a useful handgun that you can't shoot yourself in the foot with -- by its very definition, a handgun will shoot wherever you point it, and it will always be physically possible to point it at your foot. You have these options to attempt to secure Average Joe:

      • Actually teach people about gun safety before you give them a gun. (Teach sane computer use in the store.)
      • Don't let people have a gun unless they can use it safely. (Test people's computer sanity in the store.)
      • Offer your services as a bodyguard or hitman instead. (Don't let them have the root password. Admin their computer for them, installing software when they ask, updating when they don't.)
      • Sell them an armored boot (firewall, online AV). Some will take it off because it's uncomfortable (blocks things they want), or to get a better shot at their foot (willingly let in known malware).
      • Sell them health insurance (antivirus) and emergency medical care (recovery tools, Geek Squad).
      • Sell them prosthetic feet, which they can blow off and replace at will. (Sell them a new, faster computer, rather than clean up their old one.)

      I can't think of any other alternatives. Sure, you could give them a club instead of a pistol (UAC, Knoppix, restrict them to oblivion), but they'll still be able to beat their foot into a pulp (though it'll be harder), and it's a hell of a lot harder to club birds down than to shoot them down (insane restrictions make it harder to use the computer in the first place). The current approach seems to be to try to grab their hand every time they're about to, and say "Are you sure you want to blow your leg off?" But no one pays attention, because we do that anyway when they are shooting in the right direction (UAC being annoying), and sometimes

      --
      Don't thank God, thank a doctor!
    23. Re:This is so not serious by Anonymous Coward · · Score: 0
      Your statement is like saying a pistol you can shoot yourself in the foot with is just as dangerous as a pistol that explodes in your face. Look, it's simply not possible to make a useful handgun that you can't shoot yourself in the foot with -- by its very definition, a handgun will shoot wherever you point it, and it will always be physically possible to point it at your foot.


      Problem with this is that far too many people will inevitably (eagerly) push for the design of a gun that is "smart" and won't fire if directed towards the foot (TPM and/or DRM). As a matter of fact, I think that it's already being handed to us without thought to the possible unintended consequences (at least, by any party not already deeply interested in its creation and mis-use).
    24. Re:This is so not serious by Peter+Desnoyers · · Score: 1
      BUT...It requires root access and wont work on SELinux. This is a serious how? I mean if you have root access, then the entire system is compromised already.
      No, it *will* work on SELinux. If you can install a module, you can bypass SELinux and chroot jails. There's a moral here, although I don't think it's "change register_binfmt()". SELinux isn't designed to guard against malicious modules, and in general you can't guard against them in Linux without huge changes. In fact, malicious kernel code can just scribble over all the SELinux data structures and give everyone permission to do anything...
    25. Re:This is so not serious by SanityInAnarchy · · Score: 1

      Couple of obvious unintended consequences: It's not just the foot. DRM means the gun is designed not to fire at anything declared a "friendly" target (DRM), making it useless for law enforcement officials should the gun manufacturers themselves turn to crime. Plus, it still doesn't work: People will be able to blow their foot off now, it'll just happen a lot less often, and there's a chance that when shooting at any random object, the gun will jam and decide it's a friendly target (decide you're trying to crack the DRM).

      Die, horse, die! *flog*

      --
      Don't thank God, thank a doctor!
  6. And? Hol-e terror. by Anonymous Coward · · Score: 3, Funny

    "Yes, look for these sorts of things and find them but it's hardly worth the shock-factor of "Massive Hole Found In Linux" panic headlines."

    If I found Goatse.cx in Linux? I'd panic too.

  7. Problem: Sometimes you want to limit root. by SanityInAnarchy · · Score: 3, Interesting

    For instance, lock it away in a chroot jail.

    Solution: Don't give your chroot jail access to the binfmt filesystem. I'm not sure how this can be done, though, as root is allowed to mount pretty much whatever it wants.

    Real solution: Don't bother to compile in binfmt support. The only reason for the kernel to recognize any format other than elf or a.out is to call an interpreter to run that file with elf or a.out. Every shell I know of recognizes the shebang at the beginning of most scripts (perl/python/ruby/bash), and you generally launch programs through the shell. Most people will be running programs from the GUI, where this is even less of a problem -- for the most part, they'll be clicking on icons which contain a command like "perl /usr/bin/foo.pl" or whatever.

    However, I'd like to actually read the PDF and find out if I'm right about this. Damn Slashdotting.

    --
    Don't thank God, thank a doctor!
  8. What about other ELF systems? by Anonymous Coward · · Score: 0

    While this may not be a security risk on Linux, I need to ask, how does this affect other UNIX systems that use the ELF executable format?

    FreeBSD, OpenBSD, and NetBSD all use ELF. Solaris, SCO UnixWare, and SCO OpenServer also support ELF on the x86. Can similar attacks be launched against such systems?

    Is a system like NetBSD, which does not use dynamically loadable kernel modules, susceptible?

    1. Re:What about other ELF systems? by IWannaBeAnAC · · Score: 4, Informative
      With the caveat that I cannot RTFA as it is slashdotted, if the summary is in any way accurate then it will not affect the BSD's or Solaris. SCO I don't care about, especially as it would only affect them if they stole the relevant code from Linux in the first place.

      Linux has a feature that allows you to register a new binary format loader. Of the traditional formats, ELF is the most common, a.out is ancient, I don't think I've ever seen an a.out executable on a Linux machine). But on Linux, for example, if you wanted java programs to run automatically when you execute them then you could install a loader for java files that runs them through the interpreter/jvm.

      I don't know which other unixes have this capability, but IIRC Linux was the first so it follows that any other implementation is architecturally independent, so shouldn't share the same implementation flaws.

    2. Re:What about other ELF systems? by Tyger · · Score: 5, Informative

      I'd say this is just a specific case of inserting malicious code into a kernel level linked list. Most kernels have linked lists meant to be accessed by drivers. I've actually done something very similar in Solaris using the SVR4 STREAMS driver model. I created a STREAMS module that inserted itself into the TCP stack in such a way that it was totally invisible, but got all data and control commands passed through it. (Excpet I wasn't writing malicious code. In that case, I was hiding it from any potential hackers, as well as applications that might break if the STREAMS modules aren't loaded like they expect.) There are other places it could be inserted for malicious purposes aside from the network stack, though. (Not that the network stack isn't a bad place to be for someone who wants to do some damage, but it doesn't help with hiding rootkits. It would be more useful as a rootkit payload.)

      I'm sure BSD has a linked list that could be similarly exploited. It won't have the same capabilities as the Linux binfmt one, but it will have it's own set of things it could be used for.

      However, I agree with other users. In a monolithic kernel, once someone has root and can load kernel drivers, or even access kernel memory, all bets are off. The only possible system I can see not being exploitable in such a way would be a pure microkernel architecture with memory protection, none of which I can think of off the top of my head. Mach still has loadable modules. QNX is closer but even QNX lets you register code to be called as an ISR from the kernel, and at that point you have full access to the kernel memory, and you are even conveniently passed a pointed to some kernel data structures so you don't have to try and figure out kernel symbols.

      The point is, once you have root, there are any number of ways to compromise the system and hide your exploits. It's good to have the information about as many different ways as possible out in the open, but it's hardly alarming news that there's yet another discovered.

    3. Re:What about other ELF systems? by greyc · · Score: 1

      The point is, once you have root, there are any number of ways to compromise the system and hide your exploits.

      That's not necessarily true on recent Linux versions, or at least it isn't for the reasons that you listed. Aside from the fact that /dev/kmem and loadable modules can be disabled, even if those features are active, not all processes with UID 0 necessarily have access to them.
      For quite some time now, Linux has included support for POSIX Capabilities. The API is ugly as heck, and unfortunately there isn't any FS support (analogous to set{u,g}id flags) yet, but the basic functionality (dropping selected capabilities, changing UID without dropping capabilities) does work.
      Module (un)loading is CAP_SYS_MODULE. Ignoring file permissions is CAP_DAC_OVERRIDE. There's some other pretty critical stuff like CAP_MKNOD, but in principle it should be possible for a uid 0 process to have no special privileges whatsoever.
      Access to binfmt should not change this fact.

      Of course, in practice there probably aren't very many vanilla linux systems that rely on this at the moment. If one does want to retain only some privileges, the sound practice is to not only drop the others but also change UID; for one thing, a lot of critical files (like /etc/shadow) are still owned by uid 0 by default.

  9. Not the only one today by Aqua_boy17 · · Score: 3, Interesting

    This was forwarded by our Sec Admin tonight in case you haven't seen it: http://www.securityfocus.com/bid/20249

    --
    What if the Hokey Pokey really is what it's all about?
    1. Re:Not the only one today by Anonymous Coward · · Score: 0

      I patched OpenSSL twice last week, IIRC this was one of the things I patched. My advice, you should get yourself a new "sec-admin", someone who isn't too busy jacking-off to hentai to patch his servers!

    2. Re:Not the only one today by Anonymous Coward · · Score: 0

      IIRC this was one of the things I patched

      If you recall correctly? I think your employer needs to replace you with someone who can check his logbooks (you *do* keep a written record of all the security patches you apply and what vulerabilities they address, right?) and make damn sure his servers are up to date before flaming someone else for "jacking-off to hentai" instead of patching...

  10. Probably none. by SanityInAnarchy · · Score: 4, Informative

    Depends on the friends and the distro, but let's see. Debian prompts you to set up an ordinary user/password, as well as a root password. Gentoo does the same, only via documentation, not an installer. And Ubuntu, the distro most friends would send noob-friends to, does not set up a root password at all -- all root access on Ubuntu has to go through sudo.

    Most Windows/IE attacks don't require you to even have local access, let alone root.

    --
    Don't thank God, thank a doctor!
    1. Re:Probably none. by GigsVT · · Score: 1

      all root access on Ubuntu has to go through sudo.

      Which means you are basically running as root. If you hack the user's account, you can change their password, which also happens to be the password you type to get root access. In other words, ubuntu runs with root-equivalent access by default.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    2. Re:Probably none. by oKtosiTe · · Score: 2, Informative

      No, only the initial user account does.

    3. Re:Probably none. by FST777 · · Score: 1

      And we all know that account is never, or only rarely used...

      --
      Free beer is never free as in speech. Free speech is always free as in beer.
    4. Re:Probably none. by SanityInAnarchy · · Score: 5, Insightful

      This argument has been tried over and over again. It is prohibitively difficult to make an attack like this work.

      The only way I know of to change the user's password requires the user to type their password.

      Yes, you could use a keylogging-type attack, but sudo does make this prohibitively slow unless you really know what you're looking for. Even if you do, you still have to wait for the user to answer a sudo prompt.

      You could theoretically crack the user's password from the password hash, but this is both time consuming and impossible -- /etc/shadow is not readable by ordinary users.

      Beyond this, you could try a phishing attack -- put up your own sudo-like prompt and hope they bite -- but that's about it.

      How would you propose to remedy this situation? Do you switch to another VT or use a magic sysrq key everytime you become root?

      --
      Don't thank God, thank a doctor!
    5. Re:Probably none. by dubonbacon · · Score: 1

      In other words, ubuntu runs with root-equivalent access by default.
      Woah there. You need the user's password to change his password. You're not running as root until you give your user password to sudo. How is that different from giving your root password to a login prompt or su?

      --
      sw5YRhw4ln3pr7$Ock1/4ma0u8Lw2Tm5l6/7DOiC5e6t4NSb6T en 6g5AOCPa2Xs!MSr!p! hackerkey.com
    6. Re:Probably none. by cortana · · Score: 1

      How do you change their password?

    7. Re:Probably none. by cortana · · Score: 1

      One way to overcome the problem is to not use su or sudo. In a secure system it should never be possible for a process to increase its privilige level.

      But remember, secure systems are a pain in the arse to use.

    8. Re:Probably none. by CastrTroy · · Score: 1

      because a user may not give their user account a strong password, because it's just a user account. They may not realize that their user account password is also (effectively) the password for root.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    9. Re:Probably none. by TeraCo · · Score: 4, Funny
      but this is both time consuming and impossible

      Phew, I'm glad it's not just impossible. That might have been risky.

      --
      Not Meta-modding due to apathy.
    10. Re:Probably none. by SanityInAnarchy · · Score: 1

      Why should a secure system never allow a process to increase privileges? I think we just need a secure way to make sure the user knows exactly what's going on every time a process attempts to. For instance -- I think there's a word for this -- create an unbindable key combination, and every time you see a security prompt, press that to make sure it's valid. Or use it to enter your password. Or better -- have a completely separate UI, accessible through said unbindable key combination, so security prompts now tell you "press ctrl+alt+del, then give us access".

      And of course, not all setuid is evil. Look at passwd -- it becomes root, but it knows who you were, and exactly what areas of /etc/passwd and /etc/shadow you should be allowed to change.

      --
      Don't thank God, thank a doctor!
    11. Re:Probably none. by dubonbacon · · Score: 1

      That's true. But remember that an anonymous remote exploiter doesn't know your username either, unlike root. So |Username| can essentially be added to |password|.

      --
      sw5YRhw4ln3pr7$Ock1/4ma0u8Lw2Tm5l6/7DOiC5e6t4NSb6T en 6g5AOCPa2Xs!MSr!p! hackerkey.com
    12. Re:Probably none. by bcat24 · · Score: 2, Informative

      Werd. That's why the first thing I do when I set up a Ubuntu box is enable the root account and make sudo use the root password, not the user's password.

    13. Re:Probably none. by SanityInAnarchy · · Score: 2, Informative

      It used to be risky. Password hashes used to actually be stored in /etc/passwd, where anyone could read your password hash. If there was a weakness in the hash algorithm, or your password was particularly short, they could brute-force it that way -- hence, "time consuming".

      On most modern systems, it is also impossible, because the actual password hashes have been moved to /etc/shadow.

      If you are root, you can still attempt to brute-force them -- which would be time-consuming and almost never has a point. If you're hoping they use the same password elsewhere, you can simply install a keylogger -- which is assuming you weren't smart enough to do that when they first set their password. If you simply need access to their account, you can su in. If you need to reset their password, you can do that as root without knowing the original password.

      Which means that this whole system is about as exploitable as an "exploit" which gives you root access, but which only works if you're already root.

      --
      Don't thank God, thank a doctor!
    14. Re:Probably none. by gomoX · · Score: 1

      $ grep /bin/bash /etc/passwd

      That will narrow it quite a bit.

      --
      My english is sow-sow. Sowhat?
    15. Re:Probably none. by TeraCo · · Score: 1

      Thanks for that, however I already knew all that though, and was just making fun of the fact that he said: "In addition to it being time consuming, it's also impossible."

      --
      Not Meta-modding due to apathy.
    16. Re:Probably none. by charlieman · · Score: 1

      So why are you using ubuntu if you know this kind of thing in the first place?

    17. Re:Probably none. by Anonymous Coward · · Score: 0

      See that up there? No, higher. Yeah, that's the joke flying about 20 feet over your head.

    18. Re:Probably none. by BJH · · Score: 1, Funny

      That already exists on Linux - the key combo is Ctrl+Alt+Backspace. You will be presented with an prompt for your username and password which cannot be replicated in the standard user interface.

    19. Re:Probably none. by cafucu · · Score: 1

      You assume much. Let's see, to take advantage of this weakness, you first have to hack the user account. Then you have to capture the user's password, change it without being noticed, and only then can you exploit the binary format weakness. How is this at all relevant???

      It's like saying you could break into the president's personal safe because you know the combo. All you have to do is get past the armed guards, motion sensors, attack dogs, and laser-armed sharks. After that it's a piece of cake...

      --
      :%s:work:/.:g
    20. Re:Probably none. by dubonbacon · · Score: 1

      Hello world, I'm dumb.

      --
      sw5YRhw4ln3pr7$Ock1/4ma0u8Lw2Tm5l6/7DOiC5e6t4NSb6T en 6g5AOCPa2Xs!MSr!p! hackerkey.com
    21. Re:Probably none. by cafucu · · Score: 1

      This implies that you already have access to the system. How did you get that?

      $ grep "account access" /dev/null

      ???

      --
      :%s:work:/.:g
    22. Re:Probably none. by painQuin · · Score: 1

      no no no, they aren't a pain to use. they are a pain to -admin- from a user account.
      which is something most home users want to do quite frequently.

      but if you considered linux from a corporate perspective, what average user would ever have need to escalate permissions?
      if a piece of software needs to be installed, the administrator can log in and install that software without the machine even hiccuping, in most cases. and so on.

      --
      A guilty conscience means at least you've got one.
    23. Re:Probably none. by Schraegstrichpunkt · · Score: 1

      Anyone who can use ptrace or who can connect to your X session can probably sniff whatever password you happen to type.

    24. Re:Probably none. by Schraegstrichpunkt · · Score: 1

      Twice-pressing the "Power" button on your UPS does too. That doesn't make it useful.

    25. Re:Probably none. by toadlife · · Score: 1

      You've just decribed UAC in Windows Vista.

      --
      I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
    26. Re:Probably none. by DanielNS84 · · Score: 1

      As a gentoo user, I find this beyond hilarious.

    27. Re:Probably none. by Achromatic1978 · · Score: 1
      You should just have borrowed from Ocean's Eleven:

      Saul: I have a question, say we get into the cage, and through the security doors there and down the elevator we can't move, and past the guards with the guns, and into the vault we can't open...
      Rusty: Without being seen by the cameras.
      Danny: Oh yeah, sorry, I forgot to mention that.
      Saul: Yeah well, say we do all that... uh... we're just supposed to walk out of there with $150,000,000 in cash on us, without getting stopped?
      [pause as everyone turns to look at Danny]
      Danny: Yeah.
      Saul: Oh. Okay.
    28. Re:Probably none. by smash · · Score: 1
      It used to be risky. Password hashes used to actually be stored in /etc/passwd, where anyone could read your password hash. If there was a weakness in the hash algorithm, or your password was particularly short, they could brute-force it that way -- hence, "time consuming".

      Juse in case people reading the parent don't realise... "used to be stored in /etc/password" means "used to" = about 10 years ago.

      I haven't seen a linux distribution of any repute that doesn't use password shadowing by default for about 10 years...

      Comparing that to the Windows world and you're comparing to Windows 95 (most users still on 3.1x), or Windows NT 3.x.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    29. Re:Probably none. by smash · · Score: 4, Informative
      Knowing about how linux works doesn't exclude you from the set of potential ubuntu users.

      I've adminned Linux since 1996 (1996-2001 as an ISP sysadmin, 2001-2004 for corporate mail, proxy, IPSec gateway, etc), yet most of the time these days for a desktop I install/use/recommend Kubuntu. Why? Because it just works for the most part. I've been through the rolling my own distro from scratch, building all my stuff from source games and to be honest, I have more important things to do these days :)

      Sure I'll muck around with that sort of thing from time to time, but when I just want to get work done, *ubuntu is quick and easy.

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    30. Re:Probably none. by SanityInAnarchy · · Score: 2, Informative

      This has got to be the most obnoxious thing people do on Slashdot. Yes, I got the joke. It was funny, I laughed. My comment is also actually relevant to the discussion.

      --
      Don't thank God, thank a doctor!
    31. Re:Probably none. by SanityInAnarchy · · Score: 1

      UAC does not require ctrl+alt+del, does it? I already said: unbindable key combination. Also, everything but the password dialog should be blanked out.

      As it is, UAC can probably be defeated by spawning a fake dialog, asking for a password, then using that password to gain full access -- not to mention any other services they use the same password for.

      Kind of like how running as a user is not that much more secure than running as root, if your su password can be intercepted.

      One more problem: You can't simply have the dialog go away if the password is entered correctly; there must be some sort of confirmation that the user is trained to look for, and it must be displayed (always on top). Otherwise, an app could just swoop in after the UAC dialog and tell you that you've mistyped your password.

      A simple solution for Linux would look like this: App sends request to sudo server. Sudo server alerts user through a system tray icon or other notification. User presses ctrl+alt+f8, which switches to another VT where the sudo server has launched a dialog. (Switch should be fast enough or obvious enough that an app has zero chance of winning any kind of race.) User clicks allow or deny, and the sudo server switches the user back to VT 7 and their normal X session.

      I don't think ctrl+alt+f8 can be intercepted by X apps, and I know a normal user can't switch terminals -- you have to be root for that. Thus, this would provide quick and painless escalation, without even requiring a password. The real challenge will be representing the requests accurately and simply enough that the user won't be confused.

      I don't think it is possible for any system to be secure without something that drastic to tell you you're talking to root now. Otherwise, what's to stop the program from "clicking" the "allow" button? What's to stop the program from popping a window in front of it, with some sort of control lined right up with "allow" in the UAC dialog, but the control is actually a hole in the window? I believe Windows does allow you to click through holes in oddly-shaped windows.

      --
      Don't thank God, thank a doctor!
    32. Re:Probably none. by toadlife · · Score: 1

      UAC does not require ctrl+alt+del, does it?

      No, but the little "Allow" button on the UAC prompt can only be touched by objects that alleady have "root-level" access to the system. A device, like a keyboard or mouse are examples. I don't know the technical details behind it but I've read that it the same mechanism that requires you to press crtl+alt+delete to get the logon prompt in Windows. You could probably manipulate the UAC prompt via sofwtare, but that software would already have to have the admin token to do so.

      Also, everything but the password dialog should be blanked out.

      Exactly. You cannot do ANYTHING else but answer the UAC prompt when it comes up, and only an object that allready had system access can answer it. Like I said, you've just described UAC in Vista.

      Here a link that explains exactly what UAC does in a little more detail..

      http://www.microsoft.com/technet/windowsvista/libr ary/0d75f774-8514-4c9e-ac08-4c21f5c6c2d9.mspx

      --
      I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
    33. Re:Probably none. by SanityInAnarchy · · Score: 1

      Let me apologize ahead of time for not actually trying this out first. I have a working XP, not really enough room to run both XP and Vista, my Linux would be difficult to resize, and I don't want to replace my working XP with a Vista RC that will start asking for money around when it actually becomes stable.

      the little "Allow" button on the UAC prompt can only be touched by objects that alleady have "root-level" access to the system.

      ctrl+alt+del can't be hit when you're intending to hit something else. The UAC "allow" button probably can. Specifically, if they allow a keystroke to do it (which they should -- makes it much faster), this keystroke may be hit accidently. The number of mis-sent IMs should be an indication here -- UAC box pops up while I'm IM-ing, keyboard focus switches, I accidently hit "allow" instead of "send IM".

      Another problem: How does VNC/RDP work?

      Yet another: Are apps allowed to trap the mouse? If so, couldn't an app move the cursor? Force it to stay on the "accept" button until the user clicks?

      You cannot do ANYTHING else but answer the UAC prompt when it comes up,

      From the screenshots I've seen, you can see the rest of the screen. But never mind.

      This would also allow a damned annoying DOS attack, one which may be completely unintentional. Not many apps understand this, but popping a dialog over what the user is doing, especially if you're taking keyboard focus, is extremely rude and annoying. Adium, on OS X, has this nicely worked out -- the IM window always appears under whatever I'm doing, but it sends me a Growl notification and flashes the Dock icon. This means I'll definitely notice that something needs my attention, but I don't have to address it right away.

      With UAC, this is even scarier. What if I want to Google for this particular message?

      But more importantly, UAC is not the only thing that can do that. What's to stop an app from popping up a fake UAC prompt (always on top, you can't do anything else, looks identical) and intercepting my password? What I described requires a keyboard combination that cannot be intercepted and never means anything else, and furthermore, it would clear the screen and replace it with a completely new screen -- root's (limited) desktop. Thus, I not only guarantee that nothing can "click" the button, I also guarantee that I really am being presented with the prompt I think I am -- even in the case that it does require a password. There's the added benefits of not having to answer the prompt right away, and of having a separate screen full of admin tools that will always work -- I have had the XP Task Manager be unusable in a game due to the game having changed the resolution -- give them a high priority, and they'd also be much more effective against problems like popup spamming (even though Firefox blocks them).

      I only see two advantages of UAC:

      1. It exists already, in a (sort of) usable form.
      2. It can exist on Windows.
      --
      Don't thank God, thank a doctor!
    34. Re:Probably none. by greenrd · · Score: 1

      I don't think you can ptrace another user's programs, unless you are already root. And X security is on by default.

    35. Re:Probably none. by rucs_hack · · Score: 1

      But if you're already root, then you don't need an exploit anyway do you? You're already in.

      I must admit I find these exploits that require you to be logged on as root laughable. If someone has your root pw, you're already screwed, end of story.

    36. Re:Probably none. by Tony+Hoyle · · Score: 1

      Services providing remote access to users need to do this with no interaction. It's not a good idea to force them to have the plaintext password either (as NT does, although you can bypass that with some hackery) since it means that you've got plaintext (or reversibly encrypted) passwords flying around the network.

    37. Re:Probably none. by oKtosiTe · · Score: 1

      Maybe the grandparent intended it as a joke? I'm not sure.

    38. Re:Probably none. by irc.goatse.cx+troll · · Score: 1

      Unless you run identd(common) or fingerd(admittedly antiquated).

      Most default identd configurations give out your real username, all someone has to do is repeatedly scan for common user ran stuff (like a daemon for file transfer in an IM or IRC app) and eventually you'll get a login from it.

      You can also worldlist logins. Doesn't sound successful, but considering how often I see it in my logs it has to work somewhere.

      --
      Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
    39. Re:Probably none. by SanityInAnarchy · · Score: 1

      You're absolutely correct, yet this is not what this thread is about. If you are logged in as an Ubuntu admin, but not root, they don't necessarily have your password (required to sudo to root), and there is no root password.

      --
      Don't thank God, thank a doctor!
    40. Re:Probably none. by rucs_hack · · Score: 1

      I've just installed ubuntu on a spare machine to try it out, and haven't had need for root access as yet (literally just installed what was on the cd). I must have a play with this sudo stuff.

      normally I use gentoo, there's nothing confusing there, I just su when I need it, so i don't even know if I have sudo set up.

    41. Re:Probably none. by StormReaver · · Score: 1

      "...put up your own sudo-like prompt and hope they bite..."

      Which requires your system to already be compromised in order for it to allow an intruder to compromise your system...

      This all very much amounts to a giant yawn.

    42. Re:Probably none. by torpor · · Score: 1


      Here here, me too .. I've been rolling with Linux since the days of the minix-list post, and I'm currently a Ubuntu user, having set up and built literally 100's of Linux systems over the decades .. For me, there's no reason not to do things the easy way, particularly if you've already done things the hard way, over and over again, under your own steam.

      That said, I sure do wish it were 'easier' to get my own kernel builds integrated with the Ubuntu realm .. like, if there were a much, much easier way to make 'changes to my standard Ubuntu system' fall into my own local, easily tarball'able User Repository ...

      --
      ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
    43. Re:Probably none. by Anonymous Coward · · Score: 0

      No, this only requires the user account to be compromised, which in itself doesn't give you the password. Putting up a sudo like prompt might get the user to enter his/her password, which allows you to get root priviledges if the user is set up to use sudo.

    44. Re:Probably none. by Schraegstrichpunkt · · Score: 1
      I don't think you can ptrace another user's programs, unless you are already root.

      News flash: You can ptrace your own xterms. Anybody who can run any code as you can sniff your password as you type it.

      And X security is on by default.

      What? No, it's not. The only thing that's on by default is binary access control. Once a program is authorized to use the X server, it can basically do whatever it wants, including keylogging and taking over the keyboard and mouse (ever heard of the XTEST extension?). There is a mechanism to set various X security policies so you can use untrusted X clients, but you'll have trouble even running GTK+ if you use that.

    45. Re:Probably none. by maxwell+demon · · Score: 1

      Of course it's just an irony that the file named "passwd" doesn't actually contain the passwords ...
      Another solution could have been to just make /etc/passwd unreadable by non-root, and provide the non-password information in it another way.
      An advanced trick would be a file system driver which allows the file access to be filtered for non-root users, so if you are not root, all the password hashes could simply be filtered out when reading /etc/password :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    46. Re:Probably none. by tendays · · Score: 1
      How would you propose to remedy this situation? Do you switch to another VT or use a magic sysrq key everytime you become root?

      One way (that would not solve "phishing" attacks but at least would be safe against X-level keyloggers) is to have the shell request exclusivity on the keyboard. Xterm has a "secure keyboard" option that does precisely this (ctrl-left click and then select "secure keyboard"). Now if only this option could be automatically activated for the time of a sudo/su/ssh/whatever password prompt (and be available on other virtual terminals than xterm) it would be very useful.

    47. Re:Probably none. by tehcyder · · Score: 2, Insightful
      This has got to be the most obnoxious thing people do on Slashdot
      It's not quite as bad as linking to that web page which blasts out "I'm looking at gay porn" over your speakers when your boss is wandering past, surely?
      --
      To have a right to do a thing is not at all the same as to be right in doing it
    48. Re:Probably none. by maxwell+demon · · Score: 1

      Indeed, if you are already in the user account, it should be quite easy to get the password: Just change the user's path so that your own sudo replacement comes first. Then if the user types sudo, he will silently be redirected to your sudo (which then can as silently execute the real sudo using the entered password, so he won't even notice the difference).

      Note that the same is true for any other command prompting for a password (so using su isn't any safer).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    49. Re:Probably none. by Anonymous Coward · · Score: 0

      Hmm. So, why isn't there a root-owned path override file for all users? This could ensure that vital system commands always go to the right place.

      Of course, if you have aliases to them then those could be hijacked... still, it'd be much better than nothing.

    50. Re:Probably none. by toadlife · · Score: 1
      ctrl+alt+del can't be hit when you're intending to hit something else. The UAC "allow" button probably can. Specifically, if they allow a keystroke to do it (which they should -- makes it much faster), this keystroke may be hit accidently. The number of mis-sent IMs should be an indication here -- UAC box pops up while I'm IM-ing, keyboard focus switches, I accidently hit "allow" instead of "send IM".


      You are correct that it would be possible to accidentally approve something, but you would have to hit the left arrow key (to move the focus to the allow button) followed by 'Enter'. By default, the "Cancel" button is selected on the UAC prompt, so just hitting enter would deny access to whatever program is trying to access restricted resources.

      As for RDP/VNC, like I said only objects that allready they allready have admin/system rights, so I don't see why remote access programs wouldn't be able to touch the UAC prompt. After all, RDP/VNC can send ctrl+alt+del to the machine.

      This would also allow a damned annoying DOS attack, one which may be completely unintentional. Not many apps understand this, but popping a dialog over what the user is doing, especially if you're taking keyboard focus, is extremely rude and annoying.


      I'm not sure about programs causing a DoS situation. That's an good question. As for dialogues popping up being rude and annoying, I belive that's the point. Programs that are written properly, should not write to areas that the user doesn't have access to during normal operation. This seems like such a simple concept to people like you and I, but Windows app developers still don't seem to get it. Those rude and annoying prompts might get ISV's to start writing the Windows apps properly.

      "What's to stop an app from popping up a fake UAC prompt (always on top, you can't do anything else, looks identical) and intercepting my password?"


      I can't say for certain but I don't think it's possible to produce a fake UAC prompt that behaves in the exact same way that the authetic one does. Authentic looking or not, a fake prompt put up by rougue code could certainly grab the user's password, but what would it do with that password? The rogue code couldn't type it into the UAC prompt, because it wouldn't have the admin token needed to do so. It could try to do some other action like create an account, but that would spark a UAC prompt, which it could not access because, again, it wouldn't have the neccessary rights to do so. In the end, for rogue code to get system access, the user would have to click the allmighty allow button, or type in some credentials (depending on how UAC is configured) on the UAC prompt.

      Nothing is social engineering proof. I'm sure millions of people will click that allow button in the coming years, allowing their Vista machines to be owned, but I don't think that takes away from the usefullness of UAC.
      --
      I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
    51. Re:Probably none. by SanityInAnarchy · · Score: 1

      In the case of Ubuntu, I'm pretty sure that Sudo, in this case, is called by an absolute path. Of course, there's nothing to stop them changing the path in the Synaptic menu entry...

      --
      Don't thank God, thank a doctor!
    52. Re:Probably none. by SanityInAnarchy · · Score: 1
      You are correct that it would be possible to accidentally approve something, but you would have to hit the left arrow key (to move the focus to the allow button) followed by 'Enter'. By default, the "Cancel" button is selected on the UAC prompt, so just hitting enter would deny access to whatever program is trying to access restricted resources.

      So it's not a security flaw, just a UI flaw. I don't want to hit "cancel" by default either. In fact, I don't want to hit anything by default. I want to have to acknowledge that I'm going to actually pay attention to UAC now.

      As for dialogues popping up being rude and annoying, I belive that's the point. Programs that are written properly, should not write to areas that the user doesn't have access to during normal operation.

      Let's try this: automatic updates automatically prompts me that it's time to download something. It interrupts what I'm doing, but I go ahead and click ok anyway. Then automatic updates finishes a download, and it's time to start installing. Automatic updates prompts me again for my password.

      OS X updates already do this, but rather than pop over what I'm doing, they pop a dialog under what I'm doing, and bounce the dock icon. Unless you're extremely sloppy/lazy and have some 30 or 40 dock icons, all set to autohide, at least 5 of them bouncing at any given time, bouncing the dock icon is a good way to alert the user that something needs to happen. On Windows, the rough equivalent is flashing the pager button (where things minimize to). Making a new taskbar icon (by the clock, as Windows Update does now) is not a good way, because most people don't know what those are, and there's nothing to suggest that this particular one is demanding your attention.

      And popping something up in front of the user is bad enough, but blocking out all other action is just obnoxious, because if you've used Ubuntu or OS X for long, you know that there are plenty of things that can and should require a UAC-like password prompt. If I was developing a Windows app, this would make me put an "are you sure" box in front of every time my program might trip a UAC prompt, so users know they're about to lose control of their computer -- and that's just a retarded design. Come on, an "are you sure" box in front of an "are you sure" box?

      Anyway, making the box less annoying doesn't make it less likely that people will start developing their apps properly.

      I can't say for certain but I don't think it's possible to produce a fake UAC prompt that behaves in the exact same way that the authetic one does. Authentic looking or not, a fake prompt put up by rougue code could certainly grab the user's password, but what would it do with that password?

      Let's see:

      • Login to localhost with RDP, FTP, Samba, VNC, or some other service
      • Invoke runas, or some other setuid-like or sudo-like app. Or does absolutely everything have to go through UAC? Does runas actually throw up a GUI UAC prompt?
      • Email the password to someone who'd have a use for it, such as:
        • Logging in physically -- your roommate, or maybe it's a public terminal
        • Trying your password elsewhere, in case you use the same password for your email, your internet bank, whatever

      I don't think absolutely every attempt to gain higher local privileges requires the almighty Allow button. If it does, that's pretty annoying -- it prevents ssh from working very well, for one thing.

      --
      Don't thank God, thank a doctor!
    53. Re:Probably none. by SanityInAnarchy · · Score: 1

      First, is this whole process secure? For instance, what's to stop something from implementing ctrl-left-click and providing their own menu, where "secure keyboard" does nothing? But more importantly:

      Now if only this option could be automatically activated for the time of a sudo/su/ssh/whatever password prompt (and be available on other virtual terminals than xterm) it would be very useful.

      And what happens when they're already doing a MITM on your xterm? I know that sudo/su/ssh/whatever generally automatically force to read from a terminal, but that's not enough -- you can run them from inside screen, which proves another app can provide a "terminal" device between them and you, and once you have the password, you should be able to find some way, somehow, to grant yourself root through some command that doesn't force xterm exclusivity.

      That brings up another point -- it's not just X-level keyloggers we have to worry about. Screen is proof of how easy it would be to implement a PTY-level keylogger.

      --
      Don't thank God, thank a doctor!
    54. Re:Probably none. by toadlife · · Score: 1

      Now you're just nitpicking. The purpose of post was to remark that a system extremely similar to the idea you described had allready been implimented in Windows Vista. I'll leave it at that.

      --
      I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
    55. Re:Probably none. by SanityInAnarchy · · Score: 1

      I was aware of Windows Vista when I described my system. And in security, "nitpicking" is a good thing. You can't just say "po-tay-toe, po-tah-toe", when it comes to, say, rsh vs ssh.

      Thanks for clarifying, though. I'm surprised they were that thorough.

      --
      Don't thank God, thank a doctor!
    56. Re:Probably none. by tendays · · Score: 1

      You are right - I was only mentionning one solution to one problem - X-level keyloggers. Running a keylogger is easy and only requires the user's priviledges. Replacing/highjacking xterm or bash is more difficult. Assuming you are running the real xterm, ctrl-clicking is sent to the terminal emulator - the shell/program running in it can't intercept it.

      So to be even safer you could make sure (by storing desktop configuration in a place not writable by the every day user) that opening an xterm really runs /usr/bin/xterm /bin/sh.
      Then you'd also have to make sure that typing "su" really runs /bin/su and not /tmp/backdoored-su. And so on.

      Anyway my point was not to provide a complete answer to securing password entry. However I think that that feature letting a window (and therefore a process) getting exclusive access to keyboard input is key to achieving that, and tends to be ignored too much (I only know of gpg-agent's passphrase entry agent, xterm and screensavers doing that. For instance kde password dialogs and virtual terminals don't)

    57. Re:Probably none. by vexx0 · · Score: 1

      Except to change your password you have to know the old one.

  11. Mirror by paulproteus · · Score: 4, Informative
    --
    |/usr/games/fortune
    1. Re:Mirror by Anonymous Coward · · Score: 0

      Well you thought you did? hmmm, what's that smell?.. ah, smouldering silicone :)

    2. Re:Mirror by maxwell+demon · · Score: 1

      Well, if it's only the silicone which smoulders, it's not that bad. Only when the silicon starts smouldering, your server is in real trouble. :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
  12. They'll fix it. by SanityInAnarchy · · Score: 4, Interesting

    They'll fix it out of pride, and because it's the right way to do it. That's assuming this is actually a flaw -- a buffer overrun or something. For instance, if it's some retard saying "Oh cool, I can install a rootkit by changing a couple of bits here in /dev/kmem", then no, they won't fix it. But if it only requires access to, say, the binfmt_misc filesystem, then it is a bug.

    And it's important to remember things like this when you see Symantec, Microsoft, and others trying to spread FUD about Linux security. If anyone cares about this bug at all, even just as a matter of keeping the code neat, it will be fixed -- but it will also drive up the numbers of "Linux exploits patched recently". Always, always, always look at the relative severity of the exploits.

    --
    Don't thank God, thank a doctor!
    1. Re:They'll fix it. by Tyger · · Score: 1

      It wouldn't be just "changing a couple bits here in /dev/kmem", but from the summary (Still waiting on the article) it sounds like it is pretty close. It could potentially be "fixed" by changing how things are handled (Again, still waiting on the article) but there are so many ways a system can be compromised if someone has kernel level access.

    2. Re:They'll fix it. by iburrell · · Score: 1

      It is not a buffer overrun. It is somebody noticing that binfmt handlers are inserted at the beginning of the handler list. Well, if somebody can add a kernel module, they can do much worse than add a binfmt handler. They have complete control of the kernel.

    3. Re:They'll fix it. by SanityInAnarchy · · Score: 1

      My copy of TFA won't be done downloading for another 15 mins, so I'll take your word for it. Just checking, though: Does this exploit require you to be able to insert a custom module? Or does it simply require binfmt_misc?

      If it's an "exploit" resulting from inserting a custom module, then I doubt anyone will change anything, because this is not a vulnerability.

      --
      Don't thank God, thank a doctor!
    4. Re:They'll fix it. by Chrax · · Score: 1

      Yes. It requires module insertion. It's nothing terribly special.

      It took me over an hour to download, so for the next day or so (or if the writers insist I take it down), I'll be hosting this file at: http://effigies.ath.cx:85/~chris/binfmt-en.pdf

    5. Re:They'll fix it. by maxwell+demon · · Score: 1

      Indeed, as soon as you are root, making the system do whatever you want doesn't take more than changing the lilo or grub configuration to boot your own kernel, and then causing the system to reboot. After the reboot, no security features from the old kernel will have any effect.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  13. simply by Anonymous Coward · · Score: 5, Funny

    simply linked list

    As opposed to difficultly linked lists?

    1. Re:simply by Penguinoflight · · Score: 4, Informative

      Most CS types would say that SLL is Singly Linked List. The construct allows for references to next, but not to previous.

      --
      "And we have seen and do testify that the Father sent the Son to be the Savior of the World"
      1 John 4:14
  14. Simply? by hey · · Score: 3

    Do they mean "singly" instead of "simply"?

    1. Re:Simply? by czehp · · Score: 1

      I'm pretty sure simply and singly are both acceptable but it's been a while since data structures.

  15. Compile Options by mistralol · · Score: 1


    Isnt there an option to prevent the loading of modules ?
    Would this not remove the list from the kernel.

    Oh wait if i am root i can just recompile the kernel with the option on again !

    1. Re:Compile Options by EmbeddedJanitor · · Score: 1

      You can turn off module support and build static kernel. The list is for for managing the exe handlers. Removing the module support would just prevent the list from being hijacked, not remove the list itself.

      --
      Engineering is the art of compromise.
    2. Re:Compile Options by Tyger · · Score: 1

      Technically, if someone could get the kernel symbol table, they could still locate the list and hijack it, creating their own module loader.

    3. Re:Compile Options by EmbeddedJanitor · · Score: 1

      That would require being able to reboot etc.... May as well just be lazy and build a new kernel from scratch.

      --
      Engineering is the art of compromise.
    4. Re:Compile Options by Tyger · · Score: 2, Interesting

      It wouldn't require a reboot any more than Windows viruses require a reboot to start their infection. Just because the kernel is fully monolithic and does not have loadable kernel modules does not mean you can't change it. If you have access to /dev/kmem, you can still open it up and modify kernel data structures and insert code into kernel memory yourself. (In fact, IIRC, that's exactly how the original implementation of LKM for Linux worked.)

    5. Re:Compile Options by EmbeddedJanitor · · Score: 1

      Right, but that assumes you leave /dev/kmem open which would be a dumb thing to do.

      --
      Engineering is the art of compromise.
    6. Re:Compile Options by Tyger · · Score: 1

      If by "open" you mean world accessible, hardly. The whole point is about root being able to do this, not normal users.

      If kmem isn't even available, there are other ways to get to kernel memory, they just aren't as easy.

  16. proof reading by Anonymous Coward · · Score: 0

    Perhaps it is surprising for more than one to know than kernel is the one in charge to recognize the different binary types exiting in the system, identifying them with the first 4 (four) bytes of the file.

    WTF? Who proof reads these things?

    1. Re:proof reading by mevets · · Score: 1

      all your elf are belong to us....

  17. You'd really panic if you saw by Anonymous Coward · · Score: 0

    the french version.

    Mod -1 offtopic +1 funny -BIGNUM gross

  18. Weakness In Linux Kernel's Binary Format by nick_davison · · Score: 5, Funny

    A weakness in the binary format? OK, who's to blame here, the ones or the zeroes?

    You'd have thought they'd have caught this sooner. It's not like it's that long of a list to exhaustively test.

    1. Re:Weakness In Linux Kernel's Binary Format by Nahor · · Score: 1

      A weakness in the binary format? OK, who's to blame here, the ones or the zeroes?

      You'd have thought they'd have caught this sooner. It's not like it's that long of a list to exhaustively test.

      I found a weakness in your brain. Who is to blame, the As, Cs, Gs or Ts?

      You'd have thought your parents would have caught this sooner. It's not like it's that long of a list to exhaustively test.

      Sorry, I couldn't resist :)

    2. Re:Weakness In Linux Kernel's Binary Format by a.d.trick · · Score: 2, Funny

      It's not the individual 1's and 0's. It's when they get together that you start to see problems. You wouldn't believe the horrible things that can happen when you get a horde of 1's and 0's together.

    3. Re:Weakness In Linux Kernel's Binary Format by eggoeater · · Score: 2, Funny

      Binary! BAH!!

      I've always said if you want a secure kernal, you code it in analog format.

    4. Re:Weakness In Linux Kernel's Binary Format by Ruie · · Score: 1
      A weakness in the binary format? OK, who's to blame here, the ones or the zeroes?

      You'd have thought they'd have caught this sooner. It's not like it's that long of a list to exhaustively test.

      Actually it is a binary flood attack: when one issues a command su followed by a stream of ones and zeroes (different for each system, but usually about 64 bit long) one can get root access.

    5. Re:Weakness In Linux Kernel's Binary Format by jZnat · · Score: 1

      I don't know about you, but I tend to use passwords larger than 8 characters for root... ;p

      --
      'Yes, firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
    6. Re:Weakness In Linux Kernel's Binary Format by cryptoluddite · · Score: 1

      Remember this is linux, so it's either the GNU/ones or the GNU/zeroes that are at fault.

    7. Re:Weakness In Linux Kernel's Binary Format by LocalH · · Score: 1

      Those damn things are insatiable. Have you ever seen a 1 that's starved for 0s? It's not a pretty sight, let me tell you... 0s don't seem to have any problem without 1s, oddly enough.

      --
      FC Closer
    8. Re:Weakness In Linux Kernel's Binary Format by Fujisawa+Sensei · · Score: 1

      You you're saying its a conspiracy of 1's and 0's.

      --
      If someone is passing you on the right, you are an asshole for driving in the wrong lane.
    9. Re:Weakness In Linux Kernel's Binary Format by maxwell+demon · · Score: 1

      Well, I considered that password, too, but then I decided to save me some typing and used ">8chars" instead.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  19. And, Who do You Trust? by twitter · · Score: 1

    The reports says itself that you have to be root to exploit it. It's already game-over. Yes, look for these sorts of things and find them but it's hardly worth the shock-factor of "Massive Hole Found In Linux" panic headlines.

    This will make you think twice before installing non free software on your nice free system. You should already think twice about it because of all the advantages free software has, but every now and then you run into a device driver or game you want. If the computer is just a toy anyway, it does not matter, but it the computer is what you use for email, records keeping and research you should be careful. Anything you have to install as root that you or a package maintainer can't inspect should be assumed bad for security. Yeah, I know, you were in trouble before this little "exploit" but it's good to reamember why you should worry in the first place.

    To get around the device problem, I do a little research up front and take it back if things don't work out. I refuse to torture myself with things like ndis wrappers to run a network card when there lots of others that work out of the box. Few non free programs besides accelerated graphics drivers have given me anything worth while.

    --

    Friends don't help friends install M$ junk.

    1. Re:And, Who do You Trust? by Anonymous Coward · · Score: 0

      I'd rather trust nVidia than some random guy's compile. Even if we have access to the source code for open projects, most people download binaries off of some web site to install. But then, even if you did compile everything yourself, I'm sure you didn't go trhough all the code to audit it.

  20. This is not limited to executable handlers. by EmbeddedJanitor · · Score: 1
    You could do just about anything you want via modules, including installing all kind of nasties via the reported mechanism, or by installing a nasty file system, driver, whatever. For example, you could write a "file system" or "device driver" that allows tou to write in other modules etc from user space.

    Basically loadable modules are an obvious "back door" and hardly a security flaw if managed properly. If you're going to hand out module loading access you're going to get it where you deserve!

    --
    Engineering is the art of compromise.
  21. Re:Problem: Sometimes you want to limit root. by Anonymous Coward · · Score: 0

    There are patches to limit root powers. RSBAC is the most up to date i think, one of its security moduels can set root privledges for users and programs, if you set it on root itself, it has the effect of limiting roots powers. Its mostly good for desktop systems that might require some programs (nmap, say) to have root abilities, but only requires some abilities, better then running sudo i would think

  22. Re:Problem: Sometimes you want to limit root. by Anonymous Coward · · Score: 0

    1) You cannot chroot root and get the expected result, for the exact reason you specified.
    2) The shell doesn't interpret shebang, the kernel does.

  23. Nice catch! by shrapnull · · Score: 2, Insightful

    Whether this is a show-stopper or not, it's a great example of what can happen with tons of eyeballs on a project. This is the type of bug that proprietary vendors would suffer to discover with such limited resources on a single project. It makes me wonder how often proprietary kernels are retooled *after* a flaw has been found in a similar OSS product.

    --
    If you're half as beautiful naked, you'd be 4 times as beautiful with twice as many clothes on.
    1. Re:Nice catch! by Anonymous Coward · · Score: 1, Insightful

      This is not a bug. It is not, in any way, a weakness. It works as designed. The original article is an embarrassment. I can't believe people are taking this seriously. It would have been an appropriate joke for April 1st.

    2. Re:Nice catch! by tricorn · · Score: 1

      a) it's not a show stopper, and b) it isn't even really a bug. Although doing it a different way is arguably slightly more correct, it also removes capability. Given that at the level this is being done, the code can do pretty much anything it wants anyway, the security implications of doing it one way or the other are pretty much nil. It is good to note that this is one way of modifying the behavior of the kernel that some security kits may not check for, however.

      Their fix doesn't even make this more secure. Something that can load a binary format handler and have it register itself can easily find ways to patch that linked list directly. For example, it can find the symbol *formats* in many possible ways: by looking in the boot image; by looking in /proc/kallsyms, by looking for the system map in various places; there's a non-local variable "core_uses_pid", which is the variable just before it in memory, that it can link to. It can verify that it found the correct location by registering it normally, then verify that the suspected location actually does link to its handler structure. It could even look in the code of the register routine to find a likely pointer to it.

  24. Root inside of a chroot jail is insecure anyways. by Anonymous Coward · · Score: 0

    There are numerious ways for root to break out of chroot jail. It's simply not good enough.

    So trying to limit root by chroot is a fools errand.

    What would be more interesting is how does this 'vunerability' apply to 'container' style things?

    If I get root in OpenVZ or Linux Vservers can I use this to attack the host system?

  25. Re:Problem: Sometimes you want to limit root. by cortana · · Score: 2, Informative

    FYI, I believe it is the kernel itself that interprets the #!(interpreter)\n at the start of a file, not the shell.

    But anyway... I don't think you can constrain root with chroot(2) anyway. root can mknod(2) himself a device file and access your filesystems directly if he wants. Or he can do the same for one of the mem(4) devices. Or call ioperm(2) and talk to hardware devices with iopl(2). There are probably dozens of other methods to escape from such a 'jail'.

  26. Disable modules by DeathAndTaxes · · Score: 2, Interesting

    Yeah, a good while back, there was discussion about the possibility of inserting malicious kernel modules to take over a system. About that time I decided that all my linux servers would have modules disabled. I'm already an advocate of simply compiling support for hardware directly into the kernel (instead of as modules), but I just started taking it to another level. Sure, it means sometimes that you have to restart a system to gain new functionality, but that's much better than the risk of getting owned by some kernel module. ;-)

  27. nothing more than bug&patch by Anonymous Coward · · Score: 0

    Find bug, patch it and write 16 page article about weakness in Linux Kernel...

  28. sudo - unclear on the concept by poopie · · Score: 1
    hat's why the first thing I do when I set up a Ubuntu box is enable the root account and make sudo use the root password, not the user's password.

    lemme guess, you run "sudo -u root su -"?
    1. Re:sudo - unclear on the concept by bcat24 · · Score: 1
      That's why the first thing I do when I set up a Ubuntu box is enable the root account and make sudo use the root password, not the user's password.
      lemme guess, you run "sudo -u root su -"?
      Heh, not quite. Here's what works for me.

      1. sudo passwd # set a root password
      2. sudo visudo # add "rootpw" to the "Defaults" line

      PS: "sudo -s" is enough to get a root shell.
    2. Re:sudo - unclear on the concept by BrokenHalo · · Score: 1

      ... or simply "sudo su".

  29. Pointless by ZxCv · · Score: 4, Insightful

    .... but that's much better than the risk of getting owned by some kernel module. ;-)

    If someone is loading kernel modules on your machine, you've already been owned.

    --

    Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
    1. Re:Pointless by smash · · Score: 1
      IANASE (i am not a security expert), however I *believe* the issue is that an exploit using this method does not need to refer to the syscall table, and the code required to inject to modify a linked list in memory is much smaller (and therefore easier to inject) than traditional exploit code (can't rtfpdf as the site is currentl slashdotted)

      Perhaps it would be an idea for Linux to adopt something similar to the FreeBSD securelevel system, whereby you can configure a server to disallow modification of kernel memory, etc even by root?

      Again, IANASE so its possible i'm on the wrong track here...

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
    2. Re:Pointless by Anonymous Coward · · Score: 0
      Perhaps it would be an idea for Linux to adopt something similar to the FreeBSD securelevel system, whereby you can configure a server to disallow modification of kernel memory, etc even by root?

      That's not really necessary.
      • Disable loadable modules on your servers.
      • Jail your network services.
      • Put the jail on a filesystem mounted with the "nodev" mount option so that /dev/kmem type stuff can't be used.

      If your network service needs to use specific devices (e.g. /dev/null, /dev/zero, /dev/urandom), set up fifos to connect only the device files it needs.

      Oh, and securelevels aren't necessarily a good thing.
      http://www.undeadly.org/cgi?action=article&sid=200 60119131526&mode=expanded
    3. Re:Pointless by mennucc1 · · Score: 1

      indeed there is plenty of kernel modules that may rootkit your system hard: they hide themselves, hide selected files from the FS, redirect commands, can give root privileges. can execute commands sent from a remote host. If someone can install modules in the kernel , then security is skrwd. (std-disclaimer: I did not RTFA)

    4. Re:Pointless by Anonymous Coward · · Score: 0

      No. There are two kinds of attacks. Data comes from outside:

      1. Continouus data flow (for instance, buffer overflow in mplayer, infected porn clips)
      2. Rare data flow (for instance you download the source code of emacs from a compromised
            host. The source code contains malicious code in "make install")

      If you suffer from (1), your screwed anyway.
      Now (2) is possible. One can forge such bad data and get an execute-once chance. And in this case modules ARE bad because you can use bad modules to undo SELinux and other protections and eventually open up a (1) system.

      Security expertise. Visit our site: http://goatse.cx/

    5. Re:Pointless by smash · · Score: 1
      I didn't claim securelevels are the solution to all security problems :)

      They are, however an additional line of defense... that in some circumstances may be useful. It's no good jailing all your network services for example, if they require access to the root filesystem (eg, remote admin via ssh?)

      --
      I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  30. How come... by linguizic · · Score: 1

    How come every story that I find interesting gets tagged fud, notfud?

    --
    Does this sig remind you of Agatha Christie?
    1. Re:How come... by level_headed_midwest · · Score: 1
      How come every story that I find interesting gets tagged fud, notfud?


      It's political season. Whatever one person says another has to say the opposite just because.
      --
      Just "gittin-r-done," day after day.
    2. Re:How come... by BertieBaggio · · Score: 2, Informative

      Because people don't know the correct tags. It should be:

      > fud, !fud

      Quoth the FAQ:

      For the opposite of a tag, prefix it with "!", e.g. "!funny" means unfunny.
      --
      If all you have is a grenade, pretty soon every problem looks like a foxhole -- MightyYar
  31. Securing a System from "Root". . . by WhiteWolf666 · · Score: 2, Interesting

    . . . .is like securing a system from "real-life" hardware access.

    It makes little to no sense.

    Root-level "hacks" are an oxymoron. Once you're root, the skies the limit. Why bother just tinkering with kernel modules when you can just replace the whole kit-n-kaboodle?

    --
    WhiteWolf666 an exBush supporter. All you new-school,compassionate,save the children Republicans can rot in hell
    1. Re:Securing a System from "Root". . . by Anonymous Coward · · Score: 0

      yep, if i had the keys to a house i'd try to secretly break in. oh well, people gotta make up news worthy news somehow i guess.

  32. Do I care? Not really by Ice+Wewe · · Score: 2, Insightful

    Who cares? Frankly, 2.0 has been around for about 10 years. Which, in tech years, is a freakin long time. This is easy to remember because an MKLinux server on the network runs 2.0, which was built in 1997. I don't recall any major rootkit problems in the past decade. So, if nothing major has happened in the last ten years targeting this particular flaw, then why do we lose sleep over it now? I'm not gonna worry about it. What I am gonna worry about is the new call structure in 2.6.17 that's messed everyone up.

  33. MOD PARENT UP by Anonymous Coward · · Score: 0

    Also, /dev/kmem

  34. Old Navy Joke (I think) by NotQuiteReal · · Score: 1
    Heh, the quote that comes to mind is "The difficult we do today; the impossible takes a little longer."

    Attributed to the Seabees - the Navy construction guys - usually civil engineers.

    --
    This issue is a bit more complicated than you think.
  35. Have modpoints, can't find an intelligent comment by mr_tenor · · Score: 3, Informative
    Why bother just tinkering with kernel modules when you can just replace the whole kit-n-kaboodle?


    Because it's damn hard! Nobody here seems to realise that the point of this paper is (I'm guessing) that there's yet another neat way to code up an exploit "without depending on the sys_call_table[]" - it's in the damn title.

    If you know anything about the topic, which I guess most people who've commented don't, then it's near trivial for an attacker to write code to do unauthorised stuff if they have the address of the symbol sys_call_table, but that's been removed to make life harded for shellcoders.

    And "having root" doesn't mean an attacker sits down at an xterm with a root account, it might mean that he can remotely trick some system service into running 24 bytes of instructions as root or something. So stop being so dismissive of this sort of research.
  36. Why "exploit" if you're already in? by KidSock · · Score: 2, Insightful

    If this requires inserting a kernel module, a kernel module has as much privledge as the kernel itself so why would anyone bother with "exploiting" some kind of flaw. This seems like opening a door with a key and then kicking it down from the inside.

  37. All kernels? by ComputerSlicer23 · · Score: 1
    What you mean those of use still running the last of the 1.2 series aren't running Linux... I knew there was a reason not to trust that new fangled stuff they've been adding to my perfectly fine kernel... *grin*.


    I long for the days of yore when 1.2 was the kernel of choice. It was an easier time, I could actually understand most of the kernel config options back then...


    Kirby

  38. I think I even saw a... by Mateorabi · · Score: 1

    I blame the twos.

    --
    "You saved 1968." - Ms. Valerie Pringle to the crew of Apollo 8

  39. Linked List by certain+death · · Score: 1

    Linked Lists have been touted as bad for years by Main Frame types. They (Main Frame techy types) have insisted for YEARS that linked lists not be used for the exact same reasons. Just so you know, I am not really a main frame type techy person, I just have worked with alot of them getting software installed on the big iron, and when I first tryed to implement a piece of software using linked lists, they smashed me like the "Small Computer" person I am :o)

    --
    "My immediate reaction is "WTF? What kind of moron doesn't make things 64-bit safe to begin with?" Linus
    1. Re:Linked List by Anonymous Coward · · Score: 0

      Linked lists are bad because people make mistakes traversing them? Programmers make mistakes with lots of things.

  40. 0ptyx wins again by Dogun · · Score: 1

    I remember back at Defcon 9, a blue haired guy named 0ptyx was presenting something he called "Kernel Intrustion System" (KIS). It was a ridiculously cool rootkit.

    During his talk he mentioned a topic that hasn't really been jumped all over by a lot of people since then: signing kernel modules. If nothing else illustrates that
    it's a good idea, I hope this does.

    1. Re:0ptyx wins again by julesh · · Score: 1

      During his talk he mentioned a topic that hasn't really been jumped all over by a lot of people since then: signing kernel modules. If nothing else illustrates that
      it's a good idea, I hope this does.


      How would that work? Presumably the private key would need to be stored in the /usr/src/linux-x.x.x dir somewhere, so why couldn't the rootkit installer just fish it out of there and sign their own module...?

    2. Re:0ptyx wins again by Dogun · · Score: 1

      You'd be supplying the key or passphrase for the signature, ideally.

      The point is to make it hard to insert an untrusted module into the kernel without building a new one.

  41. Ok, it makes sense now by Schraegstrichpunkt · · Score: 1

    The (sub?)title of the article is "Polluting sys_execve() in kernel space without depending on the sys_call_table[]". The idea is that if you're auditing Linux, this is a problem, because it introduces another way to hook into sys_execve() without modifying the syscall table. If you put the kernel into ROM, then you might otherwise be able to assert that execve() can't be messed with, given certain conditions. This bug renders that assertion invalid.

    But yeah, it's not exactly something that sysadmins need to get up at 1AM to patch their systems for.

  42. Nothing to see here, move along! by Lost+Found · · Score: 5, Insightful

    As the first person who replied to this announcement in LKML, I will certify that this "weakness" is pretty silly. Here's what the claim is:

    1. You must be root
    2. You must be able to load an arbitrary kernel module
    3. You write an arbitrary kernel module that calls a kernel function to install yourself as an "binfmt handler"
    4. That kernel module is put on the _front_ of the list instead of the _end_
    5. Every program that runs now ends up calling your "binfmt handler" first

    Their solution:

    1. Put it on the _end_ of the list instead of the _front_ when it registers itself, that way it only runs if the binfmt cannot be identified...

    This is literally just as stupid as discovering that you can call fork() and exec() with an argv of "/bin/rm", "-rf", "*". Oh no, everyone must patch their systems! Seriously, anyone who can load an arbitrary kernel module could technically do _anything_, including replace the whole kernel image from the inside out!

    1. Re:Nothing to see here, move along! by Dogun · · Score: 2, Informative

      Really? '*'? You're quite sure about that?

    2. Re:Nothing to see here, move along! by DragonTHC · · Score: 1

      if you must be root, then it's not a weakness.

      root is the be all end all.

      --
      They're using their grammar skills there.
    3. Re:Nothing to see here, move along! by Anonymous Coward · · Score: 0

      For those of you who don't get this, '*' is generally processed by your shell. Since there's no shell here...

  43. My first SCO experience by CustomDesigned · · Score: 1

    As part of my sales pitch when convincing our company to start developing for unix, I explained that ordinary users can't remove system files. To demonstrate, I logged in to the newly installed SCO Xenix console, and logged in as a user. Then I did "rm -r /". I confidently explained that only that users files would get borked, and that was why all the "permission denied" errors were appearing. "What errors?" the boss asked. To my consternation, there were no errors, and after a few minutes, the shell prompt came back. But the filesystem was empty. How could that be? Several hours later, after reinstalling from diskette, I found the answer. SCO distributed their system with all files and directories set to rw/rwx. Everything.

  44. Kernel debugging? by Kadin2048 · · Score: 1

    The only valid reason I can think of for wanting to read the kernel memory is to debug or otherwise inspect the state of the running kernel. Write access might be useful for some testing purposes, e.g. to create a particularly complex scenario and see what happens when it is allowed to run.

    That is really of interest only to kernel hackers; it's certainly not something that Joe User needs to ever do. I assume that people doing work on the kernel have ways of debugging it and monitoring its memoryspace that gets around it's built in protections, or can just run the whole thing inside a VM where they can monitor all of its inputs and outputs directly.

    Other than that I agree with you, there's no good reason even for root to be meddling about in there. However, I do understand that people who are used the "UNIX way" may balk at that philosophically; if you're used to the theory that root is God and root can do anything they want to any part of the system, it's a little off-putting to be told that anything is off-limits, even if it is "for your own good."

    --
    "Ladies and gentlemen, my killbot features Lotus Notes and a machine gun. It is the finest available."
  45. That's an insightful question by Beryllium+Sphere(tm) · · Score: 3, Insightful

    >How would you propose to remedy this situation? Do you switch to another VT or use a magic sysrq key everytime you become root?

    Also known as the "trusted path" problem.

    Everyone ridiculed the idea of pressing control-alt-delete to log in (and it is pretty funny), but it addressed a real problem. Once you pressed the "secure attention sequence", you had a theoretical guarantee that a phishing program wouldn't have the keyboard focus. Ctrl-Alt-Del was the "magic sysrq key".

    There's another kind of attack, too. A typical sudo configuration only prompts you for a password once then lets you sudo without a password for 5 minutes or so. So imagine a background process that waits for a sudo command to be entered and then issues its own "sudo su" or "sudo sh". Or that skips the waiting and just issues one every five minutes until it gets lucky someday.

    Not that I'm *paranoid* or anything.

    1. Re:That's an insightful question by SanityInAnarchy · · Score: 1

      Keep the ctrl+alt+del (or similar), maybe switch to another VT (or find something equivalent under the same X server -- workspaces/desktops aren't secure enough), and lose the password. Prompt the user every time. It might even be simpler to launch configuration apps, like synaptic, on the separate "admin VT", so that no confirmation is required, just close it and switch back when you're done.

      Now, pressing ctrl+alt+del to login from a cold boot still seems stupid, because if they can screw up your login prompt, they already have root -- hell, what's to stop them from modifying the system itself, so that ctrl+alt+del goes to them?

      --
      Don't thank God, thank a doctor!
    2. Re:That's an insightful question by maxwell+demon · · Score: 1

      I guess the idea is that when you come to the machine, but didn't boot it up yourself, you cannot know if the login screen you see is really the one which showed up directly after booting, or if the person booting the computer also logged in and provided his own version afterwards (but before you came).

      --
      The Tao of math: The numbers you can count are not the real numbers.
    3. Re:That's an insightful question by Anonymous Coward · · Score: 0

      Yeah, well it's not *that* insecure. You can't run sudo if it's not from a tty (so the background daemon idea can't work), and anyway a typical sudo installation only allows you to sudo without password for
      some time if it's from the same tty. So just waiting around till somebody's used sudo requires
      physical access to that same tty within the 5 minutes (and no logout in between, of course).

      Of course it's possible to replace sudo with someting else (so that tty access wouldn't be a requirement), or to give control of a tty to a process, etc.

      But that all requires root privileges, you see.

      Still, the ctrl-alt-del trick is valid, because it prevents somebody with root previleges from getting the unencrypted user's password (and therefore, probably, access to other machines). But nothing more.

    4. Re:That's an insightful question by CTachyon · · Score: 1

      The tty part is easy to work around. If sudo didn't tie the credentials to a particular tty, the trojan could just use /dev/ptmx (or one of the older equivalents) to allocate a new pseudo-tty. However, since sudo does tie the credentials to the tty, all the program has to do is change the controlling tty to whichever one the user is running sudo on. (Changing the controlling tty is so simple that it's quite easy to do it by accident. First you setsid() to disconnect from your current tty and daemonize, then you open() the tty without using the O_NOCTTY flag. If you don't mind crapping all over the logfiles, you can just run one copy of sudo per each tty on the system that the current user has write access on.)

      --
      Range Voting: preference intensity matters
    5. Re:That's an insightful question by spydir31 · · Score: 1
      There's another kind of attack, too. A typical sudo configuration only prompts you for a password once then lets you sudo without a password for 5 minutes or so. So imagine a background process that waits for a sudo command to be entered and then issues its own "sudo su" or "sudo sh". Or that skips the waiting and just issues one every five minutes until it gets lucky someday.
      That won't work, sudo knows which pty/tty it was bound to, and only allows access to the same one (by default),
      just try it on your machine, open two terminal windows,
      run a sudo command on one, then see if you can do the same in the other without a password.
  46. Famous last words... by devloop · · Score: 1

    That vulnerability is purely theoretical.

  47. Windows NT and privilege separation by Myria · · Score: 2, Insightful

    I dislike Microsoft, but I like Windows NT much more than Linux. Win32 is crap, but the NT kernel is great. NT's security model is much better than Linux's. Note that this is the model; NT being insecure is not because of its model.

    Privilege separation - essentially having different types of "root" - is something NT does better than Linux. NT has the concept of "privileges". Privileges are special flags that "tokens" may have. (A token is a set of security credentials assigned to a process; compare to UID and GID in UNIX.) Each privilege grants its holder the ability to override one feature of the security system.

    Some examples of privilege:
    - "Backup": Able to read any file on the system regardless of ACLs.
    - "Restore": Able to set file ownership to anyone, not just themselves.
    - "Take ownership": Able to take ownership of any file, which grants the right to change the ACLs.
    - "Debug": Able to do the equivalent of ptrace() on any process regardless of ACLs.
    - "Load driver": Able to load kernel driver.
    - "Lock pages": Able to lock memory pages (prevent swapping to disk).
    - "Create token": Able to create tokens, basically allowing forging of credentials (this is how processes get tokens).

    There is an account called "SYSTEM" that is considered to have all privileges. However, in general you want to avoid this for obvious reasons. You create an account for the service with these privileges. Trusted services don't have to always be root when they do special things.

    However, there is always the problem that certain privileges are privilege-complete: they can be leveraged to gain all privileges. "Create token" makes it easy to become a SYSTEM process. "Load driver" is obvious. "Debug" lets you inject machine code into privileged processes like winlogon.exe. Thus, this privilege system can become a safety system instead of a security system. Likewise, "limited root" in UNIX is an arcane way of doing the same thing, and has the same issues.

    I hope this comparison with another OS helps with understanding the many issues brought up. Limiting root is like making water not wet. Or radium not radioactive, if you want to say that you can make water not wet.

    Melissa

    --
    "Screw Sun, cross-platform will never work. Let's move on and steal the Java language." - Visual J++ Product Manager
    1. Re:Windows NT and privilege separation by oglueck · · Score: 2, Insightful

      How is this a security model? All a "privilege" does is open a special hole in an otherwise secure model. Almost any of these holes can be used to execute arbitrary code as the superuser. So instead of giving a token any of these privileges you could simply run the token as the superuser - it's not less secure.

      Backup: I can read any file, especially the password DB.
      Restore: I can replace any system file with a modified version.
      Take ownership: I can replace any system file with a modified version.
      Debug: I can read system memory and obtain secure information like cached passwords.
      Load driver: I can install a rootkit.
      Lock pages: I can run the system out of memory and force swapping security related information to disk from where it is easier to intercept.
      Create token: not sure what it does in detail, but sounds scary.

    2. Re:Windows NT and privilege separation by Tony+Hoyle · · Score: 3, Informative

      Create token is the 'meta' privilege - it lets you create a system level token with *any* privilege and then switch to that context... essentially anyone/thing with that privilige has all rights to the system and you cannot stop them (takes a little work.. it's not got a GUI or anything, but anyone with access to MSDN online could work it out).

      The NT system is ass backwards because it lets you *add* privileges. The Linux capabilities system does it right - process 1 starts with all privileges, then it removes them. It is *impossible* to add a new privilege - you have to ask a more privileged process to do your work for you.

    3. Re:Windows NT and privilege separation by julesh · · Score: 1

      This is somewhat similar to POSIX capabilities.

    4. Re:Windows NT and privilege separation by LinuxIsRetarded · · Score: 2, Interesting
      Create token is the 'meta' privilege - it lets you create a system level token with *any* privilege and then switch to that context... essentially anyone/thing with that privilige has all rights to the system and you cannot stop them (takes a little work.. it's not got a GUI or anything, but anyone with access to MSDN online could work it out).
      You still need the user name and password to be able to create a token to execute code as another user (look at the documentation for LogonUser). To state that anyone with this privilege "has all rights to the system and you cannot stop them" is incorrect.
    5. Re:Windows NT and privilege separation by argoff · · Score: 2, Insightful

      It is called SELinux and has been built into Linux for a long time. But unless you need it for a specific situation, privilege separation is a pain in the ass which is why many people turn it off. I would be glad to sacrifice some usability if it made windows more secure, but ironically a Linux box with privilege separation turned off is still more secure.

    6. Re:Windows NT and privilege separation by Trelane · · Score: 1

      man 2 capget
      man 7 capabilities

      --

      --
      Given enough personal experience, all stereotypes are shallow.
  48. Sysrq. by SanityInAnarchy · · Score: 1

    There actually is something called sysrq, which might concievably be used to create this functionality. Ctrl+alt+backspace isn't it. You may be thinking of ctrl+alt+fn, where n is a number from 1-12. That would actually be useful, but that isn't quite the password prompt I was looking for. I'd rather have it not be a password prompt, simply a dialog box that truthfully represents which app it is and what it's trying to do.

    And no, this can't simply be done with another X server. Another X server may be a useful component -- emphasis on "may", since it would flicker the screen annoyingly, but fast user switching on Linux does that too -- but we need programs to be able to send requests to some sort of sudo server, which then prompts the user (on the other terminal) with exactly what was requested and which app requested it, and allow the user to set policies.

    It would be more useful if the window manager (being the first X client started, thus sort of an X version of init) could guarantee that a particular keystroke will never be caught by another app.

    Actually, Vista seems closer to being able to do this, but I don't think they require a keystroke.

    --
    Don't thank God, thank a doctor!
    1. Re:Sysrq. by Anonymous Coward · · Score: 0

      Ever heard of xterm's secure keyboard mode? (ctrl-left-click)
      Granted, it is not really anywhere near a real sysrq key when it comes to security.

      Sadly, neither SAK is truly secure - although not much would be needed for it to be...

    2. Re:Sysrq. by SanityInAnarchy · · Score: 1

      It's not just the keyboard that I want to be secure.

      For a term, I don't want to have to enter a password, but I do want the xterm to only be visible to me. The nice thing about a SAK is that the password for such privilege escalation suddenly becomes irrelevant for a one-user computer.

      But tell me: How can someone circumvent ctrl+alt+fn?

      Anyway, I think what's really needed in the future is not privilege escalation, but privilege descalation. I want to be reasonably sure that my account is safe, although I still find root to be a useful distinction, and a necessary one for a multi-user system. I don't want to have to type passwords all the time -- one password, once, to unlock my X session, should be enough. If we are to assume that we want to avoid compromising the normal user account, then we should be prepared to run just about everything at an even lower level. Firefox should only have write access to ~/.mozilla/firefox and ~/incoming (my download folder), and read access to everything -- and it could get even more granular by splitting Firefox up; that is, only what's needed to upload a file or install an extension should have read access to everything. Quake 4 only needs ~/.quake4, opengl, and alsa. Firefox should never be allowed outside its window, except to open a new one. Quake 4 will usually want to take over the whole screen, keyboard, mouse, etc.

      It would be a lot trickier to program for, but much easier to manage. For instance, if I can trust my X server and my terminal window, I can allow my own user to su without a password, or have an SSH and GPG key without a passphrase.

      Of course, that wouldn't be any kind of solution against spyware, but I don't think there is any truly secure solution against spyware other than to remove user stupidity. Users can have their "are you sure" boxes, I'll stick to rm -rf -- I wouldn't have typed it if I wasn't sure. I would simply like the option of trusting my X server and terminal -- I wouldn't require it of Average Joe.

      --
      Don't thank God, thank a doctor!
    3. Re:Sysrq. by BJH · · Score: 2, Insightful

      It was a joke, dork. Try it and you will indeed see that it does exactly what I said it does... just not in the way you expect it to.

    4. Re:Sysrq. by spaceturtle · · Score: 1

      BTW, Plash and Systrace do exactly that. In fact Plash lets you allow Firefox to open Documents (e.g. on ~/Desktop) if and only if you have selected that file from the (trusted) standard file open dialog box, in principle giving firefox the very least priviledge with no inconvienience.

    5. Re:Sysrq. by maxwell+demon · · Score: 1

      Depends on how the system is configured. I once did this when my X session hung at work, expecting to be returned to XDM. Instead it just killed X and returned to the console.
      Ok, the console showed me a login prompt as well ... :-) But that's only because I wasn't logged in at that console (nor was anyone else). And of course you could configure the system so that you don't show a login prompt on consoles at all ;-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    6. Re:Sysrq. by FrostedChaos · · Score: 1

      You are correct that running at the least possible privilege level is a good idea. In fact, Theo van Raadt reworked SSH to operate that way by default, some time ago. It's called "privilege separation."

      The real flaw that's being discussed in this thread is a flaw in the X security model, and it's quite fundamental. Windows has some similar problems with "shatter attacks."

      The hack that you are discussing to implement a trusted login path has already been implemented... it's called the "Secure Keyboard" option on the main menu of "xterm." When turned on, all keyboard events are sent exclusively to the xterm window, so the password sniffing attack is not possible. Of course, almost nobody knows about this, so the hack is basically useless. Windows, of course, implements its own trusted login path with CTRL+ALT+DELETE. This is something Windows got right.

      --
      "Any connection between your reality and mine is purely coincidental." -Slashdot
    7. Re:Sysrq. by SanityInAnarchy · · Score: 1

      There's a reason it was modded troll. I know exactly what it does without having to try, but this is no better than telling a Win98 user to "press ctrl+alt+del twice to enter full 3D chat mode!" Yeah, it might be hilarious, to you, but to most of us, it's just lame and possibly dangerous to newbies.

      But, you had the right idea -- ctrl+alt+backspace is indeed difficult, if not impossible, to intercept with an application. Same with ctrl+alt+f8, except that can be made to do something useful, not just to make you laugh with glee.

      --
      Don't thank God, thank a doctor!
    8. Re:Sysrq. by SanityInAnarchy · · Score: 1

      Does Plash also prevent Firefox from moving your mouse and clicking "open" in that dialog? Or simulating an "enter" keypress?

      But it doesn't seem like it's on as deep a level as I'd like. It's better, but it still means that once I send a document to Firefox, I have no idea what Firefox will do with it. Still, that is a lot better.

      --
      Don't thank God, thank a doctor!
    9. Re:Sysrq. by SanityInAnarchy · · Score: 1

      SSH is a good idea here, but the implementation won't work for what I'm describing.

      The problem is that Unix permissions are pretty flat. Root has access to everything, users only have access to their own stuff and their group's stuff. It's impossible to have a user that acts as root to another group of users. The idea would be to have my "sanity" user, but then a "sanity/firefox" user which only has access to ~/incoming, but which my "sanity" user has access to all of -- make an actual hierarchy of users.

      Of course, that's if we want to do this in roughly the SSH model. I think someone mentioned another way to sandbox Firefox.

      --
      Don't thank God, thank a doctor!
    10. Re:Sysrq. by FrostedChaos · · Score: 1

      You are right that the unix administrator model is not very fine-grained... you are either root and all-powerful, or you are just a normal user.

      But the real solution is not to make the current access control list system more complicated, but rather to move to a capabilities-based system.

      None of this really has much to do with the problem we were talking about in X, which lets users read each others' keystrokes!

      --
      "Any connection between your reality and mine is purely coincidental." -Slashdot
  49. This is completely bogus! by Anonymous Coward · · Score: 2, Informative

    If you get to the point where you can load code into the kernel (as in; load a module), then you can replace *anything* in the kernel and you effectively own the box.
    There's no bug here.

  50. Oh PLEASE..... by Anonymous Coward · · Score: 0

    If this type of responses are posted about some MS weakness, the whole ./ crowd will cry bad engineering, bla bla bla...

    But of course, being able to backdoor a Linux kernel is not important....

    Bah...zeaots....

    1. Re:Oh PLEASE..... by Lost+Found · · Score: 1

      This is ridiculous. This has nothing to do with back doors. This is literally saying "you can run arbitrary code in kernel mode by inserting a kernel module!" So what! If you're worried, disable kernel module support or use SELinux to tighten down who may load them even further!

      Linux gives you choices!

    2. Re:Oh PLEASE..... by MikeBabcock · · Score: 1

      His point is that if you already have root privileges, you could do anything (including much more dangerous things) than being able to change how binfmt is handled.

      Security is about not letting people get root access in the first place, or use SELinux to restrict what root users can do (or both).

      --
      - Michael T. Babcock (Yes, I blog)
  51. That's like... by Anonymous Coward · · Score: 0

    ... the door's open, and your climbing through the window.

    Although there's the good point of a stealthy backdoor, as mentioned above...
    But since you're root there always ways to do that, so, the "bug" is not really a vulnerability.

    Zapotek

  52. Re:Problem: Sometimes you want to limit root. by ModMeFlamebait · · Score: 1
    Solution: Don't give your chroot jail access to the binfmt filesystem. I'm not sure how this can be done, though, as root is allowed to mount pretty much whatever it wants.
    root can escape a chroot jail easily anyway, this is no protection. Using --rbind mounts in per-process namespaces (a'la linux-vserver) is a better idea.
    --
    Pavlov. Does this name ring a bell?
  53. Ridiculous by Anonymous Coward · · Score: 0

    Wow, a linked list containing binary format handlers allows to insert a new one as root, as it is designed to do. The linked list indeed must have a serious bug.

    This has got to be the most ridiculous "security problem" since the non-existant firefox bug. I hope the poster is ashamed of himself.

  54. Fuck off morons by Anonymous Coward · · Score: 0

    The "Shellcode \"Security \\\"Research\\\"\" team" (double-quotes intentional) seems to fall for the same crap as most other security "researchers", doing PR instead of doing something useful. Even if they actually find a real bug (which is not the case here), instead of fixing it, which would actually be doing something productive, they produce lame "papers" detailing the obvious for even bigger idiots.

    Guys, get a life and do something useful, like _fixing_ _real_ bugs. Noone is going to pay you for this crap, no matter how much you want it.

  55. A Non-Exploit by EXTomar · · Score: 1

    The problem is that you need to be root to do this. If you already have this access, the system is already "yours". One may do with it whatever you wish where simply leveraging the way the kernel loads binaries is yet another trival thing. There might be some "tightening up" but this is no more of a security risk than say "compiling source code for a kernel module that is of a dubious source".

  56. Senario 2 by Anonymous Coward · · Score: 0

    You got a nvidia card. You need to download a kernel module in order to see the cube in XGL. You visit nvidia to download the modules. A malicious hacker has spoofed DNS and with a man-in-the-middle attack, instead of going to nvidia's ftp server you download "the module" from ftp.b0t.net. Then you install the nvidia module every time you boot.

    Scenario 3. You have a card from intel. They don't allow redistribution of firmware, so you must download it from mirror.nigeria.intel.com. However, the server has been compromised with bribery and sabotage attack and the web server sends malicious modules to selected hosts.

    ps- nice site!

  57. Less than a fortnight remaining by Anonymous Coward · · Score: 0

    I've always wanted to be able to say that myself :-)

  58. Some experts by Anonymous Coward · · Score: 0

    They claim (at the end of the pdf) to be security experts. Yet all they have discovered is that if you have gained root access, you can exploit the system. That's not new news, that's not even news to begin with. Once your attacker gains root, the game's over.

  59. What about SELinux? was Re:A Non-Exploit by Peter+Desnoyers · · Score: 2, Insightful

    rootkit: "a set of software tools intended to conceal running processes, files or system data, thereby helping an intruder to _maintain_ access to a system while avoiding detection." (Wikipedia)

    Adding a binfmt handler (as described in this document) is one way in which a rootkit may be installed. This registration has no SELinux checks, and thus any root process with the capability to install a module (CAP_SYS_MODULE) can register a hook to redirect exec calls.

    However, I don't think fixing this makes much of a difference, as I can think of half a dozen other ways of adding such a hook from a module. (e.g. hooking the exec handler, which is pretty easy even though the address of the syscall table is no longer exported.) I think the main lesson of this paper - which the author does not seem to appreciate - is that CAP_SYS_MODULE is a free pass to do whatever you want, regardless of any other SELinux capabilities, and that there is no way to change this without *major* changes to the linux architecture.

  60. Note on Gentoo (was Re:Probably none.) by Laebshade · · Score: 1

    A little note on Gentoo: if you do the CLI-based install, yes, it doesn't prompt you to set a root password, and you're right, it does prompt it via documentation; however, with the livecds now available (as of 2006.0 release), you can use a console-based installer or gtk-based installer, both which do prompt to set the root password (gives a clear option to).

  61. easy to bypass by r00t · · Score: 1

    Use ptrace() to take over the shell already running on that tty. Optionally insert code which does a fork, so that the shell keeps working and nobody notices. Go to town.

  62. Fool by Anonymous Coward · · Score: 0

    How to make a fool of himself - Lesson 1

  63. Once again... by Anonymous Coward · · Score: 1, Funny

    Every few months, yet another news story appears which earns Linux their true slogan:

    "Linux: got r00t?"

  64. Couldn't an exploit use autoconf to run as root? by garyebickford · · Score: 1

    Not an autoconf expert and just speculating:

    I wonder about hacks that installing software as root could allow. What if an autoconf based install package included a temporary or permanent 'data' file (perhaps a phony .pdf or image file with badnasty code in it)? Then the usual "./configure; make; sudo make install" that we casually run so often could execute the evil file as root, as part of the 'make install' sequence.

    The data file could even be clean on disk, and the badnasty code inserted only in the in-memory copy that is either run in memory or saved to a temporary file and run, then wiped. In cases where a file format has some extra leftover space at the end, the banasty code could be put there, and only a few bytes inserted into the front of the file in memory could be enough to cause execution to jump into it.

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  65. Read Ken Thompson "Reflections on Trusting Trust" by garyebickford · · Score: 1

    I'm no security expert, but I'm not convinced that such attacks are necessarily difficult for those who have the motivation to do so.

    Every Unix sysadmin, programmer and maybe computer user would be advised to read "Reflections on Trusting Trust", the lecture given by Ken Thompson when accepting the 1983 Turing Award with Dennis Ritchie. These two together created the original C and Unix.

    In his lecture, Ken demonstrates how (with the appropriate access) one can introduce multiple trojans into the compiler, so that every time either gcc or login are compiled a back door is compiled in. In another comment, I speculated on the possibility that the common practice of installing an autoconf-generated package, using the sequence "./configure; make; sudo make install" might make it possible for a carefully constructed autoconf build to take advantage of this root access to do evil; Dr. Thompson's lecture provides an excellent example of how this might be exploited.

    The lesson is that social engineering can often provide the security breach necessary to become root, regardless of the system. Just as the only way to absolutely prevent network attacks is to disconnect, the only way to absolutely prevent local attacks is to never turn the machine on.

    In my own experience, someone at the school I attended some years ago discovered he could print to the timesharing system's console terminal, and wrote a program that duplicated the output headers of the OS control program (called VULCAN). His program 'informed' the operator that it was erasing every program on the main hard drive, one after another: "deleting FORTRAN; deleting BASIC; deleting VULCAN; ..." The operator dove for the Big Red Switch, instantly cutting power. The entire computing facility was down for days as they had to repair hardware problems that resulted from the sudden loss of power and reconstruct the disk state from backups. This exploit didn't require root (admin) access, but he could easily have written a program that asked for confirmation from the operator and required entering the password.

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  66. Fixing X a seperate project. by spaceturtle · · Score: 1
    Does Plash also prevent Firefox from moving your mouse and clicking "open" in that dialog? Or simulating an "enter" keypress?

    No. X is still broken. However I understand there is a seperate project Nitpicker (part of TUD-OS)to solve that.

    But it doesn't seem like it's on as deep a level as I'd like. It's better, but it still means that once I send a document to Firefox, I have no idea what Firefox will do with it. Still, that is a lot better.

    I am not sure what you mean. It was the goal of the EROS-OS project to break software into tiny chunks and apply least priviledge to each. One could get even finer grain protection if writing with a safe language. Even so, if Firefox as a whole is malicious there is no way of stoping it misusing whatever rights you give it.

    1. Re:Fixing X a seperate project. by SanityInAnarchy · · Score: 1
      Even so, if Firefox as a whole is malicious there is no way of stoping it misusing whatever rights you give it.

      This is true, but Firefox is a prime candidate for this kind of fine-grained permission. Firefox has extensions. It's entirely possible that there are some parts of Firefox I trust absolutely, and other parts I'd rather not trust at all.

      --
      Don't thank God, thank a doctor!