Query Details
// Discord Invite Hijacking Detection // https://darkatlas.io/blog/discord-invite-hijacking-how-fake-links-are-delivering-infostealers let QueryPeriod = 1h; let MonitorURLs = dynamic(["discord.com","discord.gg"]); let DiscordAccess = DeviceNetworkEvents | where Timestamp > ago(QueryPeriod) | where isnotempty(RemoteUrl) | where ActionType == @"ConnectionSuccess" | where RemoteUrl has_any (MonitorURLs) | distinct DeviceName; DeviceNetworkEvents | where Timestamp > ago(QueryPeriod) | where isnotempty(RemoteUrl) | where ActionType == @"ConnectionSuccess" | where DeviceName has_any(DiscordAccess) and RemoteUrl =~ "captchaguard.me"
This query is designed to detect potential Discord invite hijacking attempts by monitoring network events on devices. Here's a simplified explanation of what it does:
Define Monitoring Period and URLs:
1h) and specifies two URLs to monitor: discord.com and discord.gg.Identify Devices Accessing Discord:
Detect Suspicious Activity:
captchaguard.me, which is suspicious in this context.The query essentially identifies devices that have accessed Discord and then checks if those same devices have also accessed a potentially malicious URL (captchaguard.me) within the same timeframe, which could indicate an attempt to hijack Discord invites.

Steven Lim
Released: June 15, 2025
Tables
Keywords
Operators