Google Workspace User Login with Unusual ASN
Description
Detects the first time a Google Workspace user successfully signs in from a given source ASN within a 14-day historical window. Most users have a stable set of egress ASNs (home ISP, corporate VPN, mobile carrier). A new ASN for a user is a meaningful anomaly as it surfaces ISP changes and travel, but also catches AiTM phishing-kit relays whose egress ASN was never previously associated with the user.
Query · kuery
data_stream.dataset: ("google_workspace.login" or "google_workspace.token") and
event.action: ("login_success" or "authorize") and
source.as.number: * and
user.email: *
Investigation fields
Pivot points the source recommends for triage.
@timestampuser.emailuser.namesource.ipsource.as.numbersource.as.organization.namesource.geo.country_namesource.geo.region_namegoogle_workspace.login.typegoogle_workspace.login.challenge_method
Implementation guide
Important Information Regarding Google Workspace Event Lag Times
- Google Workspace Reports API ingestion lag commonly runs in the 30-minute to 3-hour range. This rule's 130-minute lookback gives partial coverage but will miss events delayed beyond that envelope.
- See https://support.google.com/a/answer/7061566 for Google's published guidance on event availability.
- Check your integration's Login lag time to ensure it is configured to meet the needs of this rule.
Known false positives
- Legitimate first-time use of a new network: ISP change, new VPN provider, travel to a region using a different mobile carrier, new home office.
- Carrier-grade NAT or load-balanced corporate egress that occasionally routes through alternate ASNs.
Analyst notes
Investigating Google Workspace User Login with Unusual ASN
This rule emits when a user signs in successfully from an ASN that has not been observed for that user in the prior 14 days. Most legitimate users cluster around a small number of egress ASNs (corporate VPN, home ISP, primary mobile carrier). New ASNs are not all malicious, but new ASNs that match hosting providers, anonymization networks, or geographies inconsistent with the user's profile are high-fidelity suspicious.
Possible investigation steps
- Inspect
source.as.organization.nameandsource.as.number. Categorize: residential ISP (low concern absent other indicators), corporate VPN (validate against tenant baseline), mobile carrier (validate by region), hosting provider / VPS (Clouvider, Host Telecom, Alibaba, OVH, M247, DigitalOcean, Vultr) - high concern for interactive sign-ins. - Inspect
source.geo.country_nameandsource.geo.region_name. New geo + known travel is fine. New geo + unexpected travel needs user confirmation. - Pull the user's full
google_workspace.loginhistory across the lookback. Is this a one-off sign-in or sustained activity from the new ASN? - Cross-reference
logs-google_workspace.tokenfor anyevent.action: "authorize"events from the sameuser.emailimmediately following the sign-in. An OAuth grant minted from the new ASN within seconds of sign-in is the AiTM kit signature. - Cross-reference
logs-google_workspace.devicefor anyDEVICE_REGISTER_UNREGISTER_EVENTwithaccount_state: "REGISTERED"from the same user near the same time. New device + new ASN is a stronger compromise signal than either alone. - Confirm with the user whether they signed in from a new network intentionally.
False positive analysis
- Users on rotating VPN exits, hotspot sharing, or coffee-shop Wi-Fi will produce new ASNs legitimately.
- Mobile users in unfamiliar regions (travel, conference attendance) will geo-resolve to new ASNs.
- Engineering teams using cloud workstations (Cloud Workstations, Codespaces, etc.) will egress through hosting ASNs even for legitimate sign-ins. Tune by allowlisting your tenant's known cloud-workstation egress.
- For high-noise tenants, expand
history_window_startto 14 days to reduce false-positive rate at the cost of slower-to-fire detection for genuinely new ASNs.
Response and remediation
- If the new ASN is a hosting provider and the user has not knowingly used such a network: treat as likely AiTM. Suspend user, revoke OAuth tokens, reset password, clear recovery info, sign out all sessions.
- If the new ASN is benign (verified ISP change, travel, new VPN): add to the user's baseline. Consider broader hardening (require MFA re-verification on new-network sign-in via Workspace Context-Aware Access).