|
| 1 | +# Azure Entra Authentication Attempts from Abused Hosting Service Providers |
| 2 | + |
| 3 | +--- |
| 4 | + |
| 5 | +## Metadata |
| 6 | + |
| 7 | +- **Author:** Elastic |
| 8 | +- **Description:** This hunting query gathers evidence of Azure Entra authentication attempts from hosting service providers that are often abused by adversaries. By identifying authentication attempts from these sources, security teams can detect potential unauthorized access or malicious activities within their Azure environment. |
| 9 | + |
| 10 | +- **UUID:** `d27f1da8-eec6-11ef-983a-f661ea17fbce` |
| 11 | +- **Integration:** [azure](https://docs.elastic.co/integrations/azure) |
| 12 | +- **Language:** `[ES|QL]` |
| 13 | +- **Source File:** [Azure Entra Authentication Attempts from Abused Hosting Service Providers](../queries/entra_authentication_attempts_from_abused_hosting_service_providers.toml) |
| 14 | + |
| 15 | +## Query |
| 16 | + |
| 17 | +```sql |
| 18 | +FROM logs-azure.signinlogs-* |
| 19 | + |
| 20 | +// query Azure Entra Sign-in logs |
| 21 | +| WHERE @timestamp > now() - 14 day |
| 22 | +| WHERE |
| 23 | + event.dataset in ("azure.signinlogs") and |
| 24 | + |
| 25 | + // filter for authentication events |
| 26 | + event.category == "authentication" and |
| 27 | + |
| 28 | + // filter for specific ASN organizations that are often abused |
| 29 | + source.as.organization.name in ( |
| 30 | + "DigitalOcean", "Linode", "Vultr", "Hetzner", "OVH", |
| 31 | + "Contabo", "Leaseweb", "G-Core Labs", "Scaleway", "Kamatera", |
| 32 | + "Shinjiru", "M247", "Packet Host", "InterServer", "DataPacket", |
| 33 | + "Choopa", "Path Network", "DediPath", "Maxided", "Quasi Networks", |
| 34 | + "FlokiNET", "Njalla", "AbeloHost", "Inferno Solutions", "Hostinger", |
| 35 | + "Hostwinds", "1&1 IONOS", "DreamHost", "A2 Hosting", "Bluehost", |
| 36 | + "Namecheap Hosting", "FastComet", "InMotion Hosting", "SiteGround", "GreenGeeks", |
| 37 | + "Liquid Web", "Hurricane Electric", "Ubiquity Hosting", "Snel.com", "Coresite", |
| 38 | + "Eonix", "WebNX", "SharkTech", "Hivelocity", "Zenlayer", |
| 39 | + "RapidSeedbox", "SeFlow", "Nexeon Technologies", "NextArray", "Zare", |
| 40 | + "Clouvider", "TimeWeb", "YISP", "StackPath", "LuxVPS", |
| 41 | + "Terrahost", "IP Volume", "RackNerd", "ServerMania", "HostEurope", |
| 42 | + "HostHatch", "HostUS", "Cloudsigma", "QuadraNet", "CIV Host", |
| 43 | + "Swiftway", "King Servers", "BeeHost", "Webzilla", "Flokinet", |
| 44 | + "Alexhost", "DDoS-Guard", "StormWall", "Yokohama Networks", "DataGroup", |
| 45 | + "GSL Networks", "MyLoc", "Hostlife", "Reprise Hosting", "GTT Communications", |
| 46 | + "Telia", "Cogent Communications", "NForce", "Ecatel", "Novogara", |
| 47 | + "CyberBunker", "DarkFiber", "Exoscale", "QHoster", "ServDiscount", |
| 48 | + "Krypt", "Wowrack", "XLHost", "OVHCloud", "Privex", |
| 49 | + "GreencloudVPS", "RamNode", "BuyVM", "LiteServer", "Host1Plus", |
| 50 | + "EdgeUno", "CloudSouth", "IOFlood", "Hostry", "MivoCloud", |
| 51 | + "CloudCone", "SwiftNode", "Flaunt7", "Infinitie Networks", "ServerHub", |
| 52 | + "Verpex Hosting", "W3Space", "HostPapa", "Storm Internet", "WP Engine", |
| 53 | + "Kinsta", "Fly.io", "Edgecast", "RocketNode", "CloudAtCost", |
| 54 | + "Gullo's Hosting", "Serverion", "XHostFire", "Interserver", "DediServe", |
| 55 | + "HostRound", "VPSServer", "HostMantis", "RapidSwitch", "Tiggee LLC", |
| 56 | + "LogicWeb", "VPSCheap", "Versaweb", "SecureDragon", "ServerAstra", |
| 57 | + "HostNeverDie", "CloudSigma", "IONOS Cloud", "StackClash", "ProtonVPN", |
| 58 | + "NordVPN", "Mullvad VPN", "ExpressVPN", "Surfshark", "Private Internet Access", |
| 59 | + "TorGuard", "VyprVPN", "Windscribe VPN", "iVPN", "Perfect Privacy", |
| 60 | + "Astrill VPN", "TunnelBear", "CyberGhost VPN", "PureVPN", "Hotspot Shield", |
| 61 | + "StrongVPN", "F-Secure VPN", "IVPN", "ZoogVPN", "SwitchVPN", |
| 62 | + "AirVPN", "Buffered VPN", "SecureVPN", "RiseupVPN", "Betternet", |
| 63 | + "Trust.Zone VPN", "OneVPN", "VeePN", "Speedify VPN", "VPN Unlimited", |
| 64 | + "Anonine VPN", "X-VPN", "Hidemyass VPN", "ProXPN", "VPNArea", |
| 65 | + "AceVPN", "IPVanish", "Bitmask VPN", "BolehVPN", "AnonVPN", |
| 66 | + "Librem One VPN", "BlackVPN", "Cloudflare Warp VPN", "Torguard VPN", "VPN.ht" |
| 67 | + ) |
| 68 | + |
| 69 | +// aggregate authentication attempts by tenant, user principal name, authentication protocol, category, ASN organization name, and source address |
| 70 | +| STATS asn_count = count(*) by |
| 71 | + azure.tenant_id, |
| 72 | + azure.signinlogs.properties.user_principal_name, |
| 73 | + azure.signinlogs.properties.authentication_protocol, |
| 74 | + azure.signinlogs.category, |
| 75 | + source.as.organization.name, |
| 76 | + source.address |
| 77 | +``` |
| 78 | + |
| 79 | +## Notes |
| 80 | + |
| 81 | +- Review `azure.signinlogs.properties.authentication_protocol` to determine the authentication method used. |
| 82 | +- Device Code Flow authentication is particularly suspicious for non-kiosk, non-IoT devices. |
| 83 | +- Analyze `source.as.organization.name` to identify if the authentication originated from a known hosting provider, VPN, or anonymization service you are not expecting |
| 84 | +- Investigate `source.address` to determine if the IP address has been previously flagged for suspicious activity. |
| 85 | +- Pivot on `azure.signinlogs.properties.user_principal_name` to check for additional authentication attempts from different IPs, ASNs, or unusual geolocations. |
| 86 | +- Correlate findings with `azure.signinlogs.properties.authentication_processing_details` to check if legacy protocols, token replay, or bypass mechanisms were involved. |
| 87 | +- Look for associated Conditional Access policy decisions in `azure.signinlogs.properties.applied_conditional_access_policies` to determine if the authentication attempt was blocked or allowed. |
| 88 | +- Check `azure.signinlogs.properties.device_detail.browser` to see if the user agent is consistent with expected authentication patterns. |
| 89 | +- If authentication was successful, investigate any subsequent suspicious activity linked to the same user session. |
| 90 | + |
| 91 | +## MITRE ATT&CK Techniques |
| 92 | + |
| 93 | +- [T1078.004](https://attack.mitre.org/techniques/T1078/004) |
| 94 | + |
| 95 | +## References |
| 96 | + |
| 97 | +- https://www.volexity.com/blog/2025/02/13/multiple-russian-threat-actors-targeting-microsoft-device-code-authentication/ |
| 98 | +- https://www.blackhillsinfosec.com/dynamic-device-code-phishing/ |
| 99 | + |
| 100 | +## License |
| 101 | + |
| 102 | +- `Elastic License v2` |
0 commit comments