473,383 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Is session enough secure?

Hello,

I have a page such that each user can see only a corresponding
(personal) part of the page. In the beginning I wanted to perform
initialization of users (by asking there names and passwords and
comparing them with names and passwords stored in database), than I
planed (if comparison was successful) to set a corresponding value of
variable $user_name and on the mentioned page with the help of the
"if"-operator to check whether value of $user_name allows to
display given part of the page. However, I have realized that any user
can "by hand" set value of variable $user_name which (value) does
not correspond to the correct user name of this person. Does it means
that only possible solution of this problem is to check name-password
pare (whether it (pare) exists in database) on each page?

Jul 17 '05 #1
1 1935
>Subject: Re: Is session enough secure?

What is it you are trying to protect? If the answer is nuclear
launch codes or bank funds transfers between national banks, NO,
it's not secure enough. If the answer is "what I had for breakfast
on my 10th birthday", it is. Anything in between is a judgement
call. Credit card numbers, anything that involves spending actual
money (e-commerce site), social security numbers, and medical
information should be considered especially sensitive.
I have a page such that each user can see only a corresponding
(personal) part of the page. In the beginning I wanted to perform
initialization of users (by asking there names and passwords and
comparing them with names and passwords stored in database), than I
planed (if comparison was successful) to set a corresponding value of
variable $user_name and on the mentioned page with the help of the
"if"-operator to check whether value of $user_name allows to
display given part of the page.
If you use sessions, you set this in a SESSION variable. A SESSION
variable is held on the server where an ordinary web user can't get
to it (but the admin of the box can, so if this is on a hosted
server, trust your host).
However, I have realized that any user
can "by hand" set value of variable $user_name which (value) does
not correspond to the correct user name of this person.
A user cannot set a SESSION variable except by logging in honestly
or by hijacking the session of another user (and then, only under
the control of your code). Ways of hijacking the session of another
user include: guessing the session cookie, sniffing it on the
network, spyware or viruses on the user's computer, accessing the
user's computer while he's at lunch, etc. Expiring idle sessions
makes it harder to get a session cookie while it's still valid.
It also limits the damage if a user happens to post a URL with
his own session cookie in it.

Some of these methods could just as well get the information directly,
e.g. get the info out of the cached copy of the page the user looked
at on his own computer with the spyware or sniff the page while it
is being sent to the user.

A typical session ID is 128 bits long, encoded in hexadecimal.
At one guess per nanosecond, this could take up to 1e+22 years
to guess. And besides, your server isn't nearly fast enough
to handle one request per nanosecond.
Does it means
that only possible solution of this problem is to check name-password
pare (whether it (pare) exists in database) on each page?


Remember, if you're not using a secure server, sniffing the
name-password pair is about as easy as sniffing the session cookie,
but it's much more damaging (sessions expire in maybe hours (you
control this), username/passwords combinations stay around for months).

Gordon L. Burditt
Jul 17 '05 #2

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

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
30
by: Robert Tweed | last post by:
Does anyone know a good resource discussing the issues involved in session theft? I've read a couple, but none that really address the problem apart from acknowledging that it is a problem; you...
7
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...
0
by: DotNetShadow | last post by:
Hi Guys I was wondering if you can help me out with the following problem. I created a basic secure | non secure website. So I have the root directory as publically allowable pages and a...
5
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...
5
by: Joe | last post by:
I have an application which runs in a non-secure environment. I also have an application that runs in a secure environment (both on the same machine). Is there any way to share the session data for...
8
by: Nacho | last post by:
Hello people I have the following problem I have a private area in my site. The user enters the username and password, then clicks "enter" and the session is created and also a session...
4
by: rgparkins | last post by:
Hello I am running out of time with a problem I have running PHP 5.04 and Apache 2.0 and really need help :(. I have a page that stores a variable in session but each time I reload that page the...
1
by: Cirene | last post by:
My membership portion of my website is pretty simple - only Admin and 2 other roles. I was thinking of using session vars store the login information? Such as... If Session("IsAdmin") then.......
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.