Slashdot Mirror


Apple Security Blunder Exposes Lion Login Passwords In Clear Text

An anonymous reader writes "An Apple programmer, apparently by accident, left a debug flag open in the most recent version of its Mac OS X operating system. In specific configurations, applying the OS X Lion update 10.7.3 turns on a system-wide debug log file that contains the login passwords of every user who has logged in since the update was applied. The passwords are stored in clear text."

49 of 205 comments (clear)

  1. Great by lemur3 · · Score: 5, Funny

    now i can find out what my password is.

    ive been resisting a reboot for ages!

    1. Re:Great by cbreak · · Score: 3, Informative

      Only if you entered it after the update and within the expiration date apparently. And you probably need local admin rights. Not a big hurdle if you're sitting in front of the computer.

    2. Re:Great by Anonymous Coward · · Score: 2, Interesting

      Oh hi there, InterestingTechGuysIn140Bytes. I was kinda wondering when you'll get a next account after you've blown last previous three.

    3. Re:Great by beelsebob · · Score: 5, Informative

      Yes, because having a known md5 hash to transmit in plain text is much more secure than having a known password to submit in plain text.

      If you want to do this properly, you use SSL for login (and possibly more) or you implement a secure password exchange protocol (e.g. SRP).

    4. Re:Great by icebraining · · Score: 5, Interesting

      You obviously have no fucking clue of what you're saying. If you hash the pass before sending, then what happens if someone sniffs the connection? They can just send the hash!

      The hash effectively becomes the password.

      So no, it doesn't increase security. But you know what does? Two-factor authentication. And do you know what big consumer oriented company start offering those first? I'll give you an hint.

    5. Re:Great by gutnor · · Score: 5, Informative

      The hash effectively becomes the password.

      Come on now, nobody simply hash the password: you timestamp it and salt it first then hash it. That is how it is done, and you know it. So yes the parent is incorrect, but saying that hashing is useless is misinformation. If you properly hash, a sniffer will be able to use the hash as a password only once. So that is a man in the middle, that sucks but it is not a complete pwnage as you suggest it is.

    6. Re:Great by icebraining · · Score: 2

      I never said hashing is useless. Hell, the Google Authenticator that I linked does exactly that (HMAC-SHA1 with the Unix timestamp as the message).

      I said that an hash of the password is useless, and it is. An hash of pass+timestamp+salt is not the same thing as an hash of the password.

    7. Re:Great by icebraining · · Score: 4, Informative

      Protecting against replay attacks is easy: don't allow two logins to the same account in the same window of time (30s, using Google Authenticator).

      Most people won't login twice in 30s anyway, so they aren't affected.

    8. Re:Great by errandum · · Score: 4, Informative

      In this case, because it is a false allegation. He should read the article he posted (and so should you)

  2. malware by Anonymous Coward · · Score: 4, Funny

    apple even ships their own malware.

    1. Re:malware by mr100percent · · Score: 4, Insightful

      considering how this only affects people who used FileVault encryption on their Mac prior to Lion, then upgraded to Lion but kept the folders encrypted using the legacy version of FileVault, I hardly think this will be a popular vector for any attacks, malware or otherwise.

    2. Re:malware by IamTheRealMike · · Score: 5, Funny

      Oh yes, you're right. It sounds like it only impacts people who actually want / need security. So that's OK then.

    3. Re:malware by mr100percent · · Score: 2, Informative

      People who actually want security wouldn't be using an older, and slower, version of FileVault in the latest OS and also ignoring the message telling them to upgrade the FS to the latest version.

    4. Re:malware by Smurf · · Score: 5, Informative

      Oh yes, you're right. It sounds like it only impacts people who actually want / need security. So that's OK then.

      No, because the people who actually want/need security would have already turned off the legacy FileVault (i.e., the one that only encrypts the user's home directory leaving the system directory where the log file in question is located unprotected) and turned on the new FileVault which encrypts the whole disk, including all system directories. That was one of the few really compelling features of Lion.

      BTW, this is a Mac OS X 10.7.3-specific issue. It does not affect users of pre-Lion systems which only have the legacy FileVault option.

    5. Re:malware by Isaac+Remuant · · Score: 3, Insightful

      The problem with Linux and generalizations is that there's more than one Linux.

      I've never recompiled a kernel (that I'm aware of).

      --
      "Science can amuse and fascinate us all, but it is engineering that changes the world. " - Asimov.
  3. Do they have a build process? by msobkow · · Score: 5, Insightful

    When I build a system for Linux distribution, I use scripts to configure the options on the build server. I don't use manually specified configurations from developer workstations.

    Doesn't Apple grasp this concept of source code versioning and build management? Or was the debug flag in question hard-coded in the source rather than specified as a build option? If so, Apple needs to revisit it's coding structure and figure out how to set BUILD TIME options instead of hard coding them.

    --
    I do not fail; I succeed at finding out what does not work.
    1. Re:Do they have a build process? by Kjella · · Score: 5, Informative

      Well I've seen many logging frameworks where debug logging and application logging was simply a different severity level, particularly since you may want crash/debug logs from users. All it takes is one sloppy developer that needed a log output, copy-pasted an application log line instead of a debug log line, because it's only temporary and you're going to take it out right? Both works for him. And then suddenly you end up with debug info in your production logs. I don't see why this would have to be a problem with their build process.

      --
      Live today, because you never know what tomorrow brings
    2. Re:Do they have a build process? by 140Mandak262Jamuna · · Score: 4, Interesting
      All your debug flags and compiler flags and build settings etc assume the developers would properly bracket their code under proper #ifdefs .

      Like:

      #ifdef DEBUG_BUILD

      SaveDebugInfo(logfile);

      #endif

      But if the developer had not bracketed their code with proper protection macros, no build setting is going to rescue you.

      I have tried make the system as automatic as possible. I have laid down rules to my team. But if you make the system very very foolproof only fools would be able to use it. The process requirements will swamp out the developer. Most likely the error happened at several stages. Originally a function that will be called only under debug build was making a call to save stuff to the log file without protection because the whole damned function is supposed to be called in debug mode. Then someone cut/paste parts of the code out to a function that is called in both debug builds and protection builds. Carelessly.

      There is no way you can protect yourself against careless developer. Anyone working at such sensitive parts would be a senior developer, probably a manager stepping in to fix something simple in a module that he himself wrote ages ago. He was very confident and the build guidelines might have mutated without him knowing it. #ifdef DEBUG_BUILD might have been changed to #ifdef DEBUG_OSX and #ifdef DEBUG_IOS and he never got the memo because he was not a regular developer. Such things happen.

      --
      sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    3. Re:Do they have a build process? by icebraining · · Score: 5, Insightful

      There is no way you can protect yourself against careless developer.

      Of course there is. It's called "code review".

    4. Re:Do they have a build process? by Just+Some+Guy · · Score: 4, Informative

      All your debug flags and compiler flags and build settings etc assume the developers would properly bracket their code under proper #ifdefs .

      It's safer to bracket the logging code in #ifdefs:

      void SaveDebugInfo(logfile) {
      #ifdef DEBUG_BUILD
      ... write it out ...
      #endif
      }

      so that you only have to get it right one time. If you make developers repeat a process 10,000 times and they get it perfect 99.9% of those times, that means it's still screwed up in 10 places.

      --
      Dewey, what part of this looks like authorities should be involved?
    5. Re:Do they have a build process? by Just+Some+Guy · · Score: 4, Insightful

      That's option B, option A is called "Open Source".

      Which works as a distributed form of... wait for it... code review.

      --
      Dewey, what part of this looks like authorities should be involved?
  4. Do you want to find the passwords of other users? by 140Mandak262Jamuna · · Score: 4, Funny

    ...There is app for that.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  5. As an InfoSec pro... by Zapotek · · Score: 2

    ...I've got to say that if a fellow pen-tester managed to find a really deep, complex and convoluted vulnerability in by code then that's fair game and kudos to him.
    This though...bitten by a debugging flag, the dev must be hitting the sauce right about now.

    Now, putting my coder hat back on, why was a debugging flag left enabled while building for production?
    That's just lazy/bad setup, everyone knows that you keep your environments separate.

  6. I wonder what the comment said... by bhlowe · · Score: 2

    I wonder what the source code or version control comments said..

    1. Re:I wonder what the comment said... by HeavyDDuty · · Score: 2

      // TODO: remove trace statements before commit

    2. Re:I wonder what the comment said... by Mr.+Underbridge · · Score: 5, Funny

      //REMEMBER TO COMMENT THIS SHIT OUT SO I DONT GET FIRED

      Filter error: Don't use so many caps. It's like YELLING....

  7. Re:lucky for me... by michelcolman · · Score: 2

    Actually, Lion's FileVault is not a problem. Only if you were using the old FileVault from previous OSes (which only encrypted the home folder), upgraded to Lion, but did not switch to the new full disk encryption FileVault for some strange reason.

  8. Re:Really? by michelcolman · · Score: 5, Informative

    Your login password also unlocks the encryption password for FileVault. The login passwords were apparently logged in a file outside of the encrypted image. (Only for the old pre-lion version of FileVault running under Lion)

  9. Not really by mr100percent · · Score: 4, Informative

    FTA:

    Anyone who used FileVault encryption on their Mac prior to Lion, upgraded to Lion, but kept the folders encrypted using the legacy version of FileVault is vulnerable. FileVault 2 (whole disk encryption) is unaffected.

    So only certain configurations, and relatively few at that.

  10. We have QA processes which automatically detect by gcnaddict · · Score: 5, Insightful

    things such as debug logs during testing.

    Does Apple have no such thing? This leads me to think that Apple either has no development lifecycle or, in case they have one, only half-heartedly obey it.

    --
    Viable Slashdot alternatives: https://pipedot.org/ and http://soylentnews.org/
    1. Re:We have QA processes which automatically detect by Anonymous Coward · · Score: 4, Insightful

      I've been working here and there for Software Verification for a number (double-digit) number of years, on a number of products. I've seen programmers do some things in development that they forget to clean out before release that would curl your hair. Especially from the ones fresh out of school, who don't have a lot of experience. "Oh, I'll put in these debug lines just for now." No wrappers or conditional compliation of any kind, so they leak out into the final product with no one the wiser.

      Another commenter pointed out that a proper assurance test would look for rogue files. That works for unauthorized/unspecified log files, such as in this case, if the organization has good specifications and tight testing. I'm not in a position to comment about Apple's coverage in this area. The problem is that other debug statements could make unauthorized entries into authorized logs, and who would catch it?

      What I saw was most effective was peer code review, especially if you had the coder equivalent of the BOFH in the audience to catch crap like this. There's nothing like people seeing "release" code with debug stuff not stubbed out.

  11. But Apple are perfect, so of course... by phonewebcam · · Score: 2

    ...you're passwording it wrong.

  12. Re:lucky for me... by Sancho · · Score: 5, Interesting

    Some "strange" reason?

    How about you've got multiple users on the machine? With Filevault2, any user can unlock the whole disk. As much as I like macs, it's a complete joke. With Filevault1, you had homedir encryption on a per-user basis. My files were secure from other users of the machine.

  13. Re:bloody hell by iluvcapra · · Score: 4, Interesting

    Looking at the actual message, it looks like the dev in question just took an "attributes" NSDictionary argument and stuck it into his NSLog() call whole hog, as in:

    //print arguments
    NSLog(@"about to call _premountHomDir with %@", attributes);

    "%@" in an OSX printf-style format string will call -(NSString *)description on whatever object in on the vararg position for that %-code, and put that string in the output. The "description" selector on a dictionary spits out the keys and values of the dictionary in a human-readable format. The "attributes" object in this case contains a lot of information that would be interesting for a human debugger, the password being an exception.

    --
    Don't blame me, I voted for Baltar.
  14. Ad the log file in question is ... by knapkin · · Score: 2

    What? Something seriously missing from the summary!

  15. Typical Apple by toadlife · · Score: 5, Funny

    Copying features from Microsoft products again.

    --
    I don't always use unix-like operating systems; but when I do, I prefer FreeBSD.
    1. Re:Typical Apple by quenda · · Score: 2

      Copying features from Microsoft products again.

      And ripping off open source without credit.

  16. Re:Really? by jo_ham · · Score: 2

    No, it's off by default, and if you don't use FileVault (the legacy version) you are effectively not effected - your disk is not encrypted to begin with, and thus starting the machine in target disk mode gives access to your home folder to an attacker (or they can reset your login password with the OS X installer), bit *not* your keychain password which is the same by default, but not if the login password is changed via the root user or another admin).

    It's still a bit of a huge security blunder though.

  17. Re:Bad news - but for a very small subset of users by jo_ham · · Score: 2

    I wasn't a fan of Lion either after only a few days. It still has some things that have changed over SL that I really wish were back (Save As..., the old version of Preview, etc) but I did grow to like it much more when I got a Magic Trackpad instead of using a mouse. I think a lot of my issues stemmed from accessing it with a mouse. It's been designed (for better or worse) with trackpad users in mind.

    Still, I can't really say it's been a step forward for OS X over 10.6 - it's a bit of a wash from a personal standpoint.

  18. Don't blame the one guy still working on OS X.! by Y-Crate · · Score: 4, Funny

    All of his friends went over to work on iOS and he's been left to pick up the slack. ;)

    1. Re:Don't blame the one guy still working on OS X.! by StripedCow · · Score: 4, Funny

      Oh, and I thought everybody was working in the legal department.

      --
      If Pandora's box is destined to be opened, *I* want to be the one to open it.
  19. What a pain! by techdolphin · · Score: 2

    Now I will have to change my password from "password" to "12345678."

    --
    A woman once said to Adlai Stevenson, "Every thinking person in America will vote for you," to which Stevenson replied, "That won't be enough, ma'am, I need a majority."

  20. Relatively few? by WD · · Score: 4, Interesting

    What qualifies that statement? Any FileVault user that upgraded to Lion would be affected, which I would think would be more than a few. FileVault is not upgraded to FileVault 2 automatically. The user would need to manually disable FileVault and then re-enable it to get the whole disk encryption feature.

  21. Just a bug by lucm · · Score: 5, Insightful

    Somehow I have a feeling that if this same kind of "bug" had been found in another operating system, such as one coming from Redmond, the discussion and media coverage would have been quite different, and there would have been much more Slashdot comments on this story.

    We are talking about passwords stored in clear text, no fix yet, and based on the article, no assurance that the fix would remove copies of the unencrypted passwords. For a company that was wondering how to spend 100 billions. What a joke.

    --
    lucm, indeed.
  22. It's a feature. by mr_lizard13 · · Score: 2

    It's a feature designed to enhance privacy by encouraging the user to change their password more often.

    Specifically, at each login. And logout. And several times in between. Quick! Keep changing it!

    --
    "We live in a global world" - Harvey Pitt, former Securities and Exchange Commission Chairman
  23. timestamp it and salt it and then hash it? by YesIAmAScript · · Score: 5, Insightful

    First, if you timestamp it, you don't need to salt it. The password would effectively have a lifetime of minutes at best, so adding a salt doesn't improve anything.

    Second, your idea ruins the whole point of using a trapdoor function (what the internet means by "hash"). The point of the trapdoor function is that the server doesn't have to have your password stored on it, because you can just verify the password presented by comparing a hashed form of the presented password to the hash you have stored.

    But with a time+password hashing scheme, the server must know the user's password because each time the user logs in, the must construct a new hash from the password and the current time.

    So, if your server is going to know the password, just use a shared secret system like SRP. Then you get two-way mutual authentication too.

    --
    http://lkml.org/lkml/2005/8/20/95
    1. Re:timestamp it and salt it and then hash it? by fgouget · · Score: 3, Insightful

      The point of the trapdoor function is that the server doesn't have to have your password stored on it, because you can just verify the password presented by comparing a hashed form of the presented password to the hash you have stored.

      But with a time+password hashing scheme, the server must know the user's password because each time the user logs in, the must construct a new hash from the password and the current time.

      Not true. The server can just store the salt + hash of the password. Then when a client wants to authrenticate the server sends the salt + random one-time value. The client uses the salt to generate the password hash. Then it concatenates the random value and resulting hash and hashes the whole and sends the result to the server. The server too computes the hash of the concatenated random value and password hash. It then compares that with what the client submitted. If it matches then the client had the right password. The hash sent by the client cannot be used for replay attacks because the random value will be different for the next login. The server does not know the user password and the hash is salted making it hard to recover the user password (which helps if it was used on other sites). The stolen hash can however be used to authenticate through the login algorithm however.

      There's probably better solutions but this is enough to prove the server does not have to know the user password even if timestamps or one-time random values are used.

  24. Re:bloody hell by Bing+Tsher+E · · Score: 2

    Much as it probably is hard for people to acknowledge, Apple doesn't hire the best and brightest. Historically, like Microsoft, they have bought in most of their 'innovation.'

    They spent many many millions of dollars trying to produce the 'next generation Mac OS (tagilent, pink, whatever including the one they called sagan until Carl Sagan sued them then they changed it to BHA (buttheaded astronomer..))

    Then they gave up because their staff apparently was only producing botique crap and was much more interested in justifying one-button mice than writing good code.

    So they bought NeXT and wrote a pretty layer on top of NeXTStep to use as their 'new' OS.

  25. Re:Absolute garbage! by DnaK · · Score: 2

    us mods can only hide it from people who don't read @ -1 ! :( But i have been reporting these as i see it to admins hoping for a nice IP ban.