会话劫持实践 [英] Session Hijacking in practice

查看:45
本文介绍了会话劫持实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近一直在阅读有关会话修复/劫持的文章,并了解了其中的理论.

I have been reading up on session fixing/hijacking recently, and understand the theory.

我不明白的是这将如何在实践中被利用.您是否必须篡改浏览器才能使用被盗的 cookie?将其附加到 URL 并将其传递给 Web 应用程序?

What I don't understand is how this would be exploited in practice. Would you have to tamper with your browser to make use of the stolen cookies? Append it to the URL and pass it to the web application?

或者您会编写某种自定义脚本来使用它,如果是这样,它会做什么?

Or would you write some sort of custom script to make use of this, and if so what would it do?

我不是要寻求有关此或示例的帮助,而是要尝试了解更多信息并理解.任何帮助表示赞赏.

I'm not trying to ask for help with this or examples, but I am trying to learn more and understand. Any help is appreciated.

推荐答案

伪造 cookie 是微不足道的.正如 Klaus 所提到的,您可以直接在浏览器中进行操作.

Forging a cookie is trivial. As mentioned by Klaus, you can do it right out of your browser.

这是一个如何利用它的实际示例:

Here's a practical example of how this could be exploited:

  • 您登录到您的银行网站
  • 银行网站将会话 ID 放入 cookie,例如 123456
  • 您的浏览器会在每次请求时将会话 ID 发送到服务器.服务器查看他的会话存储并识别出您是不久前登录的用户
  • 我以某种方式获得了您的 cookie 的访问权限,或者我嗅探了您的一个 HTTP 请求(使用 SSL 不可能),并找出您的会话 ID:123456
  • 我为您的银行网站伪造了一个 cookie,其中包含会话 ID
  • 银行网站将 ME 识别为您,但仍处于登录状态
  • 我将你所有的资金转入我在瑞士的秘密账户,并买了一艘大得离谱的船

当然,在实践中,知名度较高的站点会更加安全(例如,可以检查会话 ID 永远不会传输到另一个客户端 IP 地址),但这就是会话劫持工作原理的要点.

Of course, in practice there will be more security on high profile sites (for instance, one could check that a session ID never transfers to another client IP address), but this is the gist of how session hijacking works.

这篇关于会话劫持实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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