voidinit
11-02-2004, 03:57 PM
Howdy all, long time no see. I'm not sure if anyone around here remembers me, but I use to be kind of a regular before my reserve unit got deployed, but I haven't been back much since then.
That said, I'll get on with the question.
I'm working on a project I just started a while back on sourceforge. Basically, I'm writing a web based j2ee app. This question has very little to do with j2ee. It has more to do with web application session/persistence security in general.
Actually, let me describe the session model I want to implement. I'm looking for the holes that are there that I'm just not seeing.
When a user logs in and authenticates successfully, a session ID is generated for that user by making a digest out of their SSL Client fingerprint and the time they logged in expressed in mills. This digest will then be truncated/or padded to an arbitrary size. The time used for digesting will be stored in a database.
For persistance this session id (SID) will be pasted into every html page (it's all dynamic anyway) that the user requests, and then passed back to the server every time a new http request is made. This application is designed soley for SSL use. That will greatly reduce the risk of a man in the middle or a promiscuous sniff picking up the live SID.
That leaves brute forcing. Say, I truncate/pad the SIDs to a size of 32 bits, and an installation has say 900 active, already authenticated users. The attacker shouldn't have a problem spewing requests with random, or incremented SIDs, once he knows the format of the URL query String and the name of the variables. It probably won't take him long to find an active session and spoof it.
I'm thinking of having the application track requests that ask for bogus or timed out SIDs. When a threshold is reached (Hopefully before the attacker has found a live SID and spoofed it). The application will go into an alert mode and sacrifice speed for security. Basically will re-digest the clients SSL fingerprint and the stored time the client logged in each time a page is requested. If a duplicate is found (i.e. same SID but different SSL fingerprints) the application will invalidate that session ID, thus logging off both the "real" user and the spoofer. After a period of time with no dupes and no requests containing an invalid SID, normal operation woudl resume.
I know that an attacker could spoof an active ID on his first try or on a try less than the threshold, and thus be undetected, but he would have to be extremely, extremely lucky for that to happen. (Like he should have already won the lottery....twice).
Authentication and permissions aside, do any of you see any holes in this method of session management/security that I'm not seeing?
That said, I'll get on with the question.
I'm working on a project I just started a while back on sourceforge. Basically, I'm writing a web based j2ee app. This question has very little to do with j2ee. It has more to do with web application session/persistence security in general.
Actually, let me describe the session model I want to implement. I'm looking for the holes that are there that I'm just not seeing.
When a user logs in and authenticates successfully, a session ID is generated for that user by making a digest out of their SSL Client fingerprint and the time they logged in expressed in mills. This digest will then be truncated/or padded to an arbitrary size. The time used for digesting will be stored in a database.
For persistance this session id (SID) will be pasted into every html page (it's all dynamic anyway) that the user requests, and then passed back to the server every time a new http request is made. This application is designed soley for SSL use. That will greatly reduce the risk of a man in the middle or a promiscuous sniff picking up the live SID.
That leaves brute forcing. Say, I truncate/pad the SIDs to a size of 32 bits, and an installation has say 900 active, already authenticated users. The attacker shouldn't have a problem spewing requests with random, or incremented SIDs, once he knows the format of the URL query String and the name of the variables. It probably won't take him long to find an active session and spoof it.
I'm thinking of having the application track requests that ask for bogus or timed out SIDs. When a threshold is reached (Hopefully before the attacker has found a live SID and spoofed it). The application will go into an alert mode and sacrifice speed for security. Basically will re-digest the clients SSL fingerprint and the stored time the client logged in each time a page is requested. If a duplicate is found (i.e. same SID but different SSL fingerprints) the application will invalidate that session ID, thus logging off both the "real" user and the spoofer. After a period of time with no dupes and no requests containing an invalid SID, normal operation woudl resume.
I know that an attacker could spoof an active ID on his first try or on a try less than the threshold, and thus be undetected, but he would have to be extremely, extremely lucky for that to happen. (Like he should have already won the lottery....twice).
Authentication and permissions aside, do any of you see any holes in this method of session management/security that I'm not seeing?