News for hackers. Stuff that matters.
Re:Modeling your App's User Session by simonw on Friday October 18, 2013 @06:16PM (#6574361)
How would you prevent replay attacks by someone who manages to get hold of a session cookie?
Re:Modeling your App's User Session by espeed on Friday October 18, 2013 @10:38PM (#6575117)
1. Embed an ephemeral encrypted token (https://owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF...) in the HTTP response header that's signed with an HMAC-SHA-256 signature.

2. Sign sensitive requests similar to how Amazon does for AWS API requests (http://docs.aws.amazon.com/general/latest/gr/signing_aws_api...) -- just make sure your signature is secure (http://www.daemonology.net/blog/2008-12-18-AWS-signature-ver...).

3. Use client-side certificates by using the HTML5 keygen element to have the browser generate the client's public/private key pair, and then have the server sign the client's public key (http://security.stackexchange.com/questions/27961/should-the...).

4. All of the above.

Re:Modeling your App's User Session by jeffasinger on Friday October 18, 2013 @07:05PM (#6574543)
One technique is to hold other information along with the session cookie, such as the client IP.

This isn't perfect, because there will be false positives that log people out fairly often, but it would make session hijacking significantly harder.

Re:Modeling your App's User Session by simonw on Friday October 18, 2013 @07:24PM (#6574608)
I use a laptop and carry it between work and home, occasionally signing in to a VPN. My IP address changes several times a day.
Re:Modeling your App's User Session by woadwarrior01 on Saturday October 19, 2013 @01:01AM (#6575406)
Add a hash of the userAgent in the session. How about adding some shared secret in the browser's localStorage?