H
hunting-credential-stuffing-attacks
About hunting-credential-stuffing-attacks
A security analysis skill for SOC analysts and threat hunters investigating credential stuffing. It uses authentication-log patterns such as distributed failures, IP diversity, and ASN distribution to guide detection and monitoring validation.
Key features
- 01Authentication-log pattern analysis
- 02Detection of distributed login failures
- 03IP and ASN diversity indicators
- 04Password-spray query example
- 05Monitoring coverage validation
Use cases
- 01Investigating suspected credential stuffing
- 02Writing detection rules and hunting queries
- 03Reviewing authentication monitoring coverage
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ mukul975/ anthropic-cybersecurity-skills --skill hunting-credential-stuffing-attacksAfter installing, type/hunting-credential-stuffing-attacksin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
LICENSEreferences/api-reference.mdscripts/agent.pyDetails
From the project READMEHunting Credential Stuffing Attacks
When to Use
- When investigating security incidents that require hunting credential stuffing attacks
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Familiarity with security operations concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Instructions
Analyze authentication logs to detect credential stuffing by identifying patterns of distributed login failures, high IP diversity, and suspicious ASN distribution.
import pandas as pd
from collections import Counter
# Load auth logs
df = pd.read_csv("auth_logs.csv", parse_dates=["timestamp"])
# Credential stuffing indicator: many IPs trying few accounts
ip_per_account = df[df["status"] == "failed"].groupby("username")["source_ip"].nunique()
accounts_under_attack = ip_per_account[ip_per_account > 50]
Key detection indicators:
- High unique source IPs per failed username
- Low success rate across many accounts (< 1%)
- ASN concentration from cloud/proxy providers
- Geographic impossibility (same account, distant locations)
- User-agent uniformity across distributed IPs
Examples
# Password spray: one password tried across many accounts
spray = df[df["status"] == "failed"].groupby(["source_ip", "password_hash"]).agg(
accounts=("username", "nunique")).reset_index()
sprays = spray[spray["accounts"] > 10]
Comments
Markdown supported