Failed SSL Handshake due to IP change and session resumption

Is using the source IP address in generating the session ID by servers common? I’ve seen this behavior with a banking website. You visit the website with IP 1.1.1.1, SSL session is generated and used by the browser for SSL session resumption. Now if your IP changes to 1.1.1.2, and if you just refresh the page, the browser will error out. Firefox will complain about BAD_RECORD_MAC, chrome will just say ssl error. I still don’t understand exactly why this happens, because according to the RFC if the session is not recognized a full handshake should be initiated but here everything just fails.

Using firefox with ssl session identifiers disabled doesn’t have this problem which is why I think the server is using the source IP to create the session.

PCI Idle Session Timeout general question

Can someone help me understand how the PCI Timeout rules change for an application like the Starbucks App? A user is able to keep their card open ready for scan for longer the 15 minutes if needed, but PCI A11y AA also requires to display a message giving the user a chance to react and keep the session alive.

I understand and have implemented it from an e-commerce approach but am a bit confused on the e-wallet approach.

session disappears when switch to a different page

I became mad by putting my head in to strange issue. I am working on an old machine with apache 2.2+ php 5.3. Session are not working when i change the page. For testing i simply made 2 pages (1.php & 2.php). The simplest code is as below.

session_start(); $  _SESSION['user']="john"; header("Location:2.php");  

and

session_start(); echo "session is :" . $  _SESSION['user']; 

Session disappears on the second page(2.php). so far i have tried every thing. I am sure that this is not a coding issue but a server configuration issue. I have checked the session.save_path (/var/lib/php/session) it is writable and i can see session files are generating in this folder containing session value.

my php is running under user “apache” so this folder have owner/group both set to apache with writing permissions.

Can someone give me a clue to look for?

Patching session fixation issue on Apache server

I recently ran a Nessus scan on my network, and one of the issues that it revealed is a possible avenue for cookie injection (session fixation) through Javascript. The related Nessus issue can be found here:

https://www.tenable.com/plugins/nessus/44135

Is the only solution to update the Apache server package? Or is there some configuration option I can change? Because we are currently locked in to a specific distribution and version of our OS and cannot update to a newer version of Apache.

I should add that I don’t have very much experience dealing with security, and I was just tasked with patching issues found in the Nessus scan.

All of my players are not able to make my next session- XP Gambling Arena [closed]

First post guys, thanks for reading. This is about d&d 5e.

There will only be 4/6 of the players there although the 2 players that are missing will allow their characters to be played. I’m going to have the players transported to a Gladiator arena on a different plane of existence where essentially they will be able to gamble their XP to fight against a list of 20 monsters. I’ll generate the list and roll a d20 to determine what they fight. I’m thinking about putting 2 deadly encounters, 10 Hard encounters, 6 medium encounters and 2 easy encounters on the list. Basically, the amount of XP they bet- they will lose that amount and essentially they could de-level if they lose too much. This does not in any way affect the mortality of their actual characters. Story-wise they are sent to this arena to entertain a bunch of gods essentially.

My question is, how much XP should i allow them to gamble? Also, feel free to throw out ideas of how I can modify this to make it more fun for them.

for anti-CSRF, isn’t a session id cookie in a hidden form field easier than a random token?

I sometimes run into sites with CSRF bugs and I want to know the simplest way to recommend for the developer to fix it. (i.e., if I tell them “Switch to a framework that has anti-CSRF protection”, they won’t listen.)

Anecdotally, it looks like most sites mitigate CSRF by including a random token as a hidden form field, and then rejecting the form submission of the token isn’t present. (And it usually looks hand-crafted, not inserted by the framework.)

I’m wondering why it isn’t much simpler (and hence, much more common practice) to do “double-submit cookie” — where you take the session id cookie and put it in a hidden form field, and then reject the form submission if the hidden field value doesn’t match the session id cookie.

First, the problems with the “random token” approach, if your framework doesn’t have it built-in: You have to generate a random value and store it server-side, and in your storage table it must be associated with the user it was served to. When the form is posted, you have to check that the value is there, check it’s associated with the logged-in user, and then delete it so it can’t be re-used. If you screw up any part of this, you’ve potentially created a security hole. And, you might need to create a new database table for your tokens, which is just more cruft. (Yes, I know you can do it using hashes and secret values, but that’s also error-prone.)

By contrast, consider the ease of using the session cookie. (You don’t want to use an authentication cookie, because if the authentication cookie is stored in a hidden form field, an xss bug might be able to read it. But session-id cookie is probably safe.) ALL you have to do is store it in a hidden form field, and then check the value when the form is submitted.

So, I contend that IF the website in question has a framework that uses session cookies, I can tell them that the easiest way to fix it is by using double-submit-cookie with the “session-id” cookie, and to ignore all the webpages which usually start out by talking about how to protection against CSRF by using random tokens.

Am I missing something? Does double-submit-cookie have some disadvantage?

What attacks are prevented using Session Timeout or Expiry?

OWASP recommends setting session timeouts to minimal value possible, to minimize the time an attacker has to hijack the session:

Session timeout define action window time for a user thus this window represents, in the same time, the delay in which an attacker can try to steal and use a existing user session…

For this, it’s best practices to :

  • Set session timeout to the minimal value possible depending on the context of the application.
  • Avoid “infinite” session timeout.
  • Prefer declarative definition of the session timeout in order to apply global timeout for all application sessions.
  • Trace session creation/destroy in order to analyse creation trend and try to detect anormal session number creation (application profiling phase in a attack).

(Source)

The most popular methods of session hijacking attacks are session-fixation, packet sniffing, xss and compromise via malware, but these are all real-time attacks on the current session.

Once hijacked, the attacker will be able to prevent an idle timeout (via activity), and I would consider any successful session hijack a security breach anyway (unless you want to argue how much larger than zero seconds of access an attacker can have before it actually counts as an actual breach).

If the original method of getting the session token can be repeated, this seems to further limit the usefulness of a timeout — a 5-minute window that can be repeated indefinitely is effectively not limited.

What real-world attack exists (even theoretically) where a session timeout would be an effective mitigation? Is session expiry really just a form of security-theater?

Which messages are included in (D)TLS Finished message’s verify_data field for session resumption

The https://tools.ietf.org/html/rfc5246#section-7.4.9 states which messages are included for PRF computation that is included in Finished messages

It is clear for ‘regular’ (initial) handshake

But assume that the client wants to resume the DTLS session

Client sends the ClientHello with previous SessionID field
The server responds with ServerHello, sends ChangeCipherSpec (not included for verify_data computation) and Finished

Which messages should be included for verify_data field computation in Finished message sent from server?
A. Should it be only the most recent (resuming) ClientHello and ServerHello
B. Should it be the most recent (resuming) ClientHello and ServerHello plus previous (initial in our example) handshake messages?

Originally asked: https://crypto.stackexchange.com/questions/77016/which-messages-are-included-in-dtls-finished-messages-verify-data-field-for-s but I’m unsure which forum it belongs to