会话劫持实践
我最近一直在阅读有关会话修复/劫持的内容,并了解其理论。
我不明白的是,这在实践中将如何利用。您是否需要篡改您的浏览器才能使用被盗的 cookie?将其附加到 URL 并将其传递给 Web 应用程序?
或者您会编写某种自定义脚本来利用它,如果是的话它会做什么?
我并不是想寻求有关此问题或示例的帮助,但我想了解更多并理解。任何帮助表示赞赏。
I have been reading up on session fixing/hijacking recently, and understand the theory.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
伪造 cookie 是微不足道的。正如 Klaus 所提到的,您可以直接在浏览器中完成此操作。
下面是一个如何利用此漏洞的实际示例:
当然,在实践中会有更多的安全性在知名网站上(例如,可以检查会话 ID 是否永远不会传输到另一个客户端 IP 地址),但这就是会话劫持工作原理的要点。
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:
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.
如果您使用 Firefox,则有一个名为 TamperData 的插件,可让您更改发送到服务器的所有内容的值。因此,如果我可以读取您的会话 cookie,我基本上可以使用我的 firefox 访问该站点并使用 tamperdata 向其发送您的会话 cookie 值而不是我自己的值,从而劫持您的会话。
/克劳斯
If you use firefox there is a plugin called TamperData that lets you change the values of everything that is sent to a server. So if I could read your session cookie, I could basically just go to that site with my firefox and use tamperdata to send it your session cookie value instead of my own, thus hijacking your session.
/Klaus
互联网并不是一个神奇的黑匣子,浏览器只能按照网站希望的方式使用它。
您可以编辑 cookie 或 POST 数据或 GET 会话变量,或者编写一个简单的脚本来执行此操作。最后,您要做的就是发送 HTTP 请求并用您想要的任何内容替换会话数据。
The internet isn't a magical black box that can only be utilized by browsers in the way the site wants you to.
You can edit your cookies or POST data or GET session variables, or write a simple script to do it. In the end all you're doing is sending HTTP requests and substituting your session data with whatever you want.
您可以,但在查看目标站点的页面时,在地址栏中键入
javascript:document.cookie='stolencookie=somevalue'
可能会更容易。You could, but it would probably be easier just to type
javascript:document.cookie='stolencookie=somevalue'
in the address bar whilst viewing a page from the target site.