473,748 Members | 2,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to secure cookie session

I'm developing an application and want to have the "remember me" feature, so
that users don't have to log back in again in the next visit.

The problem here is, what happens if the user's cookie is stolen? Or, what
prevents someone from figuring out the algorithm to the cookie session
string?

I've thought of using a random string (stored in the database) that's
written to the user's cookie once he's logged in. Since it's random there
won't be any encryption to break.

Then, whenever the user's password is updated, a replacement string is
generated and re-written to the database and also the user's cookie file.
This will invalidate any stolen cookie files.

What do you think of this? Is there a better way?
Jul 21 '05 #1
4 1529
Shabam,

Whatever you try this way, will never help you.
The Cookie is on the users computer in a binary format.
Whatever you check when you use only the format of that Cookie, it will
always that format how unreadable it is for users. When you want to make it
more difficult you better can use the GUID for identification, however when
it is copied it stays the same binary data.

http://msdn.microsoft.com/library/de...ClassTopic.asp

Therefore any password that is generated by the client or only in his head
will in my opinion be better.

Just my thought,

Cor
Jul 21 '05 #2
For a site on which security/privacy is important, the site functionality
should not allow for client-side user identity token caching. Most users
will probably be using a browser that allows for login credential
auto-population, so they will already have some form of login facilitator
available that is under their control.

"Shabam" <ch*****@yoma ma-nospam.com> wrote in message
news:tJ******** ************@ad elphia.com...
I'm developing an application and want to have the "remember me" feature,
so
that users don't have to log back in again in the next visit.

The problem here is, what happens if the user's cookie is stolen? Or,
what
prevents someone from figuring out the algorithm to the cookie session
string?

I've thought of using a random string (stored in the database) that's
written to the user's cookie once he's logged in. Since it's random there
won't be any encryption to break.

Then, whenever the user's password is updated, a replacement string is
generated and re-written to the database and also the user's cookie file.
This will invalidate any stolen cookie files.

What do you think of this? Is there a better way?


Jul 21 '05 #3
"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
news:uT******** ******@TK2MSFTN GP14.phx.gbl...
For a site on which security/privacy is important, the site functionality
should not allow for client-side user identity token caching. Most users
will probably be using a browser that allows for login credential
auto-population, so they will already have some form of login facilitator
available that is under their control.


Could you explain that in a less technical way? I'm completely lost by
"identity token caching", "credential > auto-population", and "login
facilitator". Thanks.

FYI, the application is being developed by hired programmers, not me. I
know many of the concepts, just not the details, hence I'm here. :)
Jul 21 '05 #4
Sorry, that was meant to be generalized, not overly technical....

An "identity token" would be anything that could be used to identify a user
to the application. The identity token you had proposed using was a
randomly generated user-specific string.

"Caching" is the same as storing. For example, storing a user-specific
randomly generated string in a client-side cookie is an example of
client-side caching of an identity token.

"Credential auto-population" is the automatic completion of user name and
password text boxes by the browser application. For example, if you use IE
and haven't disabled this feature, you will be shown a dialog box asking if
you want the password to be "remembered " for future visits to the site. If
you allow this, IE will fill in the password textbox for you at subsequent
logins.

"Login facilitator" is functionality that makes login easier for the user.

Summary: For a site where user identity really matters, don't open
potential security holes just to make login easier on the user, particularly
since most users will probably be using browsers that already contain
functionality for easing the login process.

"Shabam" <ch*****@yoma ma-nospam.com> wrote in message
news:3_******** ************@ad elphia.com...
"Nicole Calinoiu" <calinoiu REMOVETHIS AT gmail DOT com> wrote in message
news:uT******** ******@TK2MSFTN GP14.phx.gbl...
For a site on which security/privacy is important, the site functionality
should not allow for client-side user identity token caching. Most users
will probably be using a browser that allows for login credential
auto-population, so they will already have some form of login facilitator
available that is under their control.


Could you explain that in a less technical way? I'm completely lost by
"identity token caching", "credential > auto-population", and "login
facilitator". Thanks.

FYI, the application is being developed by hired programmers, not me. I
know many of the concepts, just not the details, hence I'm here. :)

Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2626
by: Peter Young | last post by:
I'm seeing a problem with IE running on OS-X. When the user logs in to the website (ASP/IIS5), a Session is established properly, but somewhere along the line, a new Session is created and abandoned. At that point, the user must log in again due to the code logic (their Session is "gone" and they're then invalid). The original Session's On_End event never fires (or perhaps it doesn't until the timeout which is 40 minutes). I am...
2
2323
by: Gurra | last post by:
Hi ive seen alot of communites that use the session("") cookie to assaign the userid after the login Since this is a cookie, isnt it easy to modifie it and become which user you want at the current community ?
1
1291
by: German.Net | last post by:
Does anybody knows how to change it? Instead of ASPSESSIONIDQARCQQSC I want to change to "ASPSERVER1" for example... Thanks!
7
3023
by: Seth | last post by:
I have noticed that the id of my session object changes when I switch from a non-secure to a secure connection. What I'm trying to do: I have a cookie that is built on the non-secure side of things. What I need to do is to switch to a secure connection and then later on while still in that secure connection delete the cookie that was created on the non- secure side. I need to do this because I can not reference the non-secure cookie...
5
8926
by: VB Programmer | last post by:
I often use session variables to store the user's security level, and other important info. How secure are session variables? Can someone decrypt it and get the information? (This would be especially important to know if the session vars contain things like credit card numbers.) Any better, more secure alternatives? How would you store credit card numbers etc... temporarily if not using session vars? Thanks!
5
4853
by: Åženol Akbulak | last post by:
Hello; I use in my web application FormsAuthentication. Also I use Session state (InProc). When a user logged in, I can read Session parameters. (For example Session). Problem is that, when user close the browser window then open a new browser, FormsAuthentication reads from cookie and user logs in. Althought user logged in, session parameter is null.
4
323
by: Shabam | last post by:
I'm developing an application and want to have the "remember me" feature, so that users don't have to log back in again in the next visit. The problem here is, what happens if the user's cookie is stolen? Or, what prevents someone from figuring out the algorithm to the cookie session string? I've thought of using a random string (stored in the database) that's written to the user's cookie once he's logged in. Since it's random there...
0
1191
by: Beau Peep | last post by:
Yo Fells, Just wanted to know how to create a cookie from method which is in a saperate dll? If i write those methods in Page_Lode, what i have written in that dll, works file. But I want that as a part of dll. so i can re-use it in any other project. Rather than copying and pasting the logic, i have created my own separate porject
0
3497
by: Cadicus | last post by:
Hello Developers! Thank you for taking the time to read this email. Any insight would be greatly appreciated. I am attempting to log into a website automatically using a PostMethod. I'm having trouble getting the cookies / session lined up properly to do so. Below is the code I am working with. Any suggestions / guidance is appreciated! HttpClient Loginclient = new HttpClient(); PostMethod post = new...
0
8822
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9528
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6792
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6072
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4592
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3298
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.