Antivirus Protection
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationAntivirus Protection

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 31st, 2001, 05:09 AM
johnn johnn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Westminster, CA USA
Posts: 54 johnn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 12 m 7 sec
Reputation Power: 12
Hijack a session?

Hello,

I would like to know how can someone hijack a session? and how to prevent it? Under what applications do devious users do that?
and can they see all variables in that session?

Thanks in advance,
John

Last edited by johnn : July 31st, 2001 at 05:17 AM.

Reply With Quote
  #2  
Old July 31st, 2001, 12:17 PM
rtaylor rtaylor is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2001
Location: In a multi-cultural mess.
Posts: 569 rtaylor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 59 m 30 sec
Reputation Power: 13
John,

I use my own sessions code but I suspect this applies to PHP4 "sessions" also.

If a stranger browses one of my applications, the resulting URL in the browser line,
will contain a session id such as "?Id=73b237e4d969c39160fd2d6deefde4".

If that stranger did not 'hit' my application again,
but instead, immediately emailed the URL to a friend,
who immediately entered this URL into his browser,
then my site could not tell the difference between the
first user and the second user of that session.

All the session variables are available to the program.
If the program displays this data, then yes, the hijacker
can see "all variables in the session".

-----------------

To prevent accidental re-entry of form data, I include "the next"
sequence number in a hidden field when the form is sent to the browser.

When the form is entered, the sequence number must match what is expected.
If not, the form is rejected as a duplicate.
If so, the data is processed.
"the next" sequence number is incremented.

This sequence number is carried in the session table so there is
a unique sequence number for each user.

-----------------

To prevent hijacking, I extend "the next" sequence number
to all input. So input forms carry "the next" in a hidden field;
other transactions carry "the next" in the url.

You might want to distinquish between input forms and other transactions.
For input forms "the next" must be exactly what is expected.
For other transactions "the next" can be one or two "earlier" than
expected to accomodate some back button hits.

Now if a devious user tries to use a "hijacked session id",
if the real user does a couple of enters, as is normal,
then the hijacker will be refused.

Robert
__________________
Robert
---
If it's hard, it's probably wrong.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationAntivirus Protection > Hijack a session?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap