我想通过模糊性为一个简单网站的管理界面使用安全性。这会是一个问题吗?
为了简单起见,我想对网站使用这样的管理链接:
http://sitename。 com/somegibberish.php?othergibberish=...
所以实际的 URL 和参数将是一些完全随机的字符串,只有我知道。
我知道通过隐匿性实现安全通常是一个坏主意,但是有人可以找出 URL,这是否是一个现实的威胁?不要考虑托管公司的员工和线路上的窃听者,因为它是一个玩具网站,不是什么重要的东西,并且托管公司无论如何也不给我安全的FTP,所以我只关心普通访问者。
有人可以找到这个网址吗?它不会出现在网络上的任何地方,所以谷歌现在也不会关注它。至少我希望如此。 :)
我的计划中还有其他我没有看到的漏洞吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
好吧,如果你能保证只有你自己知道,那就行了。不幸的是,即使忽略中间的恶意人员,它也可以通过多种方式泄露出去......
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...
对我来说听起来像是一个密码。 :-)
如果您必须记住一个秘密字符串,我建议您“正确”输入用户名和密码,因为 HTTP 服务器将被编写为不会泄露密码信息; URL 则不然。
这可能只是一个玩具网站,但为什么不练习正确设置安全性,因为如果你弄错了也没关系。因此,如果您将来确实有一个需要保护的网站,那么您可能已经犯了所有错误。
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.
已为您修复。
这里的危险在于,您可能会养成这样的习惯:“哦,它对玩具这样那样的网站有效,所以我不会费心在另一个网站上实现真正安全性。”
如果您忽略 Kerckhoff 原理,您将对自己(以及系统的任何客户端/用户)造成伤害。
话虽这么说,推出自己的安全系统是一个坏主意。聪明的人已经用其他主要语言创建了安全库,甚至更聪明的人也审查和调整了这些库。使用它们。
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.
它可能会通过“Referer 泄漏”出现在网络上。假设您的页面链接到我的页面 http://entrian.com/,我就会发布我的网络服务器引用日志在网络上。将会有一个条目表明 http://entrian.com/ 是从 http://sitename.com/somegibberish.php?othergibberish=...
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=...
只要“登录 URL”从未发布在任何地方,搜索引擎就不应该有任何方式找到它。如果它只是一个小型的个人玩具网站,没有个人或真正重要的内容,那么与实施某种形式的正确登录/授权系统相比,我认为这是一个快速且可靠的安全解决方案。
如果该网站拥有大量用户和大量内容,或者只是变得不仅仅是一个“玩具网站”,我建议您以正确的方式进行操作
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
我不知道您的玩具管理页面会显示什么,但请记住,当加载外部图像或链接到其他地方时,您的引荐来源网址将公开您的 URL。
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.
如果将 http 更改为 https,那么至少该 url 对于网络上嗅探的任何人来说都是不可见的。
If you change http into https, then at least the url will not be visible to anyone sniffing on the network.
(这里需要注意的是,您还需要考虑到非常模糊的登录系统可能会在网络跟踪(MITM)中留下有趣的痕迹,在站点/目标上用于启用 priv.elevation 的某处,或者在您用来启用 priv.elevation 的系统上如果该登录不再安全,并且有些人更喜欢管理员登录,看起来与标准用户登录没有什么不同,以避免这种情况)
您可能需要执行某些操作 # 次,并且在两次之间有一定秒数的延迟。注意到此操作、延迟、操作、延迟、操作模式后,管理界面将可供登录。并且界面中使用的 url 每次都可以随机化,并在该模式之后生成一个单独的使用 url。此外,您只能通过某些隧道公开此接口,并且只能在由延迟编码的端口上公开一分钟。
如果你能以一种在日志中不引人注目的方式完成所有这些,那将是“聪明的”,但你也可以通过编写所有这些代码来打开新的漏洞,这违背了“保持简单愚蠢”。
(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".