Clear-text Passwords In Web Sites
Paw Prints: Writings of the maddog
Recently I had forgotten what password I had used for a web site, and I politely asked them to reset the password so I could log in and change it. Instead the site sent me my old password, in clear-text through email.
After I got over the shock of seeing the current password in my email I went onto the site and changed the password to a not-very-flattering noun which had something to do with a combination of excrement and the flabby pieces of nerve endings in the website manager's collective craniums. Then I proceeded to make sure there was nothing on that site of any value. I did consider just deleting the account, but I was curious as to how this site operated and how it would play out.
Interestingly enough, this site sends out a “reminder” email every month, and puts the user's password in that email as clear-text. I guess their clientèle forgets their passwords a lot, but I am about to tell the web-master (in polite terms) that this is an unsafe practice.
I was astonished that anyone would store a password as clear-text, and even more astonished that someone would send that password through email.
Unix, of course, has had encrypted passwords for a very long time. More than just encrypting the password, part of the encrypted password is thrown away, so you can not de-encrypt the stored string to discover the password. Each time a person logs in, the encryption algorithm is applied, the encrypted string is truncated to the same length as the stored string and the two strings are compared to see if they are equal. If they are, the user is given access to the system.
The password file in Unix and Linux was (and still is) readable by anyone, and storing the encrypted password in the /etc/passwd file allowed someone to try and break the password by “brute force”, usually by encrypting all the words in the dictionary plus some key phrases and then comparing those encrypted words with the encrypted passwords in the password file. People who make their passwords a single word, or their birthday, or a common name are vulnerable. It would have been better to make the file /etc/passwd only readable by “root”, but by the time that realization occurred it was too late. Too many programs were reading the /etc/password file directly, and taking away the ability to access the passwd file completely would break those programs.
After a while the password field was moved to a “shadow” password file, the shadow only readable by “root”, and all of the other fields in /etc/passwd stayed the same with the exception of the /etc/passwd file having an “x” in the place of the encrypted string. Since the programs that looked at the passwd file typically did nothing with the encrypted password itself, most programs that used the passwd file did not notice that the contents of the password field was simply changed to an “x”.
There is nothing which stops a web site from using the same type of technologies and ideas for maintaining their own password mechanisms, yet we continue to hear about sites that are compromised and thousands of passwords are stolen, leading to identity theft.
I know I am preaching to the choir, but if one webmaster who participates in a site that stores clear-text passwords sees this and stops the practice, it will be worthwhile.
Carpe Diem!
Comments
comments powered by DisqusSubscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
clear text passwds
I too have had this occur to myself.