Detections

Explore public detection logic contributed by the community across SIEM and rule languages.

3,865 detections

This rule detects suspicious activity where an Azure CLI session, initially interactive, is followed by non-interactive access from a different IP address. This could indicate an attacker using a stolen token or session from a legitimate user's interactive login to perform automated actions. The rule specifically looks for a pivot from interactive to non-interactive access where the non-interactive access occurs after the interactive access and from a different IP address, within a 30-day lookback window.
avatar
F S@Fsdr
avatar
Detections.ai Community
10 months ago
12912850
This rule detects inbound network connections to internet-facing devices on ports other than 80 (HTTP) or 443 (HTTPS). This could indicate an adversary attempting to establish command and control, exfiltrate data, or exploit services running on non-standard ports.
avatar
Information hacker@Informationhacker
avatar
Detections.ai Community
10 months ago
220148
This KQL look for any IOCs from the given list and compare against EmailEvents on Defender for Email
avatar
Sunny Suthar@AcEB0mb3R
avatar
Detections.ai Community
10 months ago
422247
This rule detects suspicious activity related to Microsoft 365 Device Code OAuth consent flows. It specifically looks for device code authentications that are single-factor or lack MFA, and then groups these by IP address and client application. The rule identifies suspicious patterns such as a high number of logins, unique users, or unique applications from a single IP address, or rapid login attempts within a short timeframe, which could indicate enumeration or phishing attempts.
avatar
Lacey Cochrane@NullVectorX
avatar
XQL Threat Forge
10 months ago
253291
The current AI ecosystem has significant security gaps that can be weaponized for corporate espionage, supply-chain compromise, data harvesting, and even nation-state operations.

This KQL query identifies endpoints that are accessing, installing, or executing AI-related services or applications. The primary objective is to detect :

- Unauthorized AI usage (Policy Violation)
- Potential data exfiltration via AI platforms
- Shadow IT activity involving local or cloud-based LLMs
- High-risk AI deployments that bypass corporate policy
avatar
Marvens Decayette@IronBranded
avatar
Detections.ai Community
10 months ago
1833980
Multiple threat actors are compromising Microsoft 365 accounts in phishing attacks that leverage the OAuth device code authorization mechanism.

Attackers trick victims into entering a device code on Microsoft’s legitimate device login page, unknowingly authorizing an attacker-controlled application and granting them access to the target account without stealing credentials or bypassing multi-factor authentication (MFA).
avatar
Wambua Thyaka@thyaka
avatar
Detections.ai Community
10 months ago
420315
Try tio find out phishing domain based on mail history
avatar
Volodymyr Bilous@bilous
avatar
Detections.ai Community
10 months ago
400260
This rule detects potential malicious email campaigns by identifying when multiple users submit email reports (e.g., phishing or spam) that share common entities such as sender IP, primary sender address/domain, secondary sender address/domain, or subject line. A configurable threshold determines the minimum number of distinct reports required to flag an entity as suspicious.
avatar
Kevin Nguyen@kevin
avatar
Detections.ai Community
10 months ago
403265
Detects successful Microsoft 365 sign-ins using the OAuth 2.0 device code grant flow for applications with low prevalence. This technique is used by threat actors to gain unauthorized access to accounts, bypassing some MFA controls.
avatar
Tim Peck@timpeck
avatar
Detections.ai Community
10 months ago
123287
This alert finds sessions where a device-code flow produced multiple sign-in events (interactive + non-interactive), with mismatched user-agents or differing country/geolocation, for the same Session ID - a strong indicator of device-code phishing abuse.
Looks for:
Brute-forcing device code tokens
Token replay attempts
Malicious use of device code authentication across different devices or locations
Anomalous sign-in behaviour suggesting account compromise
avatar
Will Shaw@SheffShaw94
avatar
Detections.ai Community
11 months ago
790496
Detects potential exploitation attempts against Next.js applications vulnerable to CVE-2025-66478 (React2shell). The rule looks for POST requests to Next.js Server Action endpoints with an unusually large request body, which may indicate a malicious payload designed to trigger a deserialization RCE.
avatar
Mehulkumar Savajani@Msavajani
avatar
Detections.ai Community
11 months ago
310464
This query hunts for indicators of compromise (IOCs) and behaviors linked to the LockBit 5.0 ransomware variant. It identifies the creation of the ransom note, suspicious file renaming patterns using hexadecimal extensions, and network connections to known command-and-control (C2) infrastructure associated with LockBit activity.
avatar
Navdeep Sharma@navvi24
avatar
Detections.ai Community
11 months ago
803535
This detection correlates suspicious device code authentication behaviour in Azure AD with a successful creation of a Windows Hello for Business (WHfB) credential within the same 24 hours.

Microsoft allows specific application and resource combinations (permitted by CA) access without a previously registered device. Even more, one of these combinations allows the registration of a device.

An access token issued for the Microsoft Authentication Broker application and the Intune Enrollment resource can be used to authenticate and initiate the device join process.

Therefore, an attacker can leverage the token to bypass CA, register device, and establish persistence. Once registered, attacker gets a Primary Refresh Token (PRT), valid for 90 days.

Attackers often push further to configure WHfB (Windows Hello For Business) on the registered device. WHfB issues TPM-backed, cryptographic credentials that Entra recognizes as a strong, phishing-resistant, passwordless authentication method.

Device registration unlocks persistence, but WHfB unlocks the ability to bypass stricter authentication-strength requirements.

Analysts: Check for IP mismatches, since in the Device Code authentication event we will see the victims IP, the WHfB registration event will contain the attackers IP.
avatar
Will Shaw@SheffShaw94
avatar
Detections.ai Community
11 months ago
692428
This detection identifies cases where a successful device registration event in Azure AD occurs shortly after a successful Resource Owner Password Credentials (ROPC) authentication to Microsoft Intune Enrollment via the Microsoft Authentication Broker.

Microsoft allows specific application and resource combinations access without a previously registered device.

An access token issued for the Microsoft Authentication Broker application and the Intune Enrollment resource can be used to authenticate and initiate the device join process.

An attacker can leverage the token to bypass CA, register device, and establish persistence. Once registered, attacker gets a Primary Refresh Token (PRT), valid for 90 days.

The following query joins ROPC successful sign-ins, to successful device registrations. Registrations that occur soon after a ROPC event (2 days in this instance) could be an indicator of abuse.
avatar
Will Shaw@SheffShaw94
avatar
Detections.ai Community
11 months ago
381286
This rule detects when a domain or URL observed in Teams Messages matches a known threat intelligence indicator from Microsoft Defender Threat Intelligence. It specifically looks for hits against 'Domain' and 'URL' type indicators.
avatar
Benjamin Zulliger@benscha
avatar
Detections.ai Community
11 months ago
802594
Detects when an internal user successfully authenticates as a guest to an external Microsoft Teams tenant. This could be legitimate B2B collaboration, but it can also be abused by attackers to lure users into a malicious tenant where security controls (like Safe Links/Safe Attachments) are not enforced.
avatar
Mehulkumar Savajani@Msavajani
avatar
Detections.ai Community
11 months ago
412384
Detects when an internal user successfully authenticates as a guest to an external Microsoft Teams tenant. This could be legitimate B2B collaboration, but it can also be abused by attackers to lure users into a malicious tenant where security controls (like Safe Links/Safe Attachments) are not enforced.
avatar
Mehulkumar Savajani@Msavajani
avatar
Detections.ai Community
11 months ago
140151
Detects the ToolShell exploit chain used against SharePoint servers. This exploit involves a POST request to ToolPane.aspx with a spoofed Referer header pointing to SignOut.aspx, which is a key indicator of this specific attack.
avatar
Mehulkumar Savajani@Msavajani
avatar
Detections.ai Community
11 months ago
80119
Detects a user account creation event in Azure AD followed by that same account being added to a privileged administrative role within a short timeframe (e.g., 40 minutes). This behavior is a key tactic of threat actors like Muddled Libra (Scattered Spider), who are known to rapidly escalate privileges after gaining initial access. This detection requires a SIEM to correlate the user identity between the creation event and the role addition event.
avatar
Mehulkumar Savajani@Msavajani
avatar
Detections.ai Community
11 months ago
9082
Query sign-ins with MFA success immediately following multiple failed sign-ins from different regions. Potential session hijack or AiTM (Adversary-in-the-Middle).


Error Code 0
Successful authentication
Normal successful login (validate carefully only when paired with suspicious failures)

Error Code 50053
Account locked or malicious IP
HIGH - Brute force attempts

Error Code 50074
MFA challenge not passed
HIGH - User failed MFA

Error Code 500121
MFA prompt timeout
MEDIUM - Possible MFA fatigue indicator

Error Code 50133
Session revoked or SSO artifact invalid
HIGH - Session hijacking indicator

Error Code 50076
MFA required but not provided
MEDIUM - Possible MFA bypass attempt
avatar
Anoozilla HunterX@AnoozillaHunterX
avatar
Detections.ai Community
1 year ago
564679
Detects the use of the AADInternals PowerShell module, a tool used by threat actors like MERCURY and DEV-1084 for credential theft and privilege escalation in Azure AD environments.
avatar
Tim Peck@timpeck
avatar
Detections.ai Community
1 year ago
3276
Page 145 of 185