Skip to main content

A Telegram OSINT and recon tool (for research use only).

Project description

Plundergram: A Telegram OSINT and recon tool (for research use only).

Disclaimer:

This project is intended for educational and research purposes only. Users are solely responsible for ensuring their use of this tool complies with Telegram’s Terms of Service and all applicable laws. The author does not condone or accept liability for any misuse, unethical behavior, or illegal activity involving this software.

Description:

Plundergram is a reconnaissance tool built for analyzing activity on Telegram using both the Telegram API and Bot API. It enables researchers and analysts to extract detailed insights from Telegram channels, groups, and bots.

Key capabilities include:

  • Identifying and profiling Telegram bots

  • Retrieving bot commands and messages sent via bots

  • Collecting messages from public and private chats (where access is available)

  • Accessing historical chat data for analysis

Plundergram is intended for investigative and research purposes, such as analyzing credential phishing operations, tracking threat actor activity, or conducting OSINT (Open Source Intelligence) on Telegram-based networks.

Features

  • Telegram Bot Profiling: Identify and gather metadata about Telegram bots, including usernames, IDs, and associated channels or groups.

  • Command Extraction: Capture and analyze commands sent to bots to understand their interaction patterns.

  • Message Collection: Retrieve messages sent by bots and users within public and private chats.

  • Historical Chat Retrieval: Access and analyze historical chat logs for comprehensive intelligence gathering.

  • Multi-Channel Support: Work across various Telegram channels, groups, and private chats.

  • Telegram API & Bot API Integration: Utilizes official Telegram APIs to ensure reliable and efficient data collection.

  • CLI Tool: Easy-to-use command-line interface for quick reconnaissance and automation.

  • Extensible and Scriptable: Designed for integration with other tools and workflows in cybersecurity and OSINT investigations.

Installation

Prerequisites

Prerequisites Python 3.7 or higher Telethon 1.28.5 or higher Requests 2.25.0 or higher Telegram - https://telegram.org/apps Telegram API credentials (API ID and API Hash) — Get yours here:https://core.telegram.org/api#getting-started

Steps

  1. Clone the repository:

    git clone https://github.com/username/repository-name.git
    
  2. Install the package and dependencies:

    pip install -e 
    
  3. Configuration

    Edit the config.ini file and replace values with your information

  4. Run the project: For CLI: - For Python: bash python Plunder.py CLI Bypass: - For Python: bash python Plunder.py -h for commands

Usage

See docs folder for full details on each module.

PlunderGram can be used to accomplish the following objectives:

  1. Collect information on a Telegram Bot
  2. Collect commands sent to a Telegram Bot.
  3. Collect new messages sent to a Telegram Chat from a Telegram Bot in real time.
  4. Collect all messages in a Telegram chat (does not include deleted messages).

Important note:

  • Message IDs are not necessarily incrememental, so we are essentially guessing valid message IDs during historical message retrieval. -
  • Retrieval occurs in chunks of 100 with a 3 second delay between chunks for rate limiting purposes.
  • Max rate is 2000 message ID retrievals per minute.

Guide:

  1. Enter information into the config file (config.ini)

  2. Run Plunder CLI Bypass: Run: Plunder.py {Command}

    Command List: (Required) [Recon] Description: An asynchronous function that continuously checks for updates from a specified Telegram bot and saves new updates to a JSON file. It validates updates to ensure that only new messages are recorded.

    [Boarding] Description: An asynchronous function that sets up a Telegram bot client, establishes contact with a specified bot, and forwards messages from a source chat to a destination chat. It handles the connection and disconnection of the bot client.

    [Raid] Description: An asynchronous function that sets up a Telegram bot client to perform a raid operation by checking a range of message IDs in a specified source chat and saving the results to a JSON file.

    Arguments(required): [--startmess] Message ID to start on (int) [--maxmess] Message ID to end on (int)

    (Optional - Overrides Config data) [--token] Telegram Bot Token - Optional for Recon, Boarding, Raid [--sourcechat] Source Chat ID (int) - Optional for Boarding, Raid [--treasurechest] Directory Path for storing output file - Optional for Recon, Boarding, Raid

    Full CLI: Run: Plunder.py

    CLI Command Detail: [SOS] --> Displays command details. [Sitrep] --> Shows all running tasks. [Spyglass] --> checks if target is viable and returns target detail if successful. [Recon] --> polls for commands sent to target. This can be used for additional user/chat discovery. [Boarding] --> initiates contact with target and begins collection of new messages from target chat. [Raid] --> Retrieves all historical messages from target chat. [Submerge] --> Stops all running commands. [Sink] --> Stops running command specified by user response to prompt. [Kill] --> Terminates program.

  3. Output files are stored in an adjacent directory that can be specified wihtin the config file. The default directory is [TreasureChest]

Contributing

Contributions are welcome! To contribute:

  • Fork the repository

  • Create a new branch (git checkout -b feature-name)

  • Make your changes and commit them (git commit -m 'Add some feature')

  • Push to your fork (git push origin feature-name)

  • Open a Pull Request on the main repository

Please follow the coding style and add tests where possible.

##Support

Buy Me a Coffee

License

This project is licensed under the Apache License 2.0 — see the LICENSE file for details.

Acknowledgments

Inspired by OSINT and cybersecurity research communities.

Thanks to the creators of Telethon for the Telegram API library.

Thanks to the creators of ASCII Art Archive and associated tools.

Special thanks to anyone who contributed or helped test this project.

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

plundergram-1.0.2.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plundergram-1.0.2-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file plundergram-1.0.2.tar.gz.

File metadata

  • Download URL: plundergram-1.0.2.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for plundergram-1.0.2.tar.gz
Algorithm Hash digest
SHA256 169116babe01d7f4886c1031bfd8eac69d87e175b7022f6177ab17f5815063f2
MD5 ff40678bc9216992df7fc3a62fafcd01
BLAKE2b-256 bc73483faeb72e8a50bc1a272f63770897ab5bbc0fb1f12cdf014fa847c70606

See more details on using hashes here.

File details

Details for the file plundergram-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: plundergram-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for plundergram-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08d26183573d5094c12fa06a587fb8463f468cd11b2eafc1cb415c9d6c658073
MD5 a4c5d6b7cf4380df24f525cff0dc41bb
BLAKE2b-256 594cd390bb0377c6632c4218833f6e80de025c31d4cc084a4e585b3b9f036c9a

See more details on using hashes here.

Supported by

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