Skip to main content

543,000+ Valid Secrets Exposed on GitHub in Massive Leak Study Hunt Query

36.8% of secrets were committed after GitHub enabled default Push Protection; 51.8% of leaks affect unblocked types like database URIs, private keys, and AI tokens.

// Microsoft Sentinel / Defender XDR - Hunting for Cloud Authentication Anomalies Post-Secret Exposure
// Detects AWS STS GetCallerIdentity or Azure sign-ins from unfamiliar ASN/IP ranges immediately after credential creation
let Lookback = 14d;
let SuspiciousGeoSignins = SigninLogs
| where TimeGenerated >= ago(Lookback)
| where ResultType == 0
| where AppDisplayName in~ ("AWS IAM Console", "Azure Portal", "Google Cloud Management")
| extend IPAddress = tostring(IPAddress), UserPrincipalName = tolower(UserPrincipalName)
| summarize FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated), IPCount=dcount(IPAddress), Locations=make_set(Location) by UserPrincipalName, AppDisplayName
| where IPCount > 3 or array_length(Locations) > 2;
let AWSAnomalousSTS = AWSCloudTrail
| where TimeGenerated >= ago(Lookback)
| where EventName in~ ("GetCallerIdentity", "CreateAccessKey", "CreateUser", "AttachUserPolicy")
| project TimeGenerated, EventName, SourceIPAddress, UserIdentityArn, UserIdentityAccountId, UserAgent
| where SourceIPAddress !startswith "10." and SourceIPAddress !startswith "172.16." and SourceIPAddress !startswith "192.168.";
AWSAnomalousSTS
| sort by TimeGenerated desc
Need to defang indicators or test triage logs?
Use our zero-telemetry client-side parser to extract, defang & format indicators.
Open SOC Defanger Workbench
Target Log Sources & Tables
SigninLogs

Ensure telemetry connector is actively ingesting this table into your Sentinel workspace or Defender XDR.

False Positives & Tuning Guidance

Legitimate administrative software deployment scripts, authorized security testing, or system maintenance tasks.

Source Incident Analysis

543,000+ Valid Secrets Exposed on GitHub in Massive Leak Study

Disclosed: 2026-10-01

Read Attack Chain
DETECTION_ENGINEERING_FEEDBACK

Have tuning recommendations, encounter false positives in your environment, or want to contribute rule improvements?

Submit Feedback →