哪些攻击可能涉及我的安全层概念? [英] Which attacks are possible concerning my security layer concept?

查看:220
本文介绍了哪些攻击可能涉及我的安全层概念?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管有使用SSL / https / etc的所有建议。我决定在我的应用程序的http顶部实现我自己的安全层...概念工作如下:

Despite all the advices to use SSL/https/etc. I decided to implement my own security layer on top of http for my application... The concept works as follows:

User registers -> a new RSA Keypair is generated
the Private Key gets encrypted with AES using the users login Password
(which the server doesnt know - it has only the sha256 for authentication...)

Server stores the hash of the users password
 and the Encrypted Private Key and Public Key

User logs in -> authenticates with nickname+password hash
(normal nick/password -> IP-bound sessionid authentication)
Server replies: sessionid, the Encrypted RSA Private Key
    and an Encrypted randomly generated Session Communication Password

Client decrypts the RSA Private Key with the users Password
Client decrypts the Session Communication Password with the RSA Private Key

---> From this point on the whole traffic gets AES-encrypted
     using that Session Password

在这个链中没有洞 - 私人密钥和登录密码都不会作为明文发送到服务器(我不使用cookie,排除HTTP Cookie头包含敏感信息的可能性)...但我是有偏见,所以我问 - 我的安全实现是否提供足够的安全性?

I found no hole in that chain - neither the private key nor the login password get ever sent to the server as plaintext (I make no use of cookies, to exclude the possibility of the HTTP Cookie header to contain sensitive information)... but I am biased, so I ask - does my security implementation provide enough... security?

推荐答案

我不是加密或安全但是我确实看到一个严重的缺陷:

I'm not a crypto or security expert by any means, but I do see one serious flaw:

客户端没有办法知道它正在运行正确码。使用SSL / TLS,您的浏览器供应商和服务器软件供应商都实现了一个同意的标准。你不需要告诉浏览器SSL是如何工作的,它内置的,你可以相信它工作正常和安全。但是,在你的情况下,浏览器只通过从你的服务器接收纯文本JavaScript来学习正确的协议。

There is no way the client can know that it is running the right crypto code. With SSL/TLS there is an agreed upon standard that both your browser vendor and the server software vendor have implemented. You do not need to tell the browser how SSL works, it comes built in, and you can trust that it works correctly and safely. But, in your case, the browser only learns about the correct protocol by receiving plain-text JavaScript from your server.

这意味着您永远不会相信客户端实际运行的是正确的加密代码。任何中间人都可以提供与您通常提供的脚本行为相同的JavaScript,只是它将所有解密的消息发送到攻击者的服务器。客户没有办法防范这种情况。

This means that you can never trust that the client is actually running the correct crypto code. Any man-in-the-middle could deliver JavaScript that behaves identically to the script you normally serve, except that it sends all the decrypted messages to the attacker's servers. And there's no way for the client to protect against this.

这是最大的缺陷,我怀疑这是你的解决方案的致命缺陷。我没有看到一个办法。只要您的系统依赖于将加密代码提供给客户端,您就总是容易受到中间人攻击。除非,您通过SSL传递了该代码:)

That's the biggest flaw, and I suspect it's a fatal flaw for your solution. I don't see a way around this. As long as your system relies on delivering your crypto code to the client, you'll always be susceptible to man-in-the-middle attacks. Unless, of course, you delivered that code over SSL :)

这篇关于哪些攻击可能涉及我的安全层概念?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆