I want to use security through obscurity for the admin interface of a simple website. Can it be a problem?

StackOverflow https://stackoverflow.com/questions/1486673

Question

For the sake of simplicity I want to use admin links like this for a site:

http://sitename.com/somegibberish.php?othergibberish=...

So the actual URL and the parameter would be some completely random string which only I would know.

I know security through obscurity is generally a bad idea, but is it a realistic threat someone can find out the URL? Don't take the employees of the hosting company and eavesdroppers on the line into account, because it is a toy site, not something important and the hosting company doesn't give me secure FTP anyway, so I'm only concerned about normal visitors.

Is there a way of someone finding this URL? It wouldn't be anywhere on the web, so Google won't now it about either. I hope, at least. :)

Any other hole in my scheme which I don't see?

Was it helpful?

Solution

Well, if you could guarantee only you would ever know it, it would work. Unfortunately, even ignoring malicious men in the middle, there are many ways it can leak out...

  1. It will appear in the access logs of your provider, which might end up on Google (and are certainly read by the hosting admins)
  2. It's in your browsing history. Plugins, extensions etc have access to this, and often use upload it elsewhere (i.e. StumbleUpon).
  3. Any proxy servers along the line see it clearly
  4. It could turn up as a Referer to another site

OTHER TIPS

some completely random string which only I would know.

Sounds like a password to me. :-)

If you're going to have to remember a secret string I would suggest doing usernames and passwords "properly" as HTTP servers will have been written to not leak password information; the same is not true of URLs.

This may only be a toy site but why not practice setting up security properly as it won't matter if you get it wrong. So hopefully, if you do have a site which you need to secure in future you'll have already made all your mistakes.

I know security through obscurity is generally a very bad idea,

Fixed it for you.

The danger here is that you might get in the habit of "oh, it worked for Toy such-and-such site, so I won't bother implementing real security on this other site."

You would do a disservice to yourself (and any clients/users of your system) if you ignore Kerckhoff's Principle.

That being said, rolling your own security system is a bad idea. Smarter people have already created security libraries in the other major languages, and even smarter people have reviewed and tweaked those libraries. Use them.

It could appear on the web via a "Referer leak". Say your page links to my page at http://entrian.com/, and I publish my web server referer logs on the web. There'll be an entry saying that http://entrian.com/ was accessed from http://sitename.com/somegibberish.php?othergibberish=...

As long as the "login-URL" never posted anywhere, there shouldn't be any way for search engines to find it. And if it's just a small, personal toy-site with no personal or really important content, I see this as a fast and decent-working solution regarding security compared to implementing some form of proper login/authorization system.

If the site is getting a big number of users and lots of content, or simply becomes more than a "toy site", I'd advice you to do it the proper way

I don't know what your toy admin page would display, but keep in mind that when loading external images or linking to somewhere else, your referrer is going to publicize your URL.

If you change http into https, then at least the url will not be visible to anyone sniffing on the network.

(the caveat here is that you also need to consider that very obscure login system can leave interesting traces to be found in the network traces (MITM), somewhere on the site/target for enabling priv.elevation, or on the system you use to log in if that one is no longer secure and some prefer admin login looking no different from a standard user login to avoid that)

You could require that some action be taken # of times and with some number of seconds of delays between the times. After this action,delay,action,delay,action pattern was noticed, the admin interface would become available for login. And the urls used in the interface could be randomized each time with a single use url generated after that pattern. Further, you could only expose this interface through some tunnel and only for a minute on a port encoded by the delays.

If you could do all that in a manner that didn't stand out in the logs, that'd be "clever" but you could also open up new holes by writing all that code and it goes against "keep it simple stupid".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top