Session spoofing? Virtual host killer?- Vulnerability warning-the black bar safety net

2007-08-27T00:00:00
ID MYHACK58:62200716694
Type myhack58
Reporter 佚名
Modified 2007-08-27T00:00:00

Description

by leather total

Experiment a Session.

The local environment PHP Version 5.2.3 & apache_2. 2. 4 The remote server environment PHP Version 4.4.0 & Linux Apache/2.0.54 (Unix) IIS not tested Test domain: www.netpk.org & amp; www.i0day.cn

First write the two PHP scripts Session.php ifsession.php

session. the php code is as follows

<? php session_start();

$_SESSION['NETPK'] = 'netpk';

echo '$_SESSION[\'NETPK\']:' . $_SESSION['NETPK'] . "<br />";

echo '<br /><a href="ifsession.php">verify SESSION</a>';

?& gt;

ifsession. the php code is as follows

<? php session_start();

if ($_SESSION['NETPK'] != 'netpk') { echo 'session error!!'; }else { echo 'Session OK!!'; } echo '<br />$_SESSION[\'NETPK\']:' . $_SESSION['NETPK'] . "<br />"; ?& gt; <a href="session.php">return</a>

The local test of figure is not on..and the remote server the result is the same as

The same 2 scripts. Are uploaded to the www.netpk.org and www. i0day. cn root of the directory

先 http://www.i0day.cn/session.php

The SESSION is set successfully And then http://www. i0day. cn/ifsession. php validation

OK..successfully output a SESSION value.

That below I http://www. netpk. org/ifsession. php is not can also be successfully verified. Output a SESSION value?

ERROR... echo session is empty...

The same server..practice ends.... Virtual host killer?