开发者

Security concerns regarding username / password vs secret URL

开发者 https://www.devze.com 2023-04-08 20:01 出处:网络
I have a simple site with a sign-up form. Currently the user开发者_Go百科 can complement their registration with (non-critical, \"low security\") information not available at the time of the sign-up,

I have a simple site with a sign-up form. Currently the user开发者_Go百科 can complement their registration with (non-critical, "low security") information not available at the time of the sign-up, through a personal (secret) URL.

I.e., once they click submit, they get a message like:

Thanks for signing up. You can complement your registration by adding information through this personal URL:

      http://www.example.com/extra_info/cwm8iue2gi

Now, my client asks me to extend the application to allow users to change their registration completely, including more sensitive information such as billing address etc.

My question: Are there any security issues with having a secret URL instead of a full username / password system?

The only concern I can come up with is that URLs are stored in the browser history. This doesn't worry me much though. Am I missing something?

It's not the end of the world if someone changes some other users registration info. (It would just involve some extra manual labor.) I will not go through the extent of setting up https for this application.


This approach is not appropriate for sensitive information because it's part of the HTTP request URL, which is not encrypted and shows up in many places such as proxy and other server logs. Even using HTTPS, you can't encrypt this part of the payload, so it's not an appropriate way to pass the token.

BTW, another problem with this scheme is if you send the URL to the user via email. That opens up several more avenues for attack.

A better scheme would require some small secret that is not in the email. But it can be challenging to decide what that secret should be. Usually the answer is: password.


Another potential problem lies with the users themselves. Most folks realize that a password is something they should try to protect. However, how many users are likely to recognize that they ought to be making some sort of effort to protect your secret URL?


The problem here is that although it is hard to guess the URL for any specific user, given enough users it becomes relatively easy to guess a correct url for SOME user.

This would be a classic example of a birthday attack.

ETA: Missed the part about the size of the secret, so this doesn't really apply in your case, but will leave the answer here since it might apply in the more general case.


can complement their registration with (non-critical, "low security") information

It's hard to imagine what user-supplied information really is "low-security"; even if you are asking for a password and a username from your customers you are potenitally violating a duty of care to your customers; a large propertion of users will use the same username/password on multiple sites. Any information about your users and potentially a lot of information about transactions can be used by a third party to compromise the identity of that user.

Any information about the user should be supplied in an enctypted format (e.g. via https). And you should take appropriate measures to protect the data you store (e.g. hashing passwords).

Your idea of using a secret URL, means that only you, the user, anyone on the same network as the user, in the vicinity of a user on wifi, connected to any network between you and the user, or whom has access to the users hardware will know the URL. Of course that's not considering the possibility of someone trying a brute force attack against the URLs.

C.


The secret URL means nothing if you're not using SSL. If you're still having the end-user transmit their identifying information across the Internet in the clear, then it doesn't matter how you're letting them in: They are still exposed.


The "secret URL" is often referred to as security by obscurity. The issue is that it is super simple to write a script that will attempt various combinations of letters, symbols, and numbers to brute force hack this scheme.

So if any sensitive information is stored you should definitely use at least a username and password to secure it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号