Root Password Readable in Clear Text with Ubuntu 520
BBitmaster writes "An extremely critical bug and security threat was discovered in Ubuntu Breezy Badger 5.10 earlier today by a visitor on the Ubuntu Forums that allows anyone to read the root password simply by opening an installer log file. Apparently the installer fails to clean its log files and leaves them readable to all users. The bug has been fixed, and only affects The 5.10 Breezy Badger release. Ubuntu users, be sure to get the patch right away."
Open source (Score:5, Funny)
The cyberpunk credo comes to mind... (Score:5, Funny)
Open Password! (Score:5, Funny)
Re:Open Password! (Score:5, Funny)
Re:Open Password! (Score:5, Interesting)
Choose strong obscure passwords (Score:5, Interesting)
Many people know how to generate these special characters but I'll mention anyway: using the ALT/META key and the NUMPAD keys. Having a character map printout handy so you know the DEC (decimal) values of these special characters is a good idea if you decide to implement one of these passwords. Punch in ALT-DecimalValue with number lock on.
They may not work in some situations if special characters and not allowed, but you'd be surprised that they do work most often.
I bet most dictionary attacks don't run through many special characters. The cracker is lazy too and will probably not even consider that you chose a funny character which does not even exist on the keyboard.
Remember not to use NULL (#0) though, for crying out loud.
Re:Choose strong obscure passwords (Score:3, Interesting)
Re:Choose strong obscure passwords (Score:3, Interesting)
Re:Choose strong obscure passwords (Score:5, Funny)
Re:Choose strong obscure passwords (Score:3, Informative)
How about
#include <string> ? Radical, I know, but you have to put strings that contain their length and can contain nul somewhere!
Re:Choose strong obscure passwords (Score:3, Interesting)
The game would show the passcode as a series of periods ("."), replacing a random number of them with the actual codes. By using several of these devices, you could get several or all of the characters in the passcode by rep
Re:Open Password! (Score:3, Informative)
Dunno - presumably it's long been in any password cracker out there? Along with "none" or "password" or any other "clever" password there is?
Re:Open source (Score:3, Funny)
Solution (Score:5, Informative)
Re:Solution (Score:5, Insightful)
(Only passwords used during the install are written to the file in question.)
Re:Solution (Score:4, Insightful)
Make sure you remove permissions for users to change the root password though. On a default Ubuntu install all a user need do is sudo passwd and enter root's new password (no need to enter the old one).
Re:Solution (Score:5, Informative)
I asked them (again and again) "surely you are setting this to something?" and they all said no. It is now perfectly clear that the people answering my questions had no clue... having a password you don't know about is worse than having a password only you know.
No. The default Ubuntu install sets *no* root password. None. Not "one you don't know".
As others mentioned, the password under discussion here is a user account password (for an account with full sudo privileges, so it's effectively root).
Re:UNIX mouse driver released (Score:5, Informative)
Since long before MS-DOS had them:
Look. [wikipedia.org].
Re:Solution (Score:3, Informative)
Re:Solution (Score:3, Informative)
cat
Re:[easier] Solution (Score:4, Informative)
Whoops! You are of course completely right...
Just goes to show that you can't be half-assed about password security
Mod my [easier] solution into the ground mods!
Open a terminal and type: (if it returns your password, you're vulnerable (wait) (if it doesn't return your password, you're no longer vulnerable)
The 'mypasswd' string grepped for above will immdiately preceed your primary user password
Re:Open source (Score:2)
Saw this on Digg (Score:3, Insightful)
Re:Saw this on Digg (Score:5, Insightful)
The bias here on slashdot sometimes makes me sick.
Grow up people!
Re:Saw this on Digg (Score:2)
Re:Saw this on Digg (Score:5, Insightful)
Be honest. Everyone here knows that storing the root password as plain text is a clear program error. And since GNU/Linux is a rather secure OS that doesn't have this vulerability in any other distro, this code was added by the Ubuntu team. If this is the quality of code that the Ubuntu team is developing for it's distro, though, I do have to question why it is so popular. Why was such an obvious mistake missed? Who forgot to check how the root password is stored? Who forgets that kind of thing? Not the kind of developer I'd want to trust with my security, I'll tell you what.
Re:Saw this on Digg (Score:5, Interesting)
Interestingly enough Microsoft did make pretty much the same mistake, with Microsoft SQL 7, both servicepack 1 & 2. They wrote the SQL administrator password to the installation log file, which would give you full access to any SQL database on the server. Written to a logfile in the TEMP folder, which by default has full read/write access for any user on the system.
Security bulletin: https://www.microsoft.com/technet/security/bullet
(The 'non-recommended' mode mentioned is using SQL authentication instead of windows NTLM authentication, which much more common then they try to make it sound)
Re:Saw this on Digg (Score:5, Informative)
Summary
On May 30, 2000, Microsoft released the original version of this bulletin, to announce the availability of a patch that eliminates a security vulnerability in Microsoft® SQL Server® 7.0 Service Packs 1 and 2 installation routine. When run on a machine that is configured in a non-recommended mode, the routines record the administrator password in a log file, where it could be read by any user who could log onto the server at the keyboard.
On June 15, 2000, the bulletin was updated to note that, under the same conditions as originally reported, the password also is recorded in a second file. A new version of the patch is available that prevents the password from being recorded in either file.
On May 10, 2001, the bulletin was updated to note that Service Pack 3 is also affected by this vulnerability. A new patch is available for SP3 and we are also providing a command line utility (post Service Pack deployment) to remove all instances of the SA password written in either file via Q263968.
So not only did they have a similar problem, it persisted for over a year after initially being found & alledgedly fixed.
Re:Saw this on Digg (Score:5, Insightful)
This is a consequence of Ubuntu's different security model. You can't be root in Ubuntu; you have to consciously make the decision to run software as root by typing 'sudo' before it. (Actually you can run a shell under sudo, but still.) The idea was that since you can't login as root, the system is more secure and resists exploits that try to gain root access. This vulnerability is the kind of stupid mistake people make sometimes. A brain fart. Nothing really malicious, and not the sign of an incompetent programmer. Something you could've done.
Most Windows vulnerabilities are that, too. There's just more of them. And the system is inherently less secure, so it doesn't resist those quite as well. And it's harder to update because it's a monolithic kludge. Of course, some Windows vulnerabilities are just the product of poor design.
And another thing, if this happened, /. would bash Microsoft insanely. True. There is a bias. But still, I highly doubt the issue would be fixed in the same day, on a Sunday, and the update would be availiable quickly and painlessly.
Re:Saw this on Digg (Score:5, Interesting)
You can't be root in Ubuntu; you have to consciously make the decision to run software as root by typing 'sudo' before it. (Actually you can run a shell under sudo, but still.) The idea was that since you can't login as root, the system is more secure and resists exploits that try to gain root access. This vulnerability is the kind of stupid mistake people make sometimes.
There is another stupid vulnerability I noticed in Ubuntu, which relates directly to the missing root password: If something goes wrong during system startup (e.g. a failed fsck), usually you are prompted for the root password to open the rescue console and fix the issue. Not so with Ubuntu: Since there is not root password, you will be thrown into a root shell without any hesitation. Kind of strange, is it? One could argue that once you have physical access to the system, you have a lot of possibilities to circumvent the system's security, but I found this issue to be rather harsh.
Re:Saw this on Digg (Score:4, Interesting)
Encrypting the hard drive is an answer, but then you have the problem of where do you store the key to access it? If it's stored in the bootloader or the kernel then that can be extracted by the attacker if they have physical access to the system. This is basically the same as the DRM problem - you can encrypt the content but you always have to decrypt it to use it so you need the key stored somewhere and that is always a possible attack vector.
Also, you need to think very carefully about the ramifications of encrypting data - if you lose the key you're screwed.
Encrypting the hard drive using keys stored in Palladium is an option but it only protects you from someone removing the drive and installing it in another machine, and again - if you motherboard (with it's Palladium chip) blows up you're buggered.
Re:Saw this on Digg (Score:5, Insightful)
Re:Saw this on Digg (Score:5, Insightful)
Patching is quite frankly irrelivent with this bug. While it certainly has to be done to close the hole in the future, there are already hundreds of thousands of Ubuntu systems out there with the password sitting on the disk. How are you to be sure as an administrator that the password has not been compromised already? What about backup copies that might have the password?
The fix is to change the administrator/root password. The bug only affects a system at install-time, and it will continue to affect new installs so long as the broken installer is floating around. Patching it today is hardly more effective than patching it on April 6.
Re:Saw this on Digg (Score:2)
It's been a while since I installed an Ubuntu system, but I believe that during the install you have the option of instaling updates. If you refuse, once you're logged in you'll see the red icon saying updates are available. At that point, it's the user's fault if the file with the PW is sti
Re:Saw this on Digg (Score:5, Insightful)
One of Ubuntu's big things is giving out free cd's, in particular targeted to people who don't know what linux is. Me and my roommates actually had a 100 or so Ubuntu CDs, most of which we've given away. We both run Fedora, it fits our needs as "powerusers" better, but give out Ubuntu simply out of convenience and to help the "cause". They are both nice distros, but security is definitely one area where Fedora surpasses all of the other distros.
Fedora makes security transparent to the user, you're running SELinux but would never know it unless you needed to, you're running exec-shield but you'd never know it unless you needed to, all the major services are compiled to randomize memory mappings, but the user is none-the-wiser. That goes for advanced and beginning users. I can install Fedora and be fairly certain that even if somehow my system stopped updating, that any vulnerabilities found would be stopped by these additional measures anyway. The measures in place make most buffer overflows useless and even if you somehow got passed all of the measures to prevent overflows and you got root through an exploit in a vulnerable service (despite that the services don't run as root), SELiux would probably still make your entry pretty pointless.
The point I'm making is, the differece between a secure OS a non-secure OS are ones where even without updates, the security measures in place are foward looking and work to prevent current unknown attacks. Fedora has damn near perfected this, but if any of the users of the Ubuntu CDs I've given out somehow managed to disable updates, they are screwed now. There should never be a situation like that. Bravo on the response time, but seriously the users most likely to be affected don't read
Regards,
Steve
Re:Saw this on Digg (Score:3, Informative)
But occationally it gets the file labels fucked up causing things to stop working. The Fedora people refuse to acknowledge there is a bug, after all you can just touch
all the major services are compiled to randomize memory mappings, but the user is none-the-wiser.
If you had actually been usin
Re:Saw this on Digg (Score:5, Informative)
Actually they reflect reality and are the result of customer requests.
In managed environments, patches are almost never applied ad-hoc, as they are released. They are collected together then tested and rolled out on a schedule, usually monthly.
Re:Saw this on Digg (Score:4, Interesting)
I know this rationale gives everybody the warm fuzzies, but this is still a really bone-headed mistake. You guys really shouldn't be this forgiving about it.
Time From Discovery to Patch (Score:5, Insightful)
Yet how long has this massive fault been sitting there waiting for the first person to discover it? How do we know that the public acknowledgement of it was the first actual discovery of it?
I believe Breezy was released in October, so for five months install logs have been sitting, world-readable, often with the root password. Surely in that time someone well less savoury motives did a simple grep of an install looking for the most trivial of faults.
Feeling confident in the speed of the patch relies upon the belief that no one with nefarious motives discovered it before a benevolent bug submitter did.
Awesome (Score:2, Insightful)
Within the same 30 seconds a post appeared following mine comparing the fix (which has the massive complexity of deleting some log files) with Microsoft's WMF fix, exactly as predicted. Beautiful, and so predictable.
Re:Awesome (Score:2)
Re:Time From Discovery to Patch (Score:5, Insightful)
Anybody with an ounce of common sense should know that you never leave a critical password floating around in plain text. Not in memory, not in swap and you never print it to a bloody log file. Who's going to want to check it?
Passwords are supposed to be non-reversable. The NetBSD installer seems to run the passwd command directly during installation, so the installer never sees the password. Did somebody get the bright idea of prompting for the password in their own UI when the graphical installer was done? This should have been caught. The design of the installer is at fault. Not the log file. I wouldn't count this one as fixed until the installer never sees the password. Sorry for the rant.
Re:Time From Discovery to Patch (Score:3, Interesting)
windows (Score:3, Funny)
steenkin batchers (Score:5, Funny)
I knew I never should have trusted those badgers.
Smiling at me with their big cartoon teeth, eating up all the aspen, wanting to admin their own machines.
I've been a sap, and it's going to cost me.
And now I'm worried about the hedgehogs.
Place it in context of surroundings (Score:2, Insightful)
Re:Place it in context of surroundings (Score:5, Insightful)
WTF are you smoking? No modern OS sets up an unpassworded root account by default, especially on a multiuser system. And if they did, there would be no expectation of security. Here, there is the expectation of security, and it is violated.
In fact, this attack is even worse than the average privilege escalation vulnerability, because a) it's amazingly stupid on the part of the programmer and b) the attacker gains not just root priveleges but the root password, which is often reused by less-paranoid users for other purposes.
Re:Place it in context of surroundings (Score:3, Informative)
He means remote access, like Remote Desktop/Terminal Services, or shared file access (if simple file sharing is turned off; the concept doesn't apply if it's on, since everybody authenticates as guest anyway in that case), VPN server access (when XP itself is acting as a VPN server), remote registry access, remote process control, etc. etc., as well as the RunAs command to run software under a different account than the currently logged on desktop. N
Colin Watson's response was very professional (Score:4, Informative)
So what if this was fixed quickly. (Score:5, Insightful)
Legal before security-the openssl vs netatalk mess (Score:5, Interesting)
The netatalk package, which provides Appletalk services (most commonly used servies are AFP, ie filesharing, and papd, the printing spooler), isn't compiled in with ANY encrypted password support. If you connect to a debian or debian-based appletalk fileserver, you get a warning you are transmitting your password in clear-text. Yes, we're jumping about 10 years BACKWARDS in security.
Why? Because the legal-circle-jerk that is the debian-legal mailing list, decided that it wasn't "legal" to link netatalk (a GPL project) to OpenSSL (license supposedly incompatible with GPL.) This doesn't stop every other distribution on the planet from compiling netatalk with openssl, and hence supporting encrypted passwords.
They politely suggested that GnuTLS, which isn't even remotely drop-in, be used instead. That was back in 2002...and the issue still hasn't been addressed. I filed a bug on it and the bug was simply ignored.
Re:Legal before security-the openssl vs netatalk m (Score:5, Insightful)
This has been discussed at length, and OpenSSL's license is GPL incompatible. Everyone else may simply think it's ok to bend the rules, and that they won't ever get sued for it. That's not a safe assumption for a volunteer-based distribution.
This doesn't stop every other distribution on the planet from compiling netatalk with openssl, and hence supporting encrypted passwords.
"Everyone else breaks the rules, so its ok." That doesn't work for speeding tickets, and it doesn't work in contract/license disputes.
They politely suggested that GnuTLS, which isn't even remotely drop-in, be used instead. That was back in 2002...and the issue still hasn't been addressed. I filed a bug on it and the bug was simply ignored.
Maybe you and any other users of appletalk on unsecure networks ought to band together and fix it. Alternatively you can just switch distributions or upgrade your networking from appletalk (a 1980s protocol, since you were talking about being 10-years backwards).
Does it suck? Yes. It sucks that the OpenSSL people won't change their license, and upstream netatalk doesn't care either. However Debian would risk legal action against ALL users if they break the law, even though 1% of the users use this package. They chose the solution for 99% of their users, which is the best you can hope for in an esoteric case like this.
"you should fix it" is elitist bullshit (Score:3, Insightful)
Secure password authentication in AFP was introduced at least 10 years ago. We're talking about AppleSHARE here, Mr. Genius. A protocol fully maintained and used extensively on current hardware. I'll switch to SMB when it offers the same level of performance as AFP (it doesn't, not even close, in raw transfer speed or directory operations) a
Re:"you should fix it" is elitist bullshit (Score:3, Insightful)
And anyway, you may find in this post-SOX world that administrators care a bit more about the legality of their software than you may think.
Re:So what if this was fixed quickly. (Score:4, Insightful)
The problem here is that the main user password (Ubuntu doesn't have a root password) is asked through the questions dialogue in the installer. Everything here is automatic and the questions dialogue just simply records everything down in a file called "questions.dat". It's a serious error for a programmer sure, but it's just a lack of thinking of everything when programming, which is what every single security hole is caused by, lets face it. You could just as easily say everyone who doesn't check their arrays every single time no matter what shouldn't be let within ten feet of gcc, but alas even the best make mistakes. Not only this, but someone who doesn't check every array may be letting through a remote exploit, which is much much more serious than this bug.
The mantra of course applies here: Unless you've programmed a totally secure operating system, keep your mouth shut.
Re:So what if this was fixed quickly. (Score:4, Informative)
Re:So what if this was fixed quickly. (Score:3, Informative)
For the record:
Re:So what if this was fixed quickly. (Score:3, Insightful)
Joking aside, if you apply that little mantra of yours to other scenarios, you'll see how silly it is. How about "Don't criticise Gigli unless you've produced the perfect film"? How about "Don't criticise your plumber for not fixing your leak and flooding your basement until you've laid the perfect pipe"? How about "Don't criticise your goverment until you've ruled over the perfect society"?
You do not need to be an expert to see when an
Agreed. (Score:3, Informative)
For debugging purposes, you MAY want to print out entered values. However, you don't do this in the main log. For a start, if you're debugging, you don't want to have to search through tonnes of text. You want to find the error fast. You theref
Re:So what if this was fixed quickly. (Score:3, Insightful)
Re:MOD PARENT UP (Score:3, Funny)
/etc/motd?
(Just in case...)
Despite this little pasword issue... (Score:2, Insightful)
Re:Despite this little pasword issue... (Score:4, Informative)
I run Ubuntu on my laptop and FC4 on my workstation. Ubuntu is great for office type stuff: word processing and email. A surprising number of printers work out of the box.
But I also want to use the laptop for development and here I have struck a few problems. Development libraries are not installed by default (fair enough) but I got into loops trying to install Motif development libraries thorugh apt. I tried to copmpile motif but hit significant dependency problems in the process.
In general I don't think Ubuntu is suited to development work. I am considering dual booting the laptop with another OS for that purpose. But I do continue to recommend it to non-technical people who need to reinstall their systems.
Preview of 5.10 Not Affected (Score:2, Informative)
Interesting juxtaposition (Score:5, Insightful)
Look at the slashdot summary. "An extremely critical bug and security threat". Compare with the OSX bug which was written off because it's not remotely exploitable.
Apple hasn't even acknowledged that the OSX privilege escalation exists, let alone patched it.
Apple did patch the recent OS X holes (Score:2, Informative)
I agree with you regarding the different attitudes regarding this hole and the OS X holes. But I believe the recent OS X holes were indeed patched with Apple's March 2006 Security Update (though some websites are questioning whether the patches really fixed the underlying problems or merely placed band-aids on them).
http://docs.info.apple.com/article.html?artnum=303 382 [apple.com]
For Ubuntu 5.10 users: (Score:2, Informative)
What does patch help? (Score:4, Insightful)
What does this patch fix? The installer? Sorry, but the installer is burned in the installation media, and a patch can be applied only after the installer has been run. So updating the system or even upgrading to Dapper (where it has been fixed) doesn't help. So....patch whAt???
No really, the installation ISO images should be fixed immediately and redistributed.
Also saying that it "only affects The 5.10 Breezy Badger release" may be a bit belittling, as probably most people have installed exactly that release.
Re:What does patch help? (Score:3, Informative)
What does this patch fix? The installer?
No, the patch removes that key from the file, and chmod's it 600.
Re:What does patch help? (Score:3, Informative)
If the problem is in the installer which is only run once, am I correct in assuming that using a 'dummy' password during the install and changing it afterwards will leave only the dummy password on disk?
I wish the Ubuntu people were a bit more proactive in their security, though.
Re:What does patch help? (Score:3, Interesting)
You think that--within one week of installing--someone who already has a valid login to your machine would have 0wned your box using this security hole? What, was it a server or something?
If it was just your desktop machine, then yeah, this is crappy, but it's hardly a disaster, and the odds are pretty good that not even one person running Ubuntu on a simple desktop machine was harmed by this at all.
If the pro
OpenBSD (Score:2)
I can't believe.... (Score:2)
Is this a "badger hole"?
Hey, someone *had* to say it. Laugh.
Strat
Use the right tool... (Score:5, Insightful)
Re:Use the right tool... (Score:4, Interesting)
Whew! (Score:2, Funny)
Patch mirror (Score:3, Insightful)
PASS="my_root_password"
echo "Why would anyone log a password in the installer?\n"
find
echo "Why would anyone have
chown -R root:root
chmod -R o-rwx
echo "All done, thanks for using Atomic-Penguin\'s unofficial ubutnu patch!\n"
Re:Patch mirror (Score:4, Informative)
Does not apply to expert mode installs (Score:3, Interesting)
https://launchpad.net/distros/ubuntu/+bug/34606 [launchpad.net]
Re:Does not apply to expert mode installs (Score:3, Interesting)
Real Solution: CHANGE YOUR PASSWORD (Score:4, Insightful)
The patch (unless it goes out and deletes the offending files) is only going to patch the installer (which you're probably never going to run again). You're still going to have a cleartext copy of your original admin password sitting on the box in a file with read-other permissions.
Even if the files get deleted (or have their permissions changed), you still have no idea as to whether somebody has read the files since October.
BTW: Are they re-burning the installation CDs?
Re:Real Solution: CHANGE YOUR PASSWORD (Score:3, Informative)
I've been +5 wrong a few times. It's always a bit embarrassing. Stupid moderators. :)
The fix does indeed fix the problem file. I applied it this morning, and afterwards the file in question (/var/log/debian-installer/cdebc
Re:I believe this is a feature (Score:2, Informative)
Re:I believe this is a feature (Score:2, Informative)
Re:I believe this is a feature (Score:2, Informative)
Re:I believe this is a feature (Score:2)
Re:I believe this is a feature (Score:2)
Should ask to reset the root password. You can then use 'su' to evoke a shell as the root user.
Comment removed (Score:5, Informative)
Re:Just in case (Score:2)
No it has a random password, which I assume is the password in the log file.
Re:Just in case (Score:3, Informative)
The password in the log file was the primary account's password. This account is a member of the sudoers group, so the same password can get you root access.
Re:Just in case (Score:3, Informative)
Re:Just in case (Score:2, Interesting)
Re:okay (Score:4, Funny)
Sunday is probably peak development time for free software.
Re:okay (Score:5, Informative)
You're an idiot (Score:2)
Microsoft's security issues often are the result of an issue that requires code re-writes and changes. It takes time to do that, compile it, and test it. There is a huge difference between this tiny flaw and a buffer overflow in Windows Media Player.
Re:okay (Score:3, Insightful)
Re:okay (Score:4, Insightful)
Re:Root password should never be recorded, ever (Score:3, Interesting)
I assume that the OpenBSD installer runs passwd to set the root password during installation, similar to NetBSD.
But if either of these OS's went to a graphical installer they would need to write a graphical passwd command which makes an effort to keep the plain text out of swap files, insecure memory, etc.
Th
Re:first rule (Score:4, Funny)
If you tried this on my system, it wouldn't work, it would say your password is too short.
Re:Root account not activated during installation (Score:3, Insightful)