gpt4 book ai didi

c# - FormsAuthenticationTicket 不能在服务器端失效。引起 cookie 回复攻击

转载 作者:行者123 更新时间:2023-11-30 17:05:15 33 4
gpt4 key购买 nike

我有一个使用表单成员身份验证的 ASP.NET Web 应用程序。我们最近进行了渗透测试,标记的一个问题是窃取用户帐户的能力。如果 .ASPXAUTH cookie 值是在注销之前从用户复制的,用户可以以不同的用户身份登录,编辑他们的 cookie 以匹配复制的值并获得他们的所有特权。

在注销时我试过:

删除 cookie。我可以成功地做到这一点,但它不会使 FormsAuthenticationTicket 失效。

使用 FormsAuthentication.SignOut()但发现它并不能阻止攻击

我个人不认为这是一个问题,我相信它可能被盗的唯一方法是如果用户设法获得对经过身份验证的用户的访问权限,这表示我需要解决这个问题以安抚渗透测试人员。

任何想法将不胜感激!谢谢

最佳答案

On logging out I have tried: Removing the cookie.
I could successfully do this but it doesn't invalidate the FormsAuthenticationTicket.

实际上,当您删除 cookie 时,您就将它从您的用户那里删除了 - 您无法停用它,因此如果有人得到它,他仍然可以使用它。

解决方案可以是:

  • 也在服务器上保存身份验证 cookie 的状态。
  • 将登录用户的状态与其 session 相关联。

在这里阅读更多信息:Can some hacker steal the cookie from a user and login with that name on a web site?

Form Authentication - Cookie replay attack - protection

http://support.microsoft.com/default.aspx?scid=kb;en-us;900111

关于c# - FormsAuthenticationTicket 不能在服务器端失效。引起 cookie 回复攻击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16734201/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com