- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
这可能是一个老问题,但我仍然没有找到这个问题的正确答案,所以请耐心等待。我有一个 https 登录页面,它使用表单发布方法并将凭据发送到服务器......等等。
登录时,如果使用IE和F12进行网络监控,点击开始抓包。你可以看到一些类似于登录的 URL,servetloginauth(来自 gmail.com),你可以看到带有你的用户名和密码的请求正文。好吧,有人会争辩说,只有当用户没有注销时你才能看到。
现在注销并且不要关闭浏览器并从任务管理器中获取浏览器转储(任何浏览器,任何版本)(我不确定如何在 Mac 中执行相同操作)。使用 WinHex 编辑器打开转储文件并执行搜索/查找:"password="或实际密码(因为你测试自己的登录,你已经知道你的密码)。您可以看到明文密码。
现在我的问题是,如何屏蔽密码:1.在Post请求URL中2. 或者当浏览器将我的凭据保存到转储时,我需要对其进行屏蔽/加密或者根本不应该保存密码。
我的 jsp 代码:
<s:form id="login" name="loginForm1" action="login" namespace="/" method="post" enctype="multipart/form-data" >
<fieldset><!-- login fieldset -->
<div><!-- div inside login fieldset -->
<div....
<label for="password" class="loginLabel">Password</label>
<input type="password" name="password" id="password" class="longField nofull absPosition" size="16" autocomplete="off" alt="Password" placeholder="Password" title="Password|<
我目前的解决方案如下,但我需要任何替代方案而不需要太多努力。
The password can be read from the memory if it is being sent as cleartext. Using the salted hash technique for password transmission will resolve this issue. Hashing is a cryptographic technique in which the actual value can never be recovered. In the salted hash technique, the passwords are stored as hashes in the database. The server generates a random string, salt, and sends it along with the Login page to the client. A JavaScript code on the page computes a hash of the entered password, concatenates the salt and computes a hash of the entire string. This value is sent to the server in the POST request.
The server then retrieves the user's hashed password from the database, concatenates the same salt and computes a hash. If the user had entered the correct password, these two hashes should match.
Now, the POST request will contain the salted hash value of the password and the cleartext password will not be present in the memory
SHA 256 is a strong hashing algorithm available today – readymade implementations in JavaScript are available and quoted in the "Good Reads" section.
Note: For pages containing sensitive information or pages wherein data can be modified in the database, use JavaScript to flush the memory of the browse
图片如下。
另外,我可以接受花旗银行在其网站上为客户所做的一些事情。我登录了网站,在转储中我看到我的用户名被屏蔽了(因为它出现在网站上),我也需要对密码字段做同样的事情。有人可以向我解释如何去做吗?
最佳答案
您所建议的内容存在严重的安全漏洞。如果您在浏览器上计算哈希值然后发送到服务器(没有密码),那么服务器将无法相信浏览器实际计算了哈希值。黑客可能只是读取了散列值的文件并构造了一个程序来发送散列值。安全来自服务器(一个可信的环境)具有无法从散列中猜测的密码,然后向自己证明密码产生哈希。
如果您同时发送哈希值和密码,那么您还没有解决密码以明文形式提供的问题。
如果您对密码进行多次哈希处理,似乎有一种方法。您可以在浏览器上对密码进行一次(或多次)哈希处理,并将其用于服务器上的后续哈希调用。多次散列似乎很正常(尽管尚不清楚这在多大程度上使其更安全)。关键是浏览器将持有一个中间值,该值不会告诉您用户输入的密码。但是,它仍然会告诉您需要发送到服务器以验证用户身份的值。该值实际上是密码的代理,可用作调用服务器的密码。但是……这不是用户输入的密码。
最后一种方法看起来可行:使用非对称加密。服务器提供盐值和公钥。密码使用公钥加密,只能通过服务器上保存的私钥解密。由于 salt 值在每个 session 中都会更改,因此保存在内存中的加密值本身将无法在另一个 session 中使用。服务器解密该值,提取盐,为其提供密码以继续进行密码验证。
关于java - 如何从 Post 请求 url 和浏览器转储中隐藏密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26940690/
我的“登录”是在 IE 浏览器中进行的,登录后,如果我单击链接,它们就会在 Chrome 浏览器中打开。如何在同一个测试用例中将我当前的浏览器从 IE 切换到 Chrome。如果我创建一个 chrom
您好,我不明白在 Firefox 的内容属性中使用的特殊字符的不同显示行为。我已经剥离了一切并创造了一支笔: http://codepen.io/rpkoller/pen/Fbgav 在其“基本形式”
我正在研究 Spring Data REST,特别是 HAL 浏览器。我一直在关注 http://docs.spring.io/spring-data/rest/docs/current/refere
我正在使用工具提示,在 ie 上出现定位错误。我放了jquery浏览器代码 我的工具提示 $('.tooltip').tooltip({ position: "bottom center"
我应该如何处理蓝鸟协程中的错误? 我使用co in节点已有一段时间,它具有出色的捕获功能。 co(function*() { return new Promise(function(resol
package webviewbrowser; import java.util.List; import javafx.application.Application; import javafx.
我有一些 JavaScript 在同一域上的两个独立服务器之间共享请求。 .com 是 JavaScript 中域的要求吗? 在这种情况下,两台服务器都位于 .abc.tyy 域上,tyy 通常是 .
package webviewbrowser; import java.util.List; import javafx.application.Application; import javafx.
我正在尝试构建仍支持 NPAPI 的先前版本的 Chromium 浏览器。我已经获得了代码,并且可以使用 stand build 命令在我的 mac 上构建最新版本的 Chromium gclient
我环顾四周,找不到 browscap 的 Python 等效项(我在 PHP 中使用它来检测给定的用户代理字符串是什么浏览器。 我希望我不必自己写......:P 最佳答案 看看这个,它应该做你想要的
是否有任何 chrome 或 firefox 扩展允许 javascript 在客户端 PC 中创建写入文件? 最佳答案 你想做什么? HTML5 有一个 File API .这是最好的解决方案,因为
当我点击链接或刷新或关闭标签页时,我有这段代码会发出警报。 但我需要在关闭 窗口(选项卡)上仅 发出警报。怎么做? 我的网站上有很多外部和内部链接。
我目前正在尝试使用 Browserify + Angular,但我遇到了一个奇怪的问题。我在我的 Controller 的子目录中创建了一个名为 controllers/start-controlle
我正在为客户(项目已被接受,但现在是解释不同功能的问题)写一份详细的估算,以开发一个响应式布局的网站。 这不是我第一次进行此类开发,但这是一个关键客户,必须铺平道路。 布局将从 300px 宽度调整到
我在时事通讯上设计了一些黑底白字。由于时事通讯在打印时看起来不错且可读。我需要使布局和文本与浏览器中的内容相似。 通常情况下,黑色文本和无背景颜色是浏览器/网络邮件客户端的默认打印样式吗? 最佳答案
我有一个使用 GWT/mGWT 构建的移动友好网络应用程序。该应用程序有白色输入文本框和深灰色输入文本。但是,在 Android 浏览器上,文本显示为白色,因此是不可见的。我尝试的所有 CSS 都无法
我创建了一个带有选择输入的页面来更改正在使用的 jQuery UI 主题。当主题更改时,它会存储在 cookie 中。页面加载时,如果 cookie 存在,则恢复主题,否则加载默认主题。 当我使用 F
在我的 CSS 中,我使用了以下代码片段: word-break: break-word; -webkit-hyphens: auto; hyphens: auto; 渲染引擎如何知道在所有不同语言中
我的网络浏览器 Safari 有问题,我在 Chrome、FireFox 中测试了我的网站。 Safari 版本也是正确的,但是,当需要在 1920x1080 或更高分辨率下对其进行测试时,它无法正常
就目前情况而言,这个问题不太适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、民意调查或扩展讨论。如果您觉得这个问题可以改进并可能重新开放,visit
我是一名优秀的程序员,十分优秀!