WebCT 4.x Javascript Session Stealer Exploits Software: WebCT Campus Edition 4.x (http://secunia.com/product/3280/) Affected Version: 4.1.5.8 Discoverer: Benjamin "balupton" Lupton Date Discovered: November 2005 Date Reported: 25/06/2007 Software Author Contacted (again) on: 20/07/2007 Date Published: 05/03/2008 Published At: http://www.balupton.com/blogs/dev?title=webct_session_stealer_exploit http://www.balupton.com/documents/webct_exploits.txt http://seclists.org/fulldisclosure/2008/Mar/0051.html http://www.securityfocus.com/bid/28107/info http://secwatch.org/advisories/1020585/ http://secunia.com/advisories/29227/ Attack Type: Javascript Session Stealer Exploit. Description: Mail & Discussion Board messages are not properly checked for javascript, allowing javascript to perform a session stealing attack (allowing the attacker to be logged in as the victim). Tested On: Attacks were tested fully on eCentral TAFE's WebCT System in November 2005 (with permission of staff), and again on Curtin University's WebCT System in June 2006 (but this time only to see if the javascript will run). Action Taken: Contacted TAFE lecturers and administrators, who didn't really care. Contacted WestOne multiple times, but never recieved any response. Then contacted Secunia, which would not publish as the discoverer did not own their own copy of the software in question. Published as WebCT is being phased out, with Blackboard being the replacement. Steps: The attacker publishes the exploit code in a message with "Don't wrap text" enabled. The victim accesses the attacker's message and their cookies are sent to the attacker's remote logger. The attacker then logs into the system and replaces his/her cookies with the acquired cookies. - Cookies are formatted as follows within the "value" attribute: CookieName=CookieValue; NextCookieName=NextCookieValue; The attacker is now logged into the system as the victim. In this case the logger is located here: http://www.balupton.com/sandbox/logger.php?pass_code=secret_key Notes: Victims must be students (attack does not work on non students, eg. teachers/admins). Attack 2 will also run in Opera, but fails to retrieve the document.cookie value. Attack 2 uses a base64 encoded javascript which is executed. Both attacks can be customized to allow any javascript to run. Javascript can also be developed to post a mail or discussion board message, this works for all types of victims. Resources: Attack Code: See below Logger: http://localhost.balupton.com/sandbox/logger.php?pass_code=secret_key&show_source=true Base64 Decoder / Encoder: http://www.balupton.com/sandbox/base64.php Cookie Editor: Firefox - http://editcookies.mozdev.org/ , Opera - Built In Attack 1 - IE6SP2 Exploit (Automatic):
Thank you
Attack 2 - Firefox Exploit (Manual): Click Me! Attack 2 - Firefox Exploit (Manual) - Decoded: