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
Don't hesitate to ask for more features :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file telemal-1.2.8.tar.gz
.
File metadata
- Download URL: telemal-1.2.8.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5733d078665d011b68c959ea7d00133e5a3b88c1047a1b76d95ac0bd8fcdeb3 |
|
MD5 | e6efef95f3b284a5ceee5f5189445c79 |
|
BLAKE2b-256 | 546cd77013bb00010068333d15801d059252c6920376fb71307bce461ee34058 |
File details
Details for the file telemal-1.2.8-py2.py3-none-any.whl
.
File metadata
- Download URL: telemal-1.2.8-py2.py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf9bc396811c6d942642ed847983b49bf65c0aac4ae17c8c743717e5c22614ba |
|
MD5 | 8be87b0b3518388bb3e50615c093d497 |
|
BLAKE2b-256 | e834c6665a2a98e9d8d65e72cb28f3b380e88a4896541519990c00df436bb289 |