课程: Programming Foundations: Web Security

今天就学习课程吧!

今天就开通帐号,24,600 门业界名师课程任您挑!

Cookie visibility and theft

Cookie visibility and theft

- Browser cookies are easily viewed, easily manipulated, and easily stolen. They're out of view enough that they may seem like private data, but they're not. In many browsers, a user can go into the preferences area and inspect their cookies. Recently, some browsers have made cookies a little harder for a basic user to inspect, but there's still ways to view them, such as using a browser's developer tools. Cookie data also may be visible while in transit. Cookie data is sent in the plain text in the header of every request to the web server. An attacker with the ability to observe network traffic will see them. This is easy to do on an open wifi network like those found in coffee shops, hotels, and airports. Cross-site scripting attacks can also be used to get cookie data. Here's an example in PHP. I've split the URL up to make it easier to read. It uses JavaScript to get the cookie data, and then it pings a URL that…

内容