Skip to content
Access control Write-up Intermediate

How I Hacked a Live Chatbot and Earned My First $$$$ (4-Digit) Bo

A publicly accessible JavaScript configuration file exposed MQTT broker credentials, and the broker accepted a trivial admin login with an empty password. An attacker could subscribe to a wildcard topic and receive live customer support chat messages from multiple sessions, including personal data and tokens.

Mahbubur Rahman Soraf Follow

Published on medium.com

Assalamu Alaikum. I’m Mahbubur Rahman Soraf, a part-time bug bounty hunter from Bangladesh.

Mahbubur Rahman Soraf, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could read live customer support chats in real time, exposing personal data such as phone numbers, home addresses, and JWT tokens, without needing an account.

What the attacker needed

Network access to the broker URL; Node.js installed; no account needed

The fix

The chatbot was taken down until the issue was fixed, and after the fix the wildcard subscription no longer worked.

How it was found

  1. View the page source of the main site and find the Drupal settings JSON containing the chat apiUrl.
  2. Follow the chat backend host and read the publicly accessible env_app.js file to obtain MQTT connection details.
  3. Read the main.js bundle to find a fallback admin account and test the broker with username admin and an empty password.
  4. Use a Node.js script with the mqtt library to connect to the broker over WebSocket as admin.
  5. Subscribe to the wildcard topic client/+/chat_session and observe incoming messages from multiple customer sessions.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The chat system used a message broker (a post office for messages) to pass chat messages between customers and support. The login details for this broker were left in a public file, and the broker allowed a very weak login. Because of a missing permission check, anyone logged in could listen to every customer's chat at once, not just their own.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.