OpenAI Credential Stuffing
Description
Detects credential stuffing attacks against OpenAI accounts by tracking the number of distinct source IP addresses submitting failed login attempts against the same email address within a short timeframe. Unlike brute force from a single IP, credential stuffing distributes attempts across many IPs to evade rate limiting. This rule complements OpenAI.BruteForce.Login.Success.Group, which confirms account compromise once a successful login follows the failures.
Query · python
def rule(event):
return event.get("type") == "login.failed"
def unique(event):
return event.deep_get("actor", "session", "ip_address", default="UNKNOWN_IP")
def dedup(event):
return event.deep_get("actor", "session", "user", "email", default="UNKNOWN_EMAIL")
def title(event):
email = event.deep_get("actor", "session", "user", "email", default="UNKNOWN_EMAIL")
return f"[OpenAI] Credential stuffing detected against account [{email}]"
def alert_context(event):
return {
"email": event.deep_get("actor", "session", "user", "email", default="UNKNOWN_EMAIL"),
"ip_address": event.deep_get("actor", "session", "ip_address", default="UNKNOWN_IP"),
"error_code": event.deep_get("login_failed", "error_code", default="UNKNOWN"),
}
Analyst notes
- Review the distinct source IPs from the failed login attempts and check if they belong to known anonymization infrastructure (VPNs, Tor exit nodes, residential proxies) using threat intelligence
- Query OpenAI audit logs for all login.succeeded and login.failed events against the targeted email address within the past 30 minutes to identify all contributing source IPs and determine if any attempt succeeded — the alert context shows only the IP of the final triggering event, not all contributing IPs
- Check for other alerts involving the targeted email address in the past 7 days and look for login.succeeded events from unfamiliar locations or devices to assess whether account compromise has already occurred