Slashdot Mirror


New Remote Root in Mac OS X

Cysgod writes "I've released a security advisory detailing a new remote root vulnerability in Mac OS X 10.3, 10.2 and possibly earlier versions." The main thrust is that it exploits a problem in the DHCP client, to gain root access, and turning off various services can prevent attack. It is unclear why an exploit was made public before Apple resolved the problem. Apple's fix is apparently scheduled for a December release.

20 of 445 comments (clear)

  1. Exploitability Questionable by marsipan · · Score: 5, Informative

    "In most cases, the Mac will need to be booted into the malicious environment to be exploitable by this flaw. (The netinfod process must be restarted to cause the malicious server to be inserted into the authentication source list.)"

    This definitely makes the exploit less likely...

    1. Re:Exploitability Questionable by moof1138 · · Score: 4, Informative

      Static automounts from directory services (which are what you need to exploit this) only get mounted at boot, if if certain directory services related processes get restarted that never get restarted in a normal setup, so you really need to boot a machine in a hostile environment for this to affect you. Dynamic automounts will get mouted at each login, but will not be mounted in a dangerous way.

      You can just go into Directory Access and uncheck LDAP and NetInfo to be immune to the issue even if you use DHCP. I always do this. While this guy thinks he is early in reporting this bug, rogue NetInfo servers are not a new thing (though rogue LDAP servers would be more recent). There used to be an article in NextAnswers from the late 80s about how to track them down. I always customized these settings when I first get a OS X system to avoid this very thing.

      --

      Hyperbole is the worst thing ever.
    2. Re:Exploitability Questionable by Anonymous Coward · · Score: 5, Informative

      Ha, you people are all ignorant.

      If you were a Mac person, you would know that Mac people never shut their laptops down, only put them to sleep. Why go though a slow boot on your iBook when it wakes up as soon as the lid is up?

      As many moderated up quotes from the article tell us, this problem is only a problem when the services are started, which is on boot. Which is not on wake-from-sleep.

      I do not mean to trivialize this hole. To me, it seems obvious why it is there. Apple wants LDAP-enabled, OSX Server managed networks to work out of the box. This includes the ability to mount shares anywhere on the client system, which is insanely powerful and useful in a trusted setup.

      Trusted is, of course, the operative term there. Apple needs to fix this or disable the services by default. People who need it can enable it themselves.

  2. Default? by Phroggy · · Score: 4, Informative

    and on any network provided service, including ssh (which is turned on by default in certain versions of the affected software).

    I'm not aware that SSH was enabled by default in any version of Mac OS X.

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    1. Re:Default? by Darth_Foo · · Score: 5, Informative

      I don't beleive it is in the client versions of OS X but it almost certainly is in OS X Server (which is also subject to the published vulnerability).

    2. Re:Default? by Cysgod · · Score: 5, Informative

      Hi there.

      It is important to note that having all your services turned off is *not* protection against this bug.

      The malicious LDAP server also gets to dictate your mountpoints to you. This means malicious executables can be mounted anywhere in your filesystem. Including places where they can be expected to be executed.

      A trivial exploit of this would be to replace the directory with crontabs and set up a crontab and an executable to run as root. Suddenly sshd *is* enabled.

      I'll try to answer other questions as I can. This got posted when I was horseback riding, I submitted it at 9am....

    3. Re:Default? by nehril · · Score: 4, Informative

      your OSX server is vulnerable only if it uses DHCP on an untrusted lan. if you're using dhcp for *servers* on an unsecured network.... well then you have more problems than this.

      the exploit as I understand is this: evil dhcp server gives you an IP addr and also an evil LDAP server, which if your mac is configured to do so, will allow the LDAP server to authenticate root level users too (besides other fun admin stuff like mount points).

      this behavior is actually useful for 'lab full of macs)' scenarios and, as I understand, has been an admin 'feature' since the NeXTStep days.

  3. What does this mean to the average home user? by Anonymous Coward · · Score: 4, Informative

    Assuming two scenarios:

    1. A home user with dialup, running no external services, with the firewall turned on.

    2. A home user with DSL/CABLE, running behind NAT. And for fun, let's add Airport. Also not running any services, firewall on.

    For the non-technical /. reader, is this vulnerability something to be seriously concerned about?

  4. Re:The Reason the exploit was made public.. by abde · · Score: 5, Informative

    also there's this timeline of events, which is quite revealing:

    History of this Advisory & Vendor Contact Log
    2003-10-09 Initial version of this advisory
    2003-10-09 Apple Computer notified
    2003-10-09 Apple Computer confirmed receipt and forwarded to eng. team
    2003-10-11 Minor edits, also added "Philosophical Issues" and "Path to Root"
    2003-10-14 Apple Computer assigns specific point of contact
    2003-10-14 Requested confirmation of issue with Apple Computer
    2003-10-15 Apple Computer confirms issue
    (2003-10-24 Original deadline given to Apple for acknowledging issue)
    (2003-10-24 Mac OS X 10.3 is released with this known issue)
    (2003-10-28 Mac OS X 10.3 Security Update released, does not address issue)
    2003-10-28 Requested update of fix status from Apple Computer
    2003-10-28 Apple Computer proposes Nov. 3 fix date
    2003-10-29 Apple Computer reneges on Nov. 3 date
    2003-10-29 Requested fix in "2 or 3 weeks" from Apple Computer
    (2003-11-04 Mac OS X 10.3 Security Update released, does not address issue)
    (2003-11-15 Mac OS X 10.3.1 is released with this known issue)
    2003-11-17 Requested update of fix status from Apple Computer
    2003-11-18 Requested update of fix status from Apple Computer
    (2003-11-19 Mac OS X 10.3.1 Security Update released, does not address issue)
    2003-11-19 Apple Computer replies "scheduled to go out in December's update"
    2003-11-19 Deadline of Nov. 26 given to Apple Computer
    2003-11-25 Minor edits, made "Path to Root" a little more work for the script kiddies
    2003-11-26 Advisory issued (48 days after initial vendor notification)

    --
    Don't blame me - I voted for Howard Dean. http://dean2004.blogspot.com
  5. Re:And now the question of support... by tgibbs · · Score: 4, Informative
    Even more unclear is which releases of Mac OS X Apple plans to continute to release security fixes for...

    Yes, all we have to go on is Apple's past record of continuing to provide security fixes for previous versions of OS X and OS 9.

  6. Just use an Open Firmware password. by netsrek · · Score: 5, Informative

    Set an Open Firmware password on your machine.

    You will then need to enter this password to enter single user mode or boot from a CD.

    Note that this still doesn't fully secure your machine unless it's physically secured, as someone can simply reset the OF password by changing the amount of RAM in the machine, then zapping the PRAM.

    Makes securing a powerbook pretty much impossible, but otherwise...

    --

    i don't read slashdot anymore.
  7. Re:Local insecurity by dirkx · · Score: 4, Informative
    This seems to only affect machines which did not come through an upgrade path from 10.1 or before; but had Panther instaleld on them cleanly.

    The solution is documented in /etc/ttys, simply change the secure of the console to a insecure:

    If the console is marked insecure, single-user requires the root password. Since DirectoryServices is not running by the time we enter single-user mode, init will ask for the non-shadow crypt password stored for root in /etc/master.passwd. If no such password exists, it will not be possible to enter single-user mode from a console marked insecure.
    I.e. The lines you want to edit is/are (with sudo vi /etc/ttys):

    console "/usr/libexec/getty std.9600" vt100 on insecure

    console "/System/Library/CoreServices/loginwindow.app/Cont ents/MacOS/loginwindow" vt100 on insecure onoption="/usr/libexec/getty std.9600"

    Given that you propably still want to be able to log in if you have to - you propably also want to do:

    netinfo or other default passwd: sudo passwd root

    default passwd file used during early boot stages sudo passwd -i file root

    Note that in most cases you want to change both.

    Dw

  8. Re:Local insecurity by stefanb · · Score: 4, Informative
    Hold down Command-S while starting up the machine.
    Open Firmware Password is a little utility that will set up the password for Open Firmware, which you could also do from the Open Firmware prompt (Cmd-Opt-O-F).

    Once set, you cannot boot from anything but the default startup disk. Also you need to enter the root password to enter single-user. (If root is enabled.)

  9. AUTHOR: FAQs answered by Cysgod · · Score: 5, Informative

    Thought I'd field some of the more mentioned questions and misconceptions here...

    Is my machine safe if I have the root account "turned off"?
    No. The account attacking can be uid 0 and have any other name in the universe that is a valid account name.

    Is my machine safe if I have all remote access services "turned off"?
    *NO*, and please quit saying it is. This exploit allows malicious people full control of where things are mounting on your system. They can mount malware anywhere. Including places that can virtually guarantee executiong of their target code. For example, an attacker could cause their evil data to be mounted in place of crontabs and have their fake root's crontab point to an evil executable mounted there or somewhere else.

    Why did you release this when you did?
    This was an exploitable remote root vulnerability. After Apple reneged on the Nov. 3rd release date I gave them 2-3 weeks. After the 2-3 weeks were up, I asked for the status and they said "December". Meanwhile, users are left exposed and independent rediscovery seemed fairly likely. And maybe by someone less scrupulous than myself. I felt I was being strung along and that the issue may never get properly addressed so I set a hard deadline at that point. They didn't meet it, and I issued my advisory.

    It would not be fair of me to let Mac users hang out in the breeze for more than 2 months on an issue of this magnitude. You may disagree, but I have no regrets about my actions and feel that I was more than fair to Apple Computer and its users.

    (As I mentioned in a previous post, I was out horseback riding by the time /. got around to finally posting the article. Sorry it has taken me so long to respond.)

    1. Re:AUTHOR: FAQs answered by Wanker · · Score: 4, Informative
      Kudos to you for handling this very responsibly. Despite the attention-grabbing comment by pudge, you followed the policy he linked to quite nicely.

      It doesn't seem to me at all unclear "why an exploit was made public before Apple resolved the problem". In fact this seems very clear in what you wrote:

      After Apple reneged on the Nov. 3rd release date I gave them 2-3 weeks. After the 2-3 weeks were up, I asked for the status and they said "December". Meanwhile, users are left exposed and independent rediscovery seemed fairly likely.


      The wiretrip policy linked above is quite clear on how long to give a vendor ("maintainer") to come up with a fix:

      B. The MAINTAINER has 5 work days respond. Note that all times of work days are relative to the ORIGINATOR, not the MAINTAINER. Suggestion to the MAINTAINER: sooner is better than later--just because you have 5 days does not mean you need to take them all. The ORIGINATOR is technically free to do whatever they want to do after 5 work days--however, they should be fair and wait if the MAINTAINER shows adequate initiative to fix the ISSUE.


      This is clarified a bit on what it means to "respond" in the FAQ section:

      Q. I'm a software maintainer, and I can't possibly fix the problem in 5 days....
      A. You don't have to. If you (re)read the above, you have 5 days to establish communication. Provided you cooperate with the researcher and keep them 'in the loop', they should provide you with whatever time necessary to resolve the ISSUE (within fair reason).

      Q. I'm a software maintainer, and I want more than 5 days!
      A. Well, considering that, in general, you don't have *anything* technically, this document hopes to provide you with at least 5. Be on your best behavior, cooperate with the ORIGINATOR, and you should get more. :)


      According to policy, you would have been OK (if somewhat rude) releasing this after 5 work days from initial contact. Extending it through 48 calendar days and several patch cycles seems extraordinarily generous.

      I wouldn't feel at all bad about the timeline followed. If anything it shows remarkable restraint.
  10. Re:What is the fix? by Glock27 · · Score: 4, Informative
    They're not fixes, but there are some fairly easy workarounds:

    Workarounds
    There are a variety of avenues to avoiding this vulnerability...

    1. Disable any network authorization services from obtaining settings from DHCP:

    * in Directory Access, select LDAPv3 in the Services tab, click "Configure...", uncheck "Use DHCP-supplied LDAP Server"

    * in Directory Access, select NetInfo in the Services tab, click "Configure...", uncheck "Attempt to connect using broadcast protocol" and "Attempt to connect using DHCP protocol"

    * in Directory Access, uncheck LDAPv3 and NetInfo in the Services tab, if you don't intend to use them

    2. Turning off DHCP on all interfaces on your affected Mac OS X machine can also keep you from being affected.

    For added security, be sure to disable any unused network ports:

    * turn the AirPort card off or remove it, if it is not being used.

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
  11. subnet exploit ?! by didiken · · Score: 4, Informative

    Remote exploit ? Can you say subnet exploit ?! Victim gotta have DHCP and SSH turned on. So not a default client installation exploit.

    You MAY say MacOS X Server got SSH turned on so will be vulnerable, but you must enter a static IP address at the system setup, that means you've no DHCP options unless you manually change it to DHCP later at "System Preference". By the way, if you do use DHCP to hand out server IP address you deserve to get rooted.

    Anyway I get enough laugh out of some amateur security people today. Movie at 11.

  12. No panic, just reconfigure by ApocryphX · · Score: 5, Informative

    Just in case anybody missed it: the solution is easy!
    Just open the Directory Access tool and deselect:

    LDAPv3, NetInfo, SLP

    done!

    I.M.H.O., Apple made the same mistake as MS in this case: Enable everything in case someone might need it. And don't worry about the bad guys ......

  13. Re:i thought i would never say this by jjhlk · · Score: 4, Informative

    I don't understand what you meant, but Administrator does not have kernel level access, like your parent said. This is obvious when you try to kill certain processes as Administrator, but are not allowed. Of course, Administrator access is enough to still do anything you want on the computer, so the distinction is almost moot.

  14. Re:I remember this guy. by Cysgod · · Score: 5, Informative

    I've been pretty low-key about this until today, so I'm not sure what you're talking about. I'd be very interested to see links to the comments you refer to.

    I may have reason to believe that the seeded copies of 10.3.2 are, in fact, still vulnerable to this bug by default. But I can't say for sure because if I did know for sure, that would mean that someone violated their NDA and that would be bad news for someone. Live in fear of Apple Legal.

    It's not a real happy conundrum. I found out one week ago that Apple was planning to release in December after having previously agreed in principle to a date sometime in November. I felt that I was being strung along like a ball of yarn, but I didn't want to be unreasonable so I gave them 1 more week. They never replied and cut off all contact with me. And here we are.

    And FWIW, since it's been mentioned, I'm not an Apple hater, I love my PowerBook. :-) Thanks for writing.