Developer forum

Forum » Ecommerce - Standard features » Cookies: DW_Extranet and DW_ExtranetSessionCookie

Cookies: DW_Extranet and DW_ExtranetSessionCookie

Andrew Rushworth
Reply

One of the items that came up on a recent security test was the cookie handling.
Dynamicweb 9.17.7

1. Cookie expiry
The cookie expiry is set to 7 days in the cookie manager.
This only seems to affect the DW_Extranet cookie though.
DW_ExtranetSessionCookie stays set to session


2. DW_ExtranetSessionCookie information
2.1 Re-Authentication.
The cookie can be used for re-authentication. User can logout but if you have the cookie information, you can use it to re-authenticate - even once user has logged out.

2.2 DWExtranetTk
DWExtranetTk does not seem to be used in the cookie. Is this something we need to configure, or what is it used for?

2.3 User and Password
The cookie looks like this:
DWExtranetUsername=myusername&DWExtranetTkn=989d58d1ddblahblahblahe463d6&DWExtranetPassword=encrypted_password
Is it possible to use a token and remove the username and password in the cookies?
I removed DWExtranetUsernameRemember,  DWExtranetPasswordRemember and AutoLogin from the login template - this only seemed to affect the DW_Extranet cookie and not DW_ExtranetSessionCookie.
So DW_Extranet looks like  : DWExtranetUsername=&DWExtranetPassword=&AL=
But DW_ExtranetSessionCookie retains the Username and Password.

"The password encryption is reversible and relies on weak, hardcoded parameters, so the original password can be recovered from the cookies' values.
The password is encrypted using DES, a legacy algorithm no longer considered suitable for protecting sensitive data, in a configuration where the same fixed value (LKJhsoWE) is used as both the encryption key and the initialisation vector (IV). This value was recovered from publicly accessible Dynamicweb assemblies, meaning it is not secret and can be obtained by anyone."

3. Concurrent Sessions
Is it possible to only allow a single user session and revoke other sessions when they log in on another device?

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

No.

Please update to latest DW9 before any security testing. There are many changes and updates related to security in latest releases.

 
Andrew Rushworth
Reply

Thanks Nicolai, appreciate the feedback. Does "No" refer to any particular question regarding the cookies?

I will upgrade to the latest version and hoping these issues will be resolved.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

No to "Is it possible to only allow a single user session and revoke other sessions when they log in on another device?"

DWExtranetTk is not a DW cookie. You cannot change how usernames are saved in cookies.

But as I wrote, some of these things have changed a bit on later DW9s. If you are doing any security assesments or care about security, you will have to start with an upgrade.

 

 
Andrew Rushworth
Reply

Agreed - will upgrade first.

DWExtranetTk is a prameter in  the DW_ExtranetSessionCookie:

DWExtranetUsername
=myusername&DWExtranetTkn=989d58d1ddblahblahblahe463d6&DWExtranetPassword=encrypted_password

Thanks again, appreciate your input.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Cookie expiry — as designed; DW_ExtranetSessionCookie is deliberately a session-scoped cookie.

Re-auth after logout — logout doesn't invalidate the cookie server-side, only unsets it client-side. A previously captured cookie stays valid. To do that, you would need access to the users computer which means the attacker already has access to the browser and can catch your username and password regardless.

DWExtranetTkn — works as an anti-spoofing binding to request fingerprint, only if DoSpoofingCheck is enabled.(/Globalsettings/Modules/Users/AutoLoginCookie/DoSpoofingCheck)

Password in cookie — no configuration option exists in-product to switch to a pure opaque token instead of embedding the DES-encrypted password. But again, to exploit this you need access to the users computer.

Concurrent session control — not supported out of the box.

DW10 handles these things differently. And there are many other security improvements in DW10 over DW9

Votes for this answer: 1
 
Andrew Rushworth
Reply

Perfect. Thank you Nicolai.
I do need to look at DW10 upgrade - just makes me nervous with all the customisation re-writes and content conversions required :)

 
Andrew Rushworth
Reply

Just to note /Globalsettings/Modules/Users/AutoLoginCookie/DoSpoofingCheck breaks the pagefeeds when enabled.

 

 

You must be logged in to post in the forum