pip3installdroopescandroopescanscanmoodle-uhttp://moodle.example.com/<moodle_path>/[+] Plugins found: forumhttp://moodle.schooled.htb/moodle/mod/forum/http://moodle.schooled.htb/moodle/mod/forum/upgrade.txthttp://moodle.schooled.htb/moodle/mod/forum/version.php[+] No themes found.[+] Possible version(s):3.10.0-beta[+] Possible interesting urls found:Staticreadmefile.-http://moodle.schooled.htb/moodle/README.txtAdminpanel-http://moodle.schooled.htb/moodle/login/[+] Scan finished (0:00:05.643539elapsed)
moodlescan
#Install from https://github.com/inc0d3/moodlescanpython3moodlescan.py-k-uhttp://moodle.example.com/<moodle_path>/Version0.7-Dic/2020.............................................................................................................ByVictorHerrera-supportedbywww.incode.cl.............................................................................................................Gettingserverinformationhttp://moodle.schooled.htb/moodle/...server:Apache/2.4.46 (FreeBSD) PHP/7.4.15x-powered-by:PHP/7.4.15x-frame-options:sameoriginlast-modified:Wed,07Apr202121:33:41GMTGettingmoodleversion...Versionfoundvia/admin/tool/lp/tests/behat/course_competencies.feature:Moodlev3.9.0-betaSearchingvulnerabilities...Vulnerabilitiesfound:0Scancompleted.
I found that the automatic tools are pretty useless finding vulnerabilities affecting the moodle version. You can check for them in https://snyk.io/vuln/composer:moodle%2Fmoodle****
RCE
You need to have manager role and you can install plugins inside the "Site administration" tab:
Then, you can install the following plugin that contains the classic pentest-monkey php rev shell (before uploading it you need to decompress it, change the IP and port of the revshell and crompress it again)