Antivirus Protection
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old March 15th, 2002, 05:07 PM
itsource itsource is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 181 itsource User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 7 m 31 sec
Reputation Power: 7
Session hijacking

Next week, I will present my project about web security with my advisor. I have many question with session hijack

1. If I login in some website and url is http://www.somewebsite.com/staff.ph...345678910abcdef

if someone use sniffer to sniff this url and enter this url. So he can use my session and act as me in this session. Is this call Session hijack?

2. if 1 is session hijack. If http://www.somewebsite.com/staff.php not pass session ID in url but keep Session ID in cookie on client (Which keep in memory not text file). In this situation, If intruder want to hijack session. Is intruder must have session ID in his computer's memory. Is it possible to do?

3. in 1. someone use sniffer to sniff url and get http://www.somewebsite.com/staff.ph...345678910abcdef but if this site use ssl , Is intruder can sniff and get url http://www.somewebsite.com/staff.ph...345678910abcdef and act as me?

4. I test by login into hotmail and yahoo mail. when I already login and click to inbox. I copy url in inbox page

http://us.f144.mail.yahoo.com/ym/lo...d=4pr0eksnhfbc4
and
http://lw15fd.law15.hotmail.msn.com...56ff083f01ad68f

I sent this url to my frient and ask he to open it. but when he open this url. he get login form not inbox page.
How these site make session secure?

Reply With Quote
  #2  
Old March 15th, 2002, 05:40 PM
MaxC MaxC is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 29 MaxC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 5 sec
Reputation Power: 0
Now I'm no php expert, but I think I may be able to help you. The trick is to use sessions to register some variable other than the session_id, and then check for this variable when the user tries to access a page requiring said variable. For example if you ask someone to enter a username before accessing a page, you would do something like this:

PHP Code:
<?php
session_start
();
session_register("username");
?>


This way the registered variable is not passed in the URL, and so it cannot just be copied and pasted by someone else.

To verify that the variable $username is set, you could just use an if statement near the head of any page that you want made secure:

PHP Code:
<?php
if(!isset($username)) {
?>
Page with login form
<?php

} else { 
?>
Whatever page you are protecting
<?php
?>


There are more eloquent ways of doing this but I think this gives you the basic idea of what is going on.

Reply With Quote
  #3  
Old March 15th, 2002, 07:09 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 12
Send a message via AIM to rod k
1. Yes

2. Yes. Cookies can be spoofed. You have no control over what's on the client's computer. He could have hacked his browser or written his own (fairly simple with the open source browsers out there).

3. No. SSL would prevent hijacking. Of course it would have to be used exclusively on pages that use sessions.

4. There are way too many possibilities here. The most obvious is time. Was the session still active when your friend went there? Another is that the server looked at the user agent strings. Unfortunately, this can be spoofed as well, but your friend probably didn't do that. Less likely, they looked at the IP, but again that can be spoofed AND would block some legitimate users. There are several others, but the ONLY secure way is to use SSL. This is true for ALL server side technologies trying to maintain state, NOT just PHP.
__________________
FSBO (For Sale By Owner) Realty

Reply With Quote
  #4  
Old March 15th, 2002, 07:57 PM
itsource itsource is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 181 itsource User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 7 m 31 sec
Reputation Power: 7
Thanks very much. I have more question from question 2.

1. If browser is Netscape and IE (not opensource), Is intruder can hack it. Do you know how to? because it keep in memory.

2. If some website keep cookie in text file, which contain username and password.so when I visit website. I don't need login everytime. It automatic login. If intruder sniff cookie and copy in his computer. Can he automatic login with me?

3. If my computer have about 30 cookies in text file. If I visit amazon website, and this website read it's cookie. How it know that this cookie is it's cookie.

4. Can amazon website read cookie from other website on my computer? Is anyway to do it?

If you have more information about this topic, please let me know? especially how to do it?

Thanks again.

Reply With Quote
  #5  
Old March 15th, 2002, 09:13 PM
rod k rod k is offline
Apprentice Deity
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jul 1999
Location: Niagara Falls (On the wrong side of the gorge)
Posts: 3,237 rod k User rank is Private First Class (20 - 50 Reputation Level)rod k User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 m 8 sec
Reputation Power: 12
Send a message via AIM to rod k
1) Huh? A cracker isn't going to go after the cookie in the client software. He'll sniff it as the packet is in transport.

2) Yes.

3) You don't need to know. The browser handles this, but the spec is on Netscape's site, or at least it used to be. MS may have it as well. No standard has to be followed by the browser since only that browser will look at it's cookies. Just as long as it can find the cookie based on the domain name...

4) Not supposed to be able to. Of course, MS has been infamous for allowing security holes...

Why would I tell you how to do it? You want to crack some site?

Reply With Quote
  #6  
Old March 15th, 2002, 10:21 PM
itsource itsource is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 181 itsource User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 7 m 31 sec
Reputation Power: 7
Quote:
Why would I tell you how to do it? You want to crack some site?


No, I don't want hack website. I only want to know how to do it. as I tell you, Next week, I will present my project. I'm 4 years student major computer engineering.

My project is about Web Security.
So I want to know

I must present how to hack it and how to protect it.

In my project I'm research about

Openbsd Security
Apache Security
MySQL Security
PHP Security

I know these problem can solve with SSL. But I want to present, if not SSL. What happen!!

Reply With Quote
  #7  
Old March 16th, 2002, 12:58 AM
jdk's Avatar
jdk jdk is offline
phpkid ~~~~~~ :o)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Nov 2000
Location: NJ, USA
Posts: 2,535 jdk User rank is Lance Corporal (50 - 100 Reputation Level)jdk User rank is Lance Corporal (50 - 100 Reputation Level)jdk User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 11 m 11 sec
Reputation Power: 10
Send a message via Yahoo to jdk
See from your questions I can see that you don't have much idea about how cookie works and how in general sessions are being utilised by websites.

I wonder in that situation how you would learn , how to hack/crack it.

I guess you need to know more about the basics.

JD
__________________
_____________________________
d.k.jariwala (JD)
~ simple thought, simple act ~
I blog @ http://jdk.phpkid.org

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationAntivirus Protection > Session hijacking


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

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway