OSINT Academy

How to get intelligence through Telegram?

Telegram is a messaging application that brings together a vast number of users and information resources. Since the start of the 2023 Israel-Hamas war, the Hamas-affiliated Telegram channel Gaza Now has seen a surge in the number of subscribers, with nearly 1.6 million subscribers. Many are using the channel to follow the latest developments in the conflict.

Telegram Channel Gaza Now

In the process of using Telegram, sometimes users will unintentionally leave important data resources, and these data may even become clues for intelligence, so the OSINT field also pays more and more attention to the data collection of Telegram. Below, this article will introduce ways to analyze Telegram chat history.

To export Telegram chat history

1. Open the Telegram client for Windows or MacOS and click the three dots in the upper right corner of the screen.

to export Telegram chat history

2. Click "Export chat history".

3. Configure the chat export settings.

4. When a message appears indicating that the export is complete, click Show My Data to open the folder containing the resulting files.

Export folder of Telegram chat history

5. The exported results can be viewed and analyzed in a browser or text editor.

Finding important messages in Telegram chat with the text editor Sublime Text

Select all files, right-click and choose Open with Sublime Text.

Open with Sublime Text



Search for messages from specific people in export results

1. Click Find - Find in files, put this regular expression to the text field and click Find:

\nMatthew(.|\n)*?


Replace Matthew with the username you want to find.

search in Sublime Text

This will open a new file containing lines from the URLs of all currently open files.

Sublime Text find results



Find relevant information in chat history

1. Open the “Find Results” file.

2. Click Find - Find...

3. Put this regular expression in the search field:

https?:\/\/(www\.)?[-a-zA-Z0–9@:%._\+~#=]{1,256}\.[a-zA-Z0–9()]{1,6}\b([-a-zA-Z0–9()@:%_\+.~#?&//=]*)

search in Sublime Text

4. Click Find all

This will find all messages from a particular user that contain links to websites or accounts in Telegram.

Enter the following regular expression to find a specific type of information.

Emails

[a-zA-Z0–9.!#$%&’+-/=?\^_`{|}~-]+@[a-zA-Z0–9-]+(?:.[a-zA-Z0–9-]+)

Telegram Emails

Phone numbers in different formats

[\+]?[(]?[0–9]{3}[)]?[-\s\.]?[0–9]{3}[-\s\.]?[0–9]{4,6}

Telegram Phone numbers

Any six digits

\d{6}

Telegram Any six digits

Bitcoin wallet address

(bc1|[13])[a-zA-HJ-NP-Z0–9]{25,39}

Telegram Bitcoin wallet address

Ethereum wallet address

0x[a-fA-F0–9]{40}

Telegram Ethereum wallet address



Telegram open source intelligence tool
How to find a Telegram channel?
How to find a user ID in Telegram?
Telegram and Open Source Intelligence Investigations
How to save Telegram chat history?
TelegramRAT: A powerful Telegram-based remote communication access control tool