惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
腾讯CDC
Y
Y Combinator Blog
L
LangChain Blog
B
Blog
U
Unit 42
P
Proofpoint News Feed
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
WordPress大学
WordPress大学
月光博客
月光博客
Vercel News
Vercel News
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗

ashishb.net

A day in Luxembourg - the richest country in the world I was asked to install malware during a fake interview Book summary: Breakneck - China's quest to engineer the future by Dan Wang Book summary: How to Teach Your Baby to Read Book Summary: The Discontented Little Baby Book by Pamela Douglas Introducing Amazing Sandbox - run third-party tools and AI agents securely on your machine Why software outsourcing gets a bad reputation? Book summary: The Natural Baby Sleep Solution by Polly Moore A day in Antwerp, Belgium Journey of online influencers Two days in Brussels, Belgium Shortcuts - when we love them and when we don't A visit to Rakhigarhi Three days in overhyped Paris Empty Japan, crowded Tokyo The real lock-in in GitHub is not the code, but the stars 11-day Norwegian Breakaway East Caribbean cruise Sanskrit and Sri Lankan Air Force Use REST with Open API The Achilles heel of American capitalism Costa Rica in 4 days At a juice stall in Sri Lanka A short stay at Warsaw, Poland Best practices for using Python & uv inside Docker Two days in Vilnius, Lithuania How IntelliJ IDEs waste disk space Pregnancy Why there aren't many digital nomads from India Two days in Riga, Latvia To keep your machine secure, run third-party tools inside Docker
How do you store my password?
Ashish Bhatia · 2011-05-16 · via ashishb.net

As the world moves towards cloud-based storage and computing, the task of storing our data on a PC hard disk is being replaced with cloud-based storage providers. This includes our emails, social data, professional data, and financial data. Accessing this data requires authentication, despite its various limitations, username and password are still the standard way of authentication [though OpenID is slowly becoming popular]. One thing which is crucial in this case is how web services store user’s password.

The password is more important than data

  1. Access to password implies access to user’s data(but not vice versa) - of course, unless the web service enforces at least one other factor for authentication.
  2. Password reuse is extremely common - if someone is able to get access to user’s password on a social networking site, it can be used to compromise his data stored on (say) email service.
  3. Unethical employees- an unethical employee who might have (legitimate) access to user’s data [for technical reasons], might find it tough to read/manipulate user data in a corporate environment where [due to network monitoring] since chances of getting caught are pretty high. If he is able to access user’s password, he can access user’s data from the comfort of home [and behind anonymous proxies]

If a user is accessing a web service over SSL, only the user [or user’s browser to be precise] and the web service gets to see the password. While spear phishing, dns poisoning (with fake certificates) are popular ways used by attackers to get the password from the user, password leaks as a consequence of the attack on servers not that uncommon anymore. Especially, it is easy for an attacker to target small companies, harvest password [and reuse them to gain access to user’s data on other sites].

How web services store password

There are three primary ways for a web service to store password -

  1. Plaintext The password is stored “as-is”, an attacker who has gained control can read the passwords. An in-house encryption technique is no different from plain text password since it has not been proved to be unbreakable.
  2. Encrypted The password can be recovered using a key whose access is presumably more limited than encrypted data itself. But this can freak out tech-savvy people and is also bad, since if any employee who is able to get to see the password once, can always access data later on. (even from an external network)
  3. One-way hash (best choice) One way hash has the property that one can verify whether the user knows the password or not without actually storing the password itself. The password-to-hash function is fast while there are no known ways to reverse it (except brute-force which is extremely slow). A properly chosen hash (eg. SHA-1 hash) is the best choice. Gawker used md5 which can be cracked using brute-force.

Need for disclosure Given that passwords are crucial, what we need is a self-disclosure policy on the part of web services to tell us how they store our password. And yeah, this should be a one-line disclosure and not pages full of terms-of-service which only lawyers understand. This disclosure should also further include whether the password gets logged as a part of regular network activity or not. Business Insider alleged that passwords saved as a part of normal network logging activity have been used earlier.