使用相同的 Jsession ID 登录其他机器 [英] Using same Jsession ID to login into other machine

查看:41
本文介绍了使用相同的 Jsession ID 登录其他机器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的项目中,我们使用的是 weblogic 服务器.

In our project we are using weblogic server.

如果我尝试登录我们的应用程序,即在机器 A 上,登录后会生成一个 JsessionId.

If I try to login into our application i.e on machine A, a JsessionId is generated after I logged in.

现在,如果我在另一台机器(即机器 B)上使用相同的 JsessionId,应用程序将提示我进入主页而不是登录页面.

Now, if I use this same JsessionId on another machine i.e machine B the application will prompt me to home page instead of login page.

请为我的问题提供解决方案.

Please provide a solution for my problem.

推荐答案

你所说的叫做 session劫持.关于如何预防它有很多很好的答案.

What you have stated is called session hijacking. There are many good answers on how to prevent it.

防止复制 JSESSIONID cookie 时复制会话

防止会话劫持的最佳方法是什么?

作为无状态协议的 HTTP 使用会话标识符(主要是 cookie),该标识符随每个请求发送以识别客户端.最常见的方法是使用 HTTPS 对您的请求进行加密,并防止中间的任何人看到该会话标识符.

HTTP being an stateless protocol uses a session identifier (mostly a cookie) which is sent with every request which to identify the client. The most common way is to use HTTPS to encrypt your request and prevent anyone in the middle from seeing that session identifier.

需要考虑的一个重点是,如果攻击者可以物理访问您的机器,那么他/她可以轻松看到您的会话标识符,而您对此无能为力.这就是为什么像 facebook 这样的网站会在您打开浏览器控制台并运行一些脚本时向您发出警告的原因.

One important point to consider is that if the attacker has physical access to your machine, then he/she can easily see your session identifier and there is nothing you can do about it. That's the reason why websites like facebook warn you when you open the browser console and run some scripts.

这篇关于使用相同的 Jsession ID 登录其他机器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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