session-hijacking

Prevent session cookie hijacking WITHOUT SSL

北慕城南 提交于 2019-12-06 14:19:24
问题 To prevent session hijacking, i tried to assign a specific cookie name to each user based on these variables: User-agent and IP Address . I have used following function to generate session cookie name which holds session ID . static function getSessionName(){ $id= @md5(base64_encode(self::$secretToken.$_SERVER["HTTP_USER_AGENT"].$_SERVER["REMOTE_ADDR"])); while(is_numeric($id{0})){ $id = substr($id, 1).$id{0}; } return $id; } It means that every user which visits my website, will have a

How Easy Is It to Hijack Session Vars on GoDaddy (PHP) [duplicate]

不打扰是莪最后的温柔 提交于 2019-12-05 02:18:03
问题 This question already has answers here : Session hijacking and PHP (3 answers) Closed last year . This article states that If your site is run on a shared Web server, be aware that any session variables can easily be viewed by any other users on the same server. On a larger host like GoDaddy, are there really no protections in place against this? Could it really be that easy? If it is that easy, where are the session vars of the other users on my host so I can check them out? 回答1: It is

How to encrypt session id in cookie?

╄→гoц情女王★ 提交于 2019-12-04 09:47:09
问题 While I was reading about session hijacking articles, i learned that it would be nice to encrypt session id value that is stored in a cookie. As far as I know, when I start a session by calling session_start() , PHP does not encrypt session id value in a cookie. How do I encrypt session id value and then initialize session with it? 回答1: Encrypting won't help. The session cookie is just a magic number anyway. Encrypting it just means there's a different magic number to hijack. Depending on

Can someone who merely knows my current JSESSIONID impersonate / hijack my session (Tomcat 7/Glassfish 3.2))?

橙三吉。 提交于 2019-12-04 05:11:59
I'm looking for a plain English, "for dummies" explanation of how does JSESSIONID work from security aspects Can someone who merely knows my current JSESSIONID impersonate / hijack my session? In what scenarios JSESSIONID will be part of the URL, and is this OWASP #2 security risk (scenario #1) still relevant for latest versions of Tomcat / Glassfish, and if so, what to "turn off/on" to prevent it? Q: Can someone who merely knows my current JSESSIONID impersonate / hijack my session? A: Yes. That's why it is important that your site is careful with cookies. Indeed, if you are worried about

Session Hijacking in practice

回眸只為那壹抹淺笑 提交于 2019-12-04 02:48:28
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. Forging a cookie is trivial. As mentioned by Klaus, you can do it right out of your

How to encrypt session id in cookie?

对着背影说爱祢 提交于 2019-12-03 03:18:40
While I was reading about session hijacking articles, i learned that it would be nice to encrypt session id value that is stored in a cookie. As far as I know, when I start a session by calling session_start() , PHP does not encrypt session id value in a cookie. How do I encrypt session id value and then initialize session with it? Encrypting won't help. The session cookie is just a magic number anyway. Encrypting it just means there's a different magic number to hijack. Depending on what hijacking scenarios you have in mind, there are other possible mitigations. For example, you can limit

Spring Security/JSF/Hibernate Accidental Session Hijacking on Tomcat?

纵然是瞬间 提交于 2019-12-01 04:48:48
Something very strange and embarrassing happened to me the other day and I don't have words to describe what happened. My app runs Spring 3 integrated with JSF 2.1, Hibernate 4, Spring Security all on Tomcat 7. I was over the phone with someone important from C-level and we were both simultaneously on the test environment at the same time on the same pages. He went to navigate to a page that I was navigating to at pretty much the same moment when his page came up with my personal account details. I didn't believe him, so I walked over to his office and sure enough, he somehow was logged on as

Session Hijacking Protection in ASP.NET

家住魔仙堡 提交于 2019-11-30 13:59:18
I'd like to find out what session ID hijacking protection is built into the current version of ASP.NET. I recently saw this very informative article that explains how session security can be enhanced by implementing an additional layer that encodes the IP address and user agent header into the session id. These details are then verified on each subsequent request. It seems that this article was written for ASP.NET 1.1 so I'd like to know if anything similar is now built into ASP.NET. Is it still of any benefit to implement such an additional layer? Thanks. Check out this snippet from the

PHP Sessions + Useragent with salt

我只是一个虾纸丫 提交于 2019-11-30 07:39:00
It keeps running in my mind the last couple of days, but I read some articles about how to make your PHP sessions more secure. Almost all of these articles say that you need to save the useragent in the session WITH an additional salt. Something like this: $fingerprint = md5('SECRET-SALT'.$_SERVER['HTTP_USER_AGENT']); The salt would make it harder for an attacker to hijack or whatever the session. But WHY add a salt every time you would check it like this: md5('SECRET-SALT'.$_SERVER['HTTP_USER_AGENT']) == $_SESSION [ 'fingerprint' ] So WHY would a salt make it more secure, since the attacker

Spring Security/JSF/Hibernate Accidental Session Hijacking on Tomcat?

主宰稳场 提交于 2019-11-30 05:39:22
问题 Something very strange and embarrassing happened to me the other day and I don't have words to describe what happened. My app runs Spring 3 integrated with JSF 2.1, Hibernate 4, Spring Security all on Tomcat 7. I was over the phone with someone important from C-level and we were both simultaneously on the test environment at the same time on the same pages. He went to navigate to a page that I was navigating to at pretty much the same moment when his page came up with my personal account