Skip to main content

Get intelligence on malicious Telegram channels using bot Token

Project description

Telemal

While threat hunting, you may come across a Telegram bot token embedded in an infostealer, used to transmit stolen data to a Telegram channel. By utilizing Telemal, you can efficiently gather intelligence on the malicious channel, leveraging the bot's token to uncover more information.

Installation

pip install telemal

Features

  • List channels the bot is part of (Based on messages received in the last 24 hours).
  • Get basic information on a channel.
  • List all messages on a channel.
  • Leave channel.
  • Download files.
  • Send a message.
  • Send a file.
  • Delete all messages in the last 48 hours.
  • Export all text messages.

How does it work ?

There are two angles of intelligence in this tool :

First, using the getUpdates API method, we can retrieve messages that the bot can read from the last 24 hours. From that, we can possibly find other channels the bot is in.

Then, to retrieves all messages from a channel, we use the forwardMessage API method, which is the only way (that I know of) to retrieve a message from a message_id. The tool first sends a message to retrieve the last message id. It then forwards all messages from 1 to last_message_id to the same channel. Obviously, all messages sent for recon are deleted as soon as they are sent. All messages are also sent with the disable_notification option. I will not write that it's impossible for a user to notice the messages being sent then deleted, but it's really hard.

Limitations

  • All messages sent with the protect_content option will not be retrieved.
  • The bot has to have the can_delete_messages permission, or the channel will be flooded with messages from the bot. It shouldn't be a big deal as the goal of this tool is to stop criminals' actions, but it's better to know this.

Teletracker vs Telemal example

Teletracker vs Telemal

Don't hesitate to ask for more features :)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telemal-1.2.15.tar.gz (11.3 kB view details)

Uploaded Source

Built Distributions

telemal-1.2.15-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

telemal-1.2.15-py2.py3-none-any.whl (11.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file telemal-1.2.15.tar.gz.

File metadata

  • Download URL: telemal-1.2.15.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for telemal-1.2.15.tar.gz
Algorithm Hash digest
SHA256 5d2518c8465157302cf5f5b05b62b6ee4fb247baaf836c015a78756f9562573f
MD5 dac381b4c6548347e9d4bd65c7d5fa20
BLAKE2b-256 1c6fa0d64aa234d44953464e93e57e0b0b0094205127b78ebdd3cfe8aa5d3c9b

See more details on using hashes here.

File details

Details for the file telemal-1.2.15-py3-none-any.whl.

File metadata

  • Download URL: telemal-1.2.15-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for telemal-1.2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 d2b75f49854f90960600d88d8e48feacbb1108f1455730243f8bf4af46aa8621
MD5 6110b9c97a6ad217894b3450dd1d3719
BLAKE2b-256 8ccc803dd3df0b70e21e4645e7cc308e0c724474b06bef27dae31c0f75c3ae0f

See more details on using hashes here.

File details

Details for the file telemal-1.2.15-py2.py3-none-any.whl.

File metadata

  • Download URL: telemal-1.2.15-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.0

File hashes

Hashes for telemal-1.2.15-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 76f6375eddda2449c325539d6de9effe4ae7e4e820f600e6e766d8cfe3810479
MD5 0ebb86b56aaff9be5f9f36469f0f101d
BLAKE2b-256 9c385bee11a821cb09ffc1a29588d46dc4871ee023df9b3ea357964e4b344de5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page