Credentials
Adversaries may gather credentials that can be used during targeting. Account credentials may be obtained via phishing for information, breach data dumps, dark web marketplaces (Russian Market, 2easy), infostealer malware logs distributed via Telegram channels, or by compromising websites to harvest authentication cookies. Gathered credentials enable credential stuffing attacks, account takeover via valid account abuse (T1078), and initial access via external remote services (T1133). Real-world actors including APT28, Magic Hound, LAPSUS$, Leviathan, and Chimera have leveraged previously gathered credentials to validate access across dozens to hundreds of organizational and third-party platforms.
// Primary: Detect credential stuffing — gathered credentials being tested against Azure AD / Entra ID
// High volume of authentication failures across many distinct accounts from a single source IP
let StuffingAccountThreshold = 10;
let LookbackPeriod = 24h;
let TimeWindowBin = 1h;
let FailedSignins = SigninLogs
| where TimeGenerated > ago(LookbackPeriod)
| where ResultType !in ("0", "50140", "50074", "50076") // Exclude success, 'stay signed in', MFA interrupts
| where IPAddress != ""
| summarize
FailedAttempts = count(),
UniqueTargetAccounts = dcount(UserPrincipalName),
TargetAccounts = make_set(UserPrincipalName, 25),
TargetApps = make_set(AppDisplayName, 10),
ErrorCodes = make_set(ResultType, 10),
Countries = make_set(tostring(LocationDetails.countryOrRegion), 5),
FirstSeen = min(TimeGenerated),
LastSeen = max(TimeGenerated)
by IPAddress, bin(TimeGenerated, TimeWindowBin);
FailedSignins
| where UniqueTargetAccounts >= StuffingAccountThreshold
| join kind=leftouter (
SigninLogs
| where TimeGenerated > ago(LookbackPeriod)
| where ResultType == "0"
| summarize
SuccessfulLogins = count(),
SuccessAccounts = make_set(UserPrincipalName, 10),
SuccessApps = make_set(AppDisplayName, 5)
by IPAddress
) on IPAddress
| extend SuccessfulLogins = coalesce(SuccessfulLogins, 0)
| extend IsSuccessfulStuffing = SuccessfulLogins > 0
| extend RiskScore = case(
IsSuccessfulStuffing and UniqueTargetAccounts >= 50, "Critical",
IsSuccessfulStuffing and UniqueTargetAccounts >= 10, "High",
not IsSuccessfulStuffing and UniqueTargetAccounts >= 50, "High",
not IsSuccessfulStuffing and UniqueTargetAccounts >= 10, "Medium",
"Low"
)
| project
TimeWindow = TimeGenerated,
IPAddress,
FailedAttempts,
UniqueTargetAccounts,
TargetAccounts,
TargetApps,
ErrorCodes,
Countries,
SuccessfulLogins,
SuccessAccounts,
IsSuccessfulStuffing,
RiskScore,
FirstSeen,
LastSeen
| sort by UniqueTargetAccounts desc Data Sources
Required Tables
False Positives
- Misconfigured applications using stale or rotated credentials — the app retries authentication against multiple user endpoints generating mass failures from a single service IP
- Large corporate NAT gateway or shared egress IP — multiple users failing authentication over a short window may be attributed to the same external IP and exceed thresholds
- Automated integration testing or load testing pipelines that enumerate user accounts against authentication endpoints as part of CI/CD validation
- Password synchronization tools during bulk password resets — Active Directory federation services may produce burst authentication failures across many accounts
- Legacy email clients or mobile apps that aggressively retry authentication after password changes, generating multi-account failures when service accounts share an IP
References (13)
- https://attack.mitre.org/techniques/T1589/001/
- https://www.bleepingcomputer.com/news/security/2easy-now-a-significant-dark-web-marketplace-for-stolen-data/
- https://www.bleepingcomputer.com/news/security/dissecting-the-dark-web-supply-chain-stealer-logs-in-context/
- https://www.secureworks.com/research/the-growing-threat-from-infostealers
- https://sec.okta.com/scatterswine
- https://github.com/dxa4481/truffleHog
- https://github.com/michenriksen/gitrob
- https://learn.microsoft.com/en-us/azure/active-directory/reports-monitoring/reference-sign-ins-error-codes
- https://learn.microsoft.com/en-us/azure/active-directory/identity-protection/concept-identity-protection-risks
- https://learn.microsoft.com/en-us/microsoft-365/security/defender/advanced-hunting-identitylogonevents-table
- https://github.com/AlessandroZ/LaZagne
- https://msrc.microsoft.com/blog/2021/10/microsoft-s-response-to-dea-0537
- https://www.microsoft.com/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/
Unlock Pro Content
Get the full detection package for T1589.001 including response playbook, investigation guide, and atomic red team tests.