Session Management Vs Session Hijacking

Welcome. Please Login, Register, Or Activate! 
type your username and password to login
Date: November 23, 2009, 07:52 PM
431481 members and 298488 Topics
Latest Member: Wakespeastuct
Nairaland [Nigerian Forum] Home Help Search Who is currently online? Login Register
Nairaland Forum  |  Technology  |  Webmasters (Moderators: OmniPotens, yawa-ti-de)  |  Session Management Vs Session Hijacking
Poll
Question: Where do you save your sessions?
I dont know - 1 (14.3%)
File - 2 (28.6%)
Dbase - 4 (57.1%)
Total Votes: 7

Pages: (1) (2) Go Down Send this topic Notify of replies
Author Topic: Session Management Vs Session Hijacking  (Read 456 views)
yawa-ti-de (f)
Re: Session Management Vs Session Hijacking
« #32 on: September 22, 2009, 06:11 PM »

I will take it that the last 2 or so posts, after nitation's apology, crossed yet again.

Nitation has apologized, xanadu has accepted, and kolitos is yet to acknowledge (though it is safe to say, he will have no problems accepting the apology either).

There is too much global warming going on for us to add to it by blowing off steam on this here thread  Cool

Let's move on.

Thanks
xanadu
Re: Session Management Vs Session Hijacking
« #33 on: September 22, 2009, 06:16 PM »

Thanks, @Yawa-ti-de.
Tech Pros (m)
Re: Session Management Vs Session Hijacking
« #34 on: September 22, 2009, 06:30 PM »

for me, i believe there is no reason why everything must be stored in a db when there are ways of securing sessions stored in a file.
i will ask you all must the file reside in the tmp folder and how is storing sessions in file not secure cos over the years have been privilege to work on large applications which i most times prefer to store in a file and base on my knowledge in security, am sure its safe. nitation, never run oo come back depend urself  Grin
nitation (m)
Re: Session Management Vs Session Hijacking
« #35 on: September 22, 2009, 06:42 PM »

Since Xanadu opened the way for you! Rain all your claims on me throughout the months. I will be glad to read them. Or you want me to say sorry to you too techpros. Since that is your opinion about storing sessions, so be it.

Less I forget, Xanadu, you haven't commented on the topic itself. What would you prescribe as the best method?

- nitation
kolitos007
Re: Session Management Vs Session Hijacking
« #36 on: September 22, 2009, 07:04 PM »

@ Xanadu
I would like to thank you for your comments, it is nice the way you put @nitation in the place he needs to be, thank God, I accept his apologies too, I have nothing against the guy we should all be able to leave comments on this forum and also encourge new people to do so too, not scare people away.

@ Tech Pros
This is what I am saying, but I was told that I don't know about it because I have not handled big projects before, so I thought it was best for me not to say too much, but am glad someone else shares my views on this.

It would be nice one day to be able to come on this forum and ask or talk to people about your opinions without be belittled.

Thanks
nitation (m)
Re: Session Management Vs Session Hijacking
« #37 on: September 22, 2009, 07:24 PM »

You are mixing things up here. I didn't say sorry to you because my comments were wrong! I need you to get that straight. I said Sorry about how you understood it. They are two different things.

On one belittled unless you are feeling inferior.

This topic really shows how many people I am a threat to. Keep on coming

- nitation
Tech Pros (m)
Re: Session Management Vs Session Hijacking
« #38 on: September 22, 2009, 07:46 PM »

@nitation
abeg stop this, lets get back to the topic at hand. dede mi ra wo

@kolitos
i dont see anything bad in nitation's statement and i think u gave the right reply. seriously i see no reason why you should think you are being belittled

this topic is interesting and important, pls lets get back to the topic at hand. where Dhtml ? sey u go let them spoil this topic for you?
lightwalk (m)
Re: Session Management Vs Session Hijacking
« #39 on: September 22, 2009, 10:04 PM »

I think it is much better to save it on the database
webdezzi (m)
Re: Session Management Vs Session Hijacking
« #40 on: September 23, 2009, 01:36 AM »

i think it is unsafe to save session in DB (my views lest i get slaughtered)

1. i know saving in DB will affect perfomance, especially when users grow
2. a simple sql injection will make the database readable, even if the attacker cant upload a file to server
3. i just think so, because my instinct thinks so.

and i heard of peeps working on large database applications,
please i need help on making this decision.

1. do you think it is a nice idea to open connection to a database, fetch/insert/update the database, and close the connection
or
2.  open the connection and keep it opened for as long as the application is on, while queries are being executed when needed, that way, the connection will be opened once and closed once.

It seems cool to go for option 1 but i notice the application is noticeable slower when i open and close  up to 20 connections for users logging in alone. not to talk of users using the main features of the app.

lightwalk (m)
Re: Session Management Vs Session Hijacking
« #41 on: September 23, 2009, 03:24 AM »

Maybe you should get a network security ebook. Undecided
biggjoe (m)
Re: Session Management Vs Session Hijacking
« #42 on: September 23, 2009, 08:48 AM »

Quote from: kolitos007 on September 22, 2009, 04:34 PM
hehe, Mate, we already know what he his like lol, without knowing who is talking to, he just always assumes, I just listen to the guy he his the master hehe

I ve been there before.  Grin
nitation (m)
Re: Session Management Vs Session Hijacking
« #43 on: September 23, 2009, 09:18 AM »

Where have you been? that it took you six months to fix a line of code in dream-weaver and you dont expect anyone to comment? common contribute to the topic and stop filling the database with crap

- nitation
kolitos007
Re: Session Management Vs Session Hijacking
« #44 on: September 23, 2009, 10:32 AM »

Quote from: webdezzi on September 23, 2009, 01:36 AM
i think it is unsafe to save session in DB (my views lest i get slaughtered)

1. i know saving in DB will affect perfomance, especially when users grow
2. a simple sql injection will make the database readable, even if the attacker cant upload a file to server
3. i just think so, because my instinct thinks so.

and i heard of peeps working on large database applications,
please i need help on making this decision.

1. do you think it is a nice idea to open connection to a database, fetch/insert/update the database, and close the connection
or
2.  open the connection and keep it opened for as long as the application is on, while queries are being executed when needed, that way, the connection will be opened once and closed once.

It seems cool to go for option 1 but i notice the application is noticeable slower when i open and close  up to 20 connections for users logging in alone. not to talk of users using the main features of the app.



Webdezzi, you have made some valid points here, yeah there are security issues no matter what you do, I have a mate that uses encryption to store data, in files, with the decryption key given to the user. His system runs really fast and I think that is a great idea, I do my own system that way anyway, but every one has a different way of working.

So i still stand by my point have storing sessions in files than in the database.

I should think if you are dealing with a large application, you can always open connection at start and close at end, or use persistent connection, I hate persistent connection, I think it has a great security issues, thats just my view.

I am sure others will think other wise.
Afam (m)
Re: Session Management Vs Session Hijacking
« #45 on: September 23, 2009, 12:27 PM »

Hmm,

@topic,

I see nothing wrong in storing sessions any where you want to store them as long as appropriate security issues are well sorted out. There are large applications using database to store them just as there are applications out there using files to do same.

There is no perfect security either way. We only try to secure as much as we can.

@issues concerning belittling, insults, harassment etc,

From experience, insults should not be tolerated and rather than store them up in one's mind the person who feels insulted should reply in kind, complain to the moderators or forget about it.

There is no perfect way of responding to insults as what works for Mr A may not work for Mr B.

While I will never insult anyone for having a different view or opinion on anything I will always respond to insults in kind and on time too.

If people cannot agree on basic issues even on a forum where members may never know the people behind the usernames then it will be a waste of time expecting Nigerians to work together considering the issue of ethnicity, religion, tribe etc.
kolitos007
Re: Session Management Vs Session Hijacking
« #46 on: September 23, 2009, 01:13 PM »

Well said @Afam, I think you hit the nail on the head there, its al based on preference no matter what you doing, either way storing in files or in db, will still give you the same result.

And nice one on your other comments, well said.
biggjoe (m)
Re: Session Management Vs Session Hijacking
« #47 on: September 23, 2009, 06:33 PM »

Quote from: nitation on September 23, 2009, 09:18 AM
Where have you been? that it took you six months to fix a line of code in dream-weaver and you dont expect anyone to comment? common contribute to the topic and stop filling the database with crap

- nitation

If I have contributed how will you know when you are busy throwing insults at other people.  Grin

*dhtml
Re: Session Management Vs Session Hijacking
« #48 on: September 23, 2009, 07:26 PM »

I  berra watch my head. . .
kehers (m)
Re: Session Management Vs Session Hijacking
« #49 on: September 27, 2009, 04:35 AM »

Too bad I missed out on an interesting topic like this Sad
Ok, to start with, I'd go for file storage for session storage due to scalability. Storing in db actually rocks for alot of reasons. For one, you have easy access to session data, can easily kill/manipulate sessions, count visitors online, blah blah blah, but then comes the big cross - scalability. Developers that have handled big sites will understand better. Database resources are costly (in terms of memory and CPU) and where ever possible, it is better to limit this. Saving sessions in db consumes a minimum of 2 db access (one for initial data read, and the other for data write at session end) per page per user, and this does not scale well especially if the pages performs other db activities.
But really, there is nothing u can achieve with storing sessions in db that u cant achieve wt storing in file. If u know of one, let it out. And if u must go the db way, I think it is better to use a different db server (like sqllite) so that if anything happens to d db, other non-session data are still safe.
quadrillio (m)
Re: Session Management Vs Session Hijacking
« #50 on: September 27, 2009, 08:21 PM »

I can't believe I missed dis, anyway comment is neva too late

1, so far from projects handled, I think where u store it is not d problem but how u do it, reason is becos I have done more of saving it in a file than in a db, and I still feel safe either ways.

jus to chip dis in, we webmaters should try not to attack each other here cos:

1, it not a competition, so no one will recieve an award as d best here.

2, Young Web Developers are looking at us, we don't need to make them believe dat attacking a fellow developer is d way to be d best

3, Sharing is d best way to learn. (that's d way I learnt all my life, BY SHARING KNOWLEDGE WITH OTHERS)

SAFE
*dhtml
Re: Session Management Vs Session Hijacking
« #51 on: September 28, 2009, 06:08 AM »

SQL injections webezzi can be blocked. and there is also the issue of flood protection and means to protect against session hijacking. But of course nothing is foolproof. but from my own experience, i think it is better to store sessions in dbase
lojik (m)
Re: Session Management Vs Session Hijacking
« #52 on: October 01, 2009, 08:35 AM »

I almost missed out on this sha.

I store in db and i dont feel sql injection is a problem. that can always b taken care of. Lets just say its more of how you do it than where u do it. I've neva even thought of using file but i'm ok storing session data in db. Just my style.
hostmot (f)
Re: Session Management Vs Session Hijacking
« #53 on: October 01, 2009, 12:44 PM »

Actually, storing your sessions in the database is much safer and guarantees faster access when you have so many users (the same way its faster to store and retrieve data in the database rather than flat files).


That said, if you have your own vps or dedicated server, you don't need to worry about where your sessions are stored. Its your own box; your own flat.

If you are on a shared server, storing your sessions in a db adds an extra layer of security as it is harder for the other people on your server to access your db rather than the temp folder where all your sessions are stored along with theirs (C'mon, y'all are using a single php installation and it will put everything there).

BTW, the topic is confusing in a way. Session management and session hijacking have no "versus" relationship whatsoever.

Olawunmi,
Hostmot Sales Rep. (www.hostmot.com).

*dhtml
Re: Session Management Vs Session Hijacking
« #54 on: October 05, 2009, 06:11 PM »

If you have a dedicated server and store session in files. A third party application can still hijack your session.
Well, sessions can be stored anywhere you like, even on the client file system, i will leave that aspect open.

ok, so let us move to session hijacking, which is the real topic. Here we are going to be talking about the various
ways of how to steal session data over the internet and how to prevent some of these attacks. I am feeling rather
hungry. . . . .to be continued!
hostmot (f)
Re: Session Management Vs Session Hijacking
« #55 on: October 06, 2009, 06:01 PM »

If you are on a dedicated server and a third party still manages to hijack your sessions through your scripts, then you should read the "essential php security" book.

Olawunmi
Sales Rep., Hostmot (www.hostmot.com)
 Adsense Info  Who Earns More In Naija: The Application Developer Or Web Designer/develper  "newbie" Vs "veteran/experienced" Web Developer  Page 2
Pages: (1) (2) Go Up Send Topic to Friend by E-mail Reply 


Sections: Autos/Cars (2) Jobs/Vacancies (2) (3) Career Talk Education General(2) Politics Romance Computers Phones Travel
Sports Fashion Health Religion Celebrities TV/Movies (2) Music/Radio (2) Books Webmasters Programming

Links: Page1 Page2 Page3 Page4 Page5 Page6 Page7 Page8 Page9 Page10

Nairaland is owned by Oluwaseun Osewa. See also: Nairalist Classified Ads
Nairaland Forum | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.