Plans Calendar Cross-Site Scripting (XSS) proof of concept

Plans Calendar is vulnerable to cross-site scripting attacks.

So how does this XSS work?

  1. First, Nasty Hacker convinces you to visit his/her URL. Some possible ways to do this... I'm a nice kinda guy, so I opted for the last option. Open, honest, polite.
  2. Next, send the victim (you) to the vulnerable application (plans.cgi) on the target site (www.planscalendar.com), with some cleverly-crafted arguments. This is typically quite a long URL. There are several ways to do that too... Again, I'm a nice kinda guy, so I'm going to go for the last one.
  3. Vulnerable app on target site runs. Displays carefully-crafted arguments in unsafe way. Usually this means javascript. This basically means you run Nasty Hacker's javascript, but runs it as if it had come from the target site. It thus has all sorts of access to info on/about that target site which normally wouldn't be possible. USUALLY (including in this example) this is about cookie-stealing.
  4. Javascript collects interesting info from target site's security context (usually cookies, sometimes form fields, content) and submits it back to Nasty Hacker's site. There are several ways to do this too... I'll go with one of the types of redirect, mostly just because it's easiest.
  5. Collect all the cookies / other info for the site. These might contain: These session cookies allow you to continue using a web app (EG forum, webmail, shopping cart, online banking) without having to keep typing your username and password for every operation... Thus...
  6. Having stolen a copy of your cookies, this now also means that Nasty Hacker can probably "continue" to use the victim's accounts on the vulnerable site's forum / webmail / shopping cart / etc. Maybe change your delivery address, keep the same credit card, order a few items, change the delivery address back, maybe post as you on the forums, maybe read your webmail, depends what else is on the target domain.

FAQ

Go on then, show me

This is your last warning. Clicking on the link below will take you very briefly to http://www.planscalendar.com/demo/, where it will convince plans.cgi to point you at my javascript. My javascript will copy your planscalendar.com cookies and return here, where it will display your cookies for you.

Remember, if I was a really nasty guy, I wouldn't have given you all these warnings, your cookies would already have been stolen and you may never have even realised it. I could have been A LOT sneakier about this if I was feeling malicious.

Still here? OK, go for it, Show me my cookies