← All hunts high TLP:CLEAR

Abuse of Clean Hosting Infrastructure for Identity Attacks

An adversary uses trusted developer or cloud hosting platforms to bypass identity risk scoring, using legacy protocols (ROPC) or Device Code Flow to steal or replay session tokens.

Based on research by Huntress 2026-11-07 11 steps · 3 queries T1110.003 T1566 T1572

Brief

Why This Hunt Matters

Adversaries rent space on legitimate platforms like Railway and 1337 Services GmbH to host their attack infrastructure. In the article Adversary Infrastructure: Herd Immunity for Microsoft 365 (https://www.huntress.com/blog/itdr-adversary-infrastructure), Huntress explains how these clean IP ranges bypass automated risk scoring in Entra ID. Because these IPs belong to trusted developer services, they often carry a high reputation that evades standard blocklists. This hunt identifies that activity by looking for successful authentications that originate from these specific hosting clusters before the adversary can fully exploit a stolen session.

How the Hunt Flows

The hunt begins by querying the hb_auth_signin surface for successful logins originating from known malicious IP ranges. This scoping step provides the initial leads of which accounts and hosts might be compromised. The hunt filters for specific IP prefixes associated with documented hosting abuse to ensure the initial data set remains manageable for further enrichment.

Following the initial leads, the hunt moves into a parallel evidence-gathering phase. The first branch stacks authentication protocols to find rare IP addresses. The hunt targets IPs using ROPC or Device Code Flow against a small number of users. This helps an analyst distinguish between high-volume legitimate services and targeted adversary activity like password spraying or token theft. Many adversaries prefer these protocols because they often bypass modern MFA requirements or allow for easier automation.

Simultaneously, the second branch queries the hb_network_connection surface to find endpoint processes communicating with the same malicious IP ranges. The hunt uses the scope_hosts parameter to focus this search on the machines identified in the scoping phase. This step confirms whether a local process on a user's machine is actively interacting with the infrastructure used for the sign-in, which often points to an AiTM relay or a reverse proxy.

Finally, an analyst synthesizes these data points—successful logins, legacy protocol usage, and host-side network traffic—to reach a verdict. If the activity appears malicious, the analyst proceeds to revoke active sessions and force password resets. The hunt then directs the analyst to review hb_cloud_api_activity for signs of persistence, such as new inbox rules or updated MFA devices.

Blind Spots

This hunt requires Entra ID P1 or P2 licensing to ensure sign-in logs are available in the hb_auth_signin surface. If logging is disabled, the hunt will not see the initial access. Additionally, the adversary may rotate to new hosting infrastructure not yet included in the malicious_ranges parameter. Because the hunt relies on known IP clusters, it will miss attackers who use smaller, less documented hosting providers or compromised residential IPs.

Steps

  1. Sign-ins from malicious hosting ranges

    Query · scoping

    Identify initial leads by finding successful sign-ins originating from documented adversary infrastructure.

    reads hb_auth_signinsql
    SELECT time, actor_user_name, src_endpoint_ip, auth_protocol, auth_requirement, status_code, device_hostname FROM hb_auth_signin WHERE EXISTS (SELECT 1 FROM json_each('["' || replace('{{malicious_ranges}}', ',', '","') || '"]') WHERE src_endpoint_ip LIKE value || '%') AND status_id = 1 AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. Successful sign-in logs originating from the German hosting or Railway ranges. None means no confirmed logins from these specific clusters.

  2. Assess Infrastructure Lead

    Agent triage

    Determine if the sign-ins from these IP ranges are suspicious enough to warrant a broader search.

  3. Is Lead Worthy?

    Decision

    Decide whether to open expensive queries based on the confirmed lead.

  4. Prevalence of Legacy and MFA-Skipping Protocols

    Query · detection candidate

    Detect rare IPs that use ROPC or DeviceCode flow.

    reads hb_auth_signinsql
    SELECT auth_protocol, src_endpoint_ip, COUNT(DISTINCT actor_user_name) AS user_count, COUNT(*) AS login_attempts FROM hb_auth_signin WHERE instr(',' || '{{legacy_protocols}}' || ',', ',' || auth_protocol || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY auth_protocol, src_endpoint_ip HAVING user_count <= 3 ORDER BY user_count ASC, login_attempts DESC

    What a hit looks like. Rare IP addresses that use ROPC or DeviceCode flow against a limited number of users.

  5. Endpoint connections to malicious infrastructure

    Query · enrichment

    Corroborate the cloud-side sign-in by finding if any process on the identified hosts is talking to the same IP ranges.

    reads hb_network_connectionsql
    SELECT device_hostname, process_name, dst_endpoint_ip, dst_endpoint_port, time FROM hb_network_connection WHERE EXISTS (SELECT 1 FROM json_each('["' || replace('{{malicious_ranges}}', ',', '","') || '"]') WHERE dst_endpoint_ip LIKE value || '%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. Process-to-IP connections on the beachhead hosts that match the documented relay infrastructure.

  6. Triage Infrastructure Abuse

    Agent triage

    Synthesize sign-in leads, protocol prevalence, and network connections into a final verdict.

  7. Compromise Confirmed?

    Decision

    Route the hunt to containment if a malicious verdict is reached.

  8. Revoke Sessions and Force Password Change

    Response action

    Immediately invalidate the adversary's access tokens and prevent further sign-ins.

  9. Remediation and Post-Compromise Review

    Analyst task

    Review follow-on activity using active voice instructions.

  10. Close Out Hunt

    Analyst task

    Document result and update parameters for the next run.

Coverage

Scenario coverage

StageCoveredHow, or why not
Device Code Phishing with AI Lures
T1566
Yes identify-infrastructure-signins, stack-auth-protocols
Legacy Auth Password Spraying
T1110.003
Yes identify-infrastructure-signins, stack-auth-protocols
Token Replay via AiTM Relays
T1572
Yes correlate-host-connections, analyst-review

Blind spots

  • Needs hb_auth_signin or Entra ID P1 logging. A negative result may be a false negative if the tenant lacks the licensing (Entra P1/P2) or configuration to log these events. It would answer Are we seeing sign-ins from these ranges in tenants where audit logging is disabled?.
  • Needs updated malicious_ranges. The hunt depends on the quality of the IP list; as adversaries rotate infrastructure, this durable list will become obsolete. It would answer Has the attacker moved to a new developer cloud range not in our list?.

Parameters & data

Parameters

ParameterTypeDefaultWhat it is
legacy_protocolslist[string]ROPC, DeviceCode, IMAP4, POP3Auth protocols or flows used to bypass MFA or modern risk scoring.
lookback_daysnumber14Days of history to examine.
malicious_rangeslist[ip]193.26.115., 185.199.108., 185.199.109., 185.199.110., 185.199.111.Known malicious IP prefixes associated with documented hosting abuse.
scope_hostslist[host]—Optional: Paste hostnames from the lead query to focus the enrichment steps.

Telemetry

SourceCategoryTelemetry
Identity / sign-in telemetryidentityidentity
Network telemetrynetworknetwork

Source

Download hunt.md Definition (JSON) An open hunt.md file; it runs anywhere that reads the format.
---
analysis: A simple detection rule on these IP ranges would produce too many false
  positives for legitimate developers. We use a gated flow to first confirm successful
  logins, then stack protocols for rarity, and finally correlate with host-side connections
  to differentiate between a developer and an adversary.
blind_spots:
- id: no-auth-logging
  question: Are we seeing sign-ins from these ranges in tenants where audit logging
    is disabled?
  requires: hb_auth_signin or Entra ID P1 logging
  risk: A negative result may be a false negative if the tenant lacks the licensing
    (Entra P1/P2) or configuration to log these events.
- id: ip-rotation-drift
  question: Has the attacker moved to a new developer cloud range not in our list?
  requires: updated malicious_ranges
  risk: The hunt depends on the quality of the IP list; as adversaries rotate infrastructure,
    this durable list will become obsolete.
  stage: c2-infrastructure-token-replay
coverage:
- stage: initial-access-device-code-phishing
  status: covered
  steps:
  - identify-infrastructure-signins
  - stack-auth-protocols
- stage: credential-access-ropc-password-spray
  status: covered
  steps:
  - identify-infrastructure-signins
  - stack-auth-protocols
- stage: c2-infrastructure-token-replay
  status: covered
  steps:
  - correlate-host-connections
  - analyst-review
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: promote-to-detection
  justification: Adversaries scale identity attacks by renting legitimate infrastructure
    that standard risk scoring cannot distinguish from normal traffic. This hunt provides
    the manual oversight needed to identify these clusters across a fleet.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An adversary uses trusted developer or cloud hosting platforms to bypass
  identity risk scoring, using legacy protocols (ROPC) or Device Code Flow to steal
  or replay session tokens.
labels:
- hunt
- attack.t1110.003
- attack.t1566
- attack.t1572
- command and control
- credential access
- initial access
name: Abuse of Clean Hosting Infrastructure for Identity Attacks
parameters:
  legacy_protocols:
    default:
    - ROPC
    - DeviceCode
    - IMAP4
    - POP3
    description: Auth protocols or flows used to bypass MFA or modern risk scoring.
    type: list[string]
  lookback_days:
    default: '14'
    description: Days of history to examine.
    type: number
  malicious_ranges:
    default:
    - 193.26.115.
    - 185.199.108.
    - 185.199.109.
    - 185.199.110.
    - 185.199.111.
    description: Known malicious IP prefixes associated with documented hosting abuse.
    from:
      kind: article
      observed: '2026-11-05'
      ref: huntress-itdr-infrastructure
    type: list[ip]
  scope_hosts:
    default: []
    description: 'Optional: Paste hostnames from the lead query to focus the enrichment
      steps.'
    type: list[host]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://www.huntress.com/blog/itdr-adversary-infrastructure
    gates:
    - dry-run
    - lint
    model: hb_google/gemini-3-flash-preview
rationale: The lead query focuses on successful logins from documented hosting clusters.
  If the initial lead results in high volume, use the scope_hosts parameter to focus
  the network connection correlate step on the most active beachhead machines.
references:
- name: "Huntress \u2014 Adversary Infrastructure: Herd Immunity for Microsoft 365"
  url: https://www.huntress.com/blog/itdr-adversary-infrastructure
related:
- hunt: mfa-bypass-device-code-flow
  reason: This hunt focuses on the infrastructure origin (hosting providers), while
    the sibling hunt focuses on the protocol mechanics across all IP ranges.
  relation: out-of-scope-alternative
scenario:
  stages:
  - name: Device Code Phishing with AI Lures
    observables:
    - AI-tailored phishing lures
    - Railway developer cloud IP ranges
    - Device code flow authentication attempts
    slug: initial-access-device-code-phishing
    tactic: initial-access
    techniques:
    - T1566
  - name: Legacy Auth Password Spraying
    observables:
    - ROPC (Resource Owner Password Credentials) legacy auth flow
    - 81 million login attempts from specific IPv6 ranges
    - MFA-skipping authentication patterns
    slug: credential-access-ropc-password-spray
    tactic: credential-access
    techniques:
    - T1110.003
  - name: Token Replay via AiTM Relays
    observables:
    - 193.26.115.0/24 (1337 Services GmbH)
    - German hosting provider IP ranges
    - AiTM (Adversary-in-the-Middle) relays
    - Railway-based token relays
    slug: c2-infrastructure-token-replay
    tactic: command-and-control
    techniques:
    - T1572
  summary: Attackers utilize clean hosting infrastructure and AI-generated phishing
    lures to conduct high-volume identity attacks against Microsoft 365 tenants. These
    campaigns involve device-code phishing and password spraying via legacy ROPC flows
    to bypass MFA and harvest session tokens for replay through German hosting relays.
severity: high
targets:
  analyst:
    name: Tier-2 analyst
    role: analyst
  hunter:
    agent: true
    name: Hunt agent
  identity:
    category: identity
    name: Identity / sign-in telemetry
    telemetry:
    - identity
  network:
    category: network
    name: Network telemetry
    telemetry:
    - network
tlp: clear
type: investigation
---


# Abuse of Clean Hosting Infrastructure for Identity Attacks

This hunt targets the use of clean cloud infrastructure, specifically Railway and 1337 Services GmbH ranges, to host AiTM relays and execute password sprays. Attackers use these platforms because they have high IP reputation, causing standard Entra ID risk scoring to ignore them. The hunt starts by identifying successful sign-ins from these known malicious hosting ranges, then fans out to analyze the prevalence of specific auth protocols (ROPC, Device Code Flow) and corroborates with endpoint-side network connections to the same infrastructure.

## identify-infrastructure-signins
<!-- Sign-ins from malicious hosting ranges -->
Identify initial leads by finding successful sign-ins originating from documented adversary infrastructure.

```sqlite target=identity role=scoping params=(lookback_days=lookback_days, malicious_ranges=malicious_ranges)
~~~yaml
expected: Successful sign-in logs originating from the German hosting or Railway ranges.
  None means no confirmed logins from these specific clusters.
reads:
- time
- actor_user_name
- src_endpoint_ip
- auth_protocol
- auth_requirement
- status_code
- device_hostname
- status_id
silence: not_evidence_of_absence
source: hb_auth_signin
verified: dry-run
verified_at: '2026-11-07'
~~~
SELECT time, actor_user_name, src_endpoint_ip, auth_protocol, auth_requirement, status_code, device_hostname FROM hb_auth_signin WHERE EXISTS (SELECT 1 FROM json_each('["' || replace('{{malicious_ranges}}', ',', '","') || '"]') WHERE src_endpoint_ip LIKE value || '%') AND status_id = 1 AND time >= datetime('now', '-{{lookback_days}} days')
```

## assess-infrastructure-lead
<!-- Assess Infrastructure Lead -->
```agent target=hunter
cite: required
context:
- identify-infrastructure-signins
max_iterations: 3
objective: Review the sign-ins from the documented malicious ranges and confirm which
  accounts and hosts are involved.
success_criteria: A verdict confirming the presence of hits from the targeted infrastructure.
tools:
- identity
- network
```

## is-lead-worthy
<!-- Is Lead Worthy? -->
if~: "The first-read agent confirmed successful sign-ins from the malicious infrastructure prefixes." (confidence: high, judge=hunter)
then: → fan-out-telemetry
indeterminate: → analyst-review
unavailable: → analyst-review (blind_spot: no-auth-logging)
else: → close-out

## fan-out-telemetry
<!-- Fan out to Protocol and Network Evidence -->
parallel:
- → stack-auth-protocols
- → correlate-host-connections
join: → triage-infrastructure-abuse

## stack-auth-protocols
<!-- Prevalence of Legacy and MFA-Skipping Protocols -->
Detect rare IPs that use ROPC or DeviceCode flow.

```sqlite target=identity role=detection-candidate params=(lookback_days=lookback_days, legacy_protocols=legacy_protocols)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: Rare IP addresses that use ROPC or DeviceCode flow against a limited number
  of users.
prevalence:
  by: actor_user_name
  key:
  - auth_protocol
  - src_endpoint_ip
  rare_below: 3
reads:
- auth_protocol
- src_endpoint_ip
- actor_user_name
- time
silence: not_evidence_of_absence
source: hb_auth_signin
verified: dry-run
verified_at: '2026-11-07'
~~~
SELECT auth_protocol, src_endpoint_ip, COUNT(DISTINCT actor_user_name) AS user_count, COUNT(*) AS login_attempts FROM hb_auth_signin WHERE instr(',' || '{{legacy_protocols}}' || ',', ',' || auth_protocol || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY auth_protocol, src_endpoint_ip HAVING user_count <= 3 ORDER BY user_count ASC, login_attempts DESC
```

## correlate-host-connections
<!-- Endpoint connections to malicious infrastructure -->
Corroborate the cloud-side sign-in by finding if any process on the identified hosts is talking to the same IP ranges.

```sqlite target=network role=enrichment params=(lookback_days=lookback_days, malicious_ranges=malicious_ranges, scope_hosts=scope_hosts)
~~~yaml
expected: Process-to-IP connections on the beachhead hosts that match the documented
  relay infrastructure.
reads:
- device_hostname
- process_name
- dst_endpoint_ip
- dst_endpoint_port
- time
silence: not_evidence_of_absence
source: hb_network_connection
verified: dry-run
verified_at: '2026-11-07'
~~~
SELECT device_hostname, process_name, dst_endpoint_ip, dst_endpoint_port, time FROM hb_network_connection WHERE EXISTS (SELECT 1 FROM json_each('["' || replace('{{malicious_ranges}}', ',', '","') || '"]') WHERE dst_endpoint_ip LIKE value || '%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## triage-infrastructure-abuse
<!-- Triage Infrastructure Abuse -->
```agent target=hunter
cite: required
context:
- assess-infrastructure-lead
- stack-auth-protocols
- correlate-host-connections
max_iterations: 6
objective: Determine if the sign-ins from clean infrastructure combined with rare
  protocol use and host-side connections indicate a confirmed compromise.
success_criteria: A verdict of malicious | suspicious | benign per host or user.
tools:
- identity
- network
```

## compromise-confirmed
<!-- Compromise Confirmed? -->
if~: "The triage verdict is malicious for at least one account." (confidence: high, judge=hunter)
then: → revoke-sessions
indeterminate: → analyst-review
unavailable: → analyst-review (blind_spot: no-auth-logging)
else: → close-out

## revoke-sessions
<!-- Revoke Sessions and Force Password Change -->
```action target=identity
~~~yaml
approval: required
~~~
Revoke all active sessions for the identified user accounts and force a password reset immediately.
```
→ analyst-review

## analyst-review
<!-- Remediation and Post-Compromise Review -->
```manual target=analyst
Inspect hb_cloud_api_activity for the compromised users. ensure the adversary did not establish persistence by looking for New-InboxRule or Update-MfaDevice. identify calls the adversary made after the initial sign-in from the malicious range.
```
→ close-out

## close-out
<!-- Close Out Hunt -->
```manual target=analyst
Record whether the malicious_ranges parameter needs updating based on current Huntress research. If confirmed malicious, ensure the team adds the ranges to the permanent blocklist.
```
→ end

Run it

Take this hunt into your environment.

Open it in Huntbase to run every step against your own connections, with Scout weighing the evidence and your analysts in command. Or take the open hunt.md file anywhere that reads the format.

Machine-drafted by huntbase-hunt-generation using hb_google/gemini-3-flash-preview, gated by dry-run, lint, then reviewed by a person.

Locked pack

Sign up to unlock

Pack contents are available to Huntbase users.