OSINT Techniques: Chapter 7 - Online Communities
An exhaustive breakdown of Chapter 7 of Michael Bazzell's 'Open Source Intelligence Techniques', analyzing Reddit historical APIs, Discord bot telemetry, Telegram channel scraping, and dark web forum monitoring.
Welcome to our seventh chapter analysis covering “Open Source Intelligence Techniques: Resources for Searching and Analyzing Online Information” (Sixth Edition) by Michael Bazzell.
While mainstream social media platforms (Facebook, X, LinkedIn) serve as public billboards, the authentic conversations, technical disclosures, hacker coordination, and fringe affiliations occur within online communities: Reddit, Discord servers, Telegram channels, and underground discussion boards.
In Chapter 7: Online Communities, Bazzell navigates the decentralized web. These environments operate under pseudonymous subcultures where users share unfiltered opinions, ask for technical support regarding illicit activities, leak proprietary source code, and coordinate decentralized campaigns. In this comprehensive guide, we dissect historical Reddit mining via the Pushshift/PullPush architectures, Discord server metadata harvesting, Telegram scraping pipelines via MTProto, and dark web forum tracking tradecraft.
Key Takeaways
- Uncovering Deleted History via Reddit Ingestion APIs: When users delete incriminating Reddit comments or wipe their post histories, third-party ingestion mirrors (Pushshift / PullPush) retain the original text, author username, and UTC timestamps captured at the moment of initial submission.
- Discord Telemetry & Guild Mapping: Discord operates as a closed garden, but inspecting server guild metadata, bot APIs, and user snowflake IDs allows investigators to map user roles, voice channel activity patterns, and server member rosters.
- Telegram as a Modern Cybercrime & OSINT Goldmine: Telegram’s permissive API allows researchers to build automated MTProto client scrapers, trace message forward chains across public channels, exfiltrate subscriber lists, and monitor breach release feeds.
- Dark Web Discussion Boards: Navigating forums like BreachForums, XSS, and Exploit requires strict Tor workstation isolation, PGP signature verification, and meticulous avatar/username correlation across clearnet platforms.
Architectural & Investigative Workflow
The following flowchart illustrates the multi-community investigation and correlation lifecycle:
flowchart TD
subgraph Community_Discovery["Phase 1: Seed Pseudonym / Keyword Pivot"]
Seed["Target Pseudonym / Topic Keyword"] --> Reddit["Reddit Historical Search (PullPush API)"]
Seed --> Discord["Discord Server & Snowflake Search"]
Seed --> Telegram["Telegram Channel & Forward Search"]
Seed --> Darknet["Darknet Breach Forums (XSS / BreachForums)"]
end
subgraph Technical_Extraction["Phase 2: Automated Telemetry & Message Extraction"]
Reddit --> DeletedComments["Recover Deleted Submissions & Subreddit History"]
Discord --> GuildInspect["Exfiltrate Server Rosters & Discord Bot Logs"]
Telegram --> ChannelScrape["MTProto Client Scrape (Forward Chains & Media)"]
Darknet --> ActorProfile["Thread History & PGP Key Extraction"]
end
subgraph Cross_Platform_Fusion["Phase 3: Cross-Platform De-Anonymization"]
DeletedComments --> Correlation["Correlate Timestamps, Writing Style, Technical Queries"]
GuildInspect --> Correlation
ChannelScrape --> Correlation
ActorProfile --> Correlation
Correlation --> TargetDossier["Unmasked Physical Identity / Operator Dossier"]
end
Technical Breakdown & Investigative Mechanics
1. Reddit OSINT & Historical Comment Recovery
Reddit users frequently believe that deleting a comment removes it permanently. However, automated crawlers ingest submissions within seconds of publication.
The Pushshift / PullPush API Architecture
While Reddit introduced restrictive API pricing, community mirrors like PullPush preserve public Reddit historical data accessible via REST endpoints:
1
2
3
4
5
# Querying all historical submissions by a specific target username
curl -s "https://api.pullpush.io/reddit/search/submission/?author=TargetUsername&size=100" | jq -r '.data[] | "[Date: \(.created_utc | todate)] [Subreddit: r/\(.subreddit)] [Title: \(.title)]"'
# Searching for deleted comments containing specific terms (e.g., corporate domain)
curl -s "https://api.pullpush.io/reddit/search/comment/?q=target-enterprise.com&size=50" | jq -r '.data[] | "[Author: \(.author)] [Body: \(.body)]"'
What Reddit History Reveals:
- Subreddit Affiliations: Active participation in
r/Denver,r/AskLosAngeles, orr/sysadminimmediately establishes geographic residency and technical profession. - Help Desk / StackOverflow-Style Queries: Targets asking for assistance with specific firewall models or proprietary internal software architectures often leak company details in sample code snippets.
2. Discord Reconnaissance & Snowflake ID Forensics
Discord structures all entities (users, messages, channels, servers) around Snowflake IDs—unique 64-bit integers with an embedded Unix timestamp.
Decoding a Discord Snowflake ID via Python:
1
2
3
4
5
6
7
8
9
10
def decode_discord_snowflake(snowflake_id):
# Discord epoch starts at 2015-01-01T00:00:00Z (1420070400000 ms)
DISCORD_EPOCH = 1420070400000
timestamp_ms = (int(snowflake_id) >> 22) + DISCORD_EPOCH
import datetime
creation_time = datetime.datetime.fromtimestamp(timestamp_ms / 1000.0, tz=datetime.timezone.utc)
return creation_time.strftime("%Y-%m-%d %H:%M:%S UTC")
# Example: Decoding target user snowflake ID
print(decode_discord_snowflake("345678901234567890"))
Operational Discord Tradecraft:
- Developer Mode: Enable Developer Mode in Discord settings to right-click any user, channel, or guild to copy raw Snowflake IDs.
- Third-Party Avatar Tracking: Platforms like Discord.id and DiscordHistory log historical avatar changes, username modifications, and server mutuals.
- Bot Directory Auditing: Joining public technical or gaming servers associated with the target allows an investigator to inspect custom bot ranking commands (
!rank,!stats) to reveal activity metrics.
3. Telegram Scraping & Message Forward Tracing
Telegram is widely used by hacktivists, malware authors, and leaked credential brokers. Using the Python Telethon library (which connects directly via the binary MTProto protocol), an analyst can automate channel monitoring:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3
# telegram_channel_miner.py - Automated MTProto Public Channel Scraper
from telethon import TelegramClient
import csv
api_id = 12345678 # Dedicated investigator API credentials
api_hash = 'your_api_hash'
channel_username = 'threat_intel_channel'
client = TelegramClient('osint_session', api_id, api_hash)
async def main():
await client.start()
print(f"[*] Connected. Mining channel: {channel_username}")
with open('telegram_intel.csv', 'w', newline='', encoding='utf-8') as f:
writer = csv.writer(f)
writer.writerow(['Message_ID', 'Date_UTC', 'Sender_ID', 'Text', 'Forward_From'])
async for message in client.iter_messages(channel_username, limit=300):
forward_origin = message.forward.chat.title if message.forward and hasattr(message.forward, 'chat') else None
writer.writerow([message.id, message.date, message.sender_id, message.text, forward_origin])
print("[+] Extraction complete. Saved to telegram_intel.csv")
with client:
client.loop.run_until_complete(main())
Uncovering Hidden Origins via Forward Headers:
When a threat actor forwards a message from a private channel or their personal account into a public channel, Telegram preserves the forward_from metadata header unless explicitly disabled by the sender. This frequently leaks the threat actor’s personal handle or private staging channel name.
4. Dark Web & Breach Forum Monitoring
When investigating data breaches or advanced persistent threats (APTs), intelligence often surfaces first on underground discussion boards:
- Tor Workstation Hardening: Always access darknet forums (
.onion) from an isolated VM (Whonix or Tails) with JavaScript disabled globally (about:config->javascript.enabled = false). - Handle Re-Use Triangulation: Cybercriminals frequently reuse the same pseudonym across darknet markets, illicit hacking forums, and benign clearnet coding platforms (GitHub, StackOverflow).
- Cryptocurrency Wallet Pivoting: Harvesting Bitcoin, Monero, or USDT addresses posted for escrow deposits enables on-chain blockchain transaction tracing to centralized exchanges (KYC off-ramps).
Real-World Case Scenario
Case Study: Tracing an Insider Data Extortionist
An unidentified user threatened to leak proprietary source code belonging to a healthcare firm, demanding a 5 Bitcoin ransom via an anonymous Telegram channel.
An OSINT specialist conducted a deep online community sweep:
- In the Telegram channel, the extortionist forwarded a single screenshot of a database terminal from another channel named
@apex_dev_lab.- Searching for
apex_dev_labacross Reddit historical comments via PullPush identified a deleted post from two years prior inr/PostgreSQL: “Having issues replicating our HIPAA database across AWS us-east-1.”- The deleted comment author was
apex_coder92. The analyst queried GitHub forapex_coder92and located a public repository containing a dotfiles configuration file.- Inside the
.gitconfigfile, the user had committed code under their real corporate email address:j.miller@target-health.com.- Corporate security confirmed the individual was a database administrator who had recently been placed on performance review.
Defensive Countermeasures & OpSec Recommendations
For corporate security teams, threat hunters, and system administrators:
- Conduct Proactive Dark Web Credential Sweeps: Ingest enterprise domain keywords into dark web scrapers to detect compromised corporate credentials posted on Russian and English breach forums within minutes of release.
- Sanitize Corporate Code Samples: Educate internal developers on the danger of posting proprietary snippets or internal IP addresses on Reddit, StackOverflow, or Discord developer servers.
- Establish Telegram Brand Monitoring: Deploy automated bots to monitor public Telegram leak channels for unauthorized references to your corporate executive names, trademarks, or VIP phone numbers.
Conclusion & Next Steps
Chapter 7 demonstrates that pseudonymous online communities provide a direct window into the thoughts, actions, and slip-ups of investigative targets. By mining deleted Reddit histories, parsing Discord snowflakes, and tracing Telegram message forwards, an investigator bridges anonymous handles to real-world identities.
In Chapter 8: Email Addresses, we dissect the fundamental currency of the internet: SMTP socket validation, Gravatar MD5 reversing, Holehe account discovery, and breach database pivoting.
Practical Forums, Telegram & Discord Intelligence Cheat-Sheet
| Platform / Vector | Command / Tool / URL | Investigative Purpose |
|---|---|---|
| Reddit Raw User API | https://www.reddit.com/user/<username>/submitted.json |
Extracts complete submission history, subreddits, timestamps, and deleted post stubs |
| Telegram Group Archival | telepathy --target target_channel --export csv |
Exports complete Telegram channel chat history, user rosters, and media attachments |
| Pastebin & Leak Monitoring | site:pastebin.com 'target_domain.com' | 'password' |
Uncovers plaintext configuration files, database credentials, and developer dumps |
| Discord Server Scrape | discord-chat-exporter-cli export -t <TOKEN> -c <CHANNEL_ID> |
Exports structured transcripts and message attachments from public/joined Discord guilds |
| Forum Engine Pivoting | site:targetforum.com/members/ 'target_alias' |
Pins target forum account creation date, reputation score, and signature hyperlinks |
Authoritative References & Verified Investigative Sources
- Michael Bazzell, IntelTechniques: Investigating Online Communities, Chat Services, and Message Boards. https://inteltechniques.com/book1.html.
- Telepathy Project: Python Telegram OSINT & Archive Toolkit. https://github.com/jordanwildon/Telepathy.
- Reddit Developer API: Reddit Data API Documentation & JSON Endpoints. https://www.reddit.com/dev/api/.
- Bellingcat Guides: Investigative Approaches to Monitoring Telegram & Ephemeral Chat Networks. https://www.bellingcat.com/resources/how-tos/.
- Citizen Lab Research: Digital Espionage, Threat Networks and Online Communities. https://citizenlab.ca/.
Author: Abdulrahman M. Fathi (0x3bdo) • Cyber Security Engineer & Penetration Tester