← All hunts medium TLP:CLEAR Part 1 of 2

Identity and Cloud Pivot from Web Exploits

An adversary has exploited an internet-facing web server to establish a beachhead and is now manipulating cloud or SaaS identities to persist and reconfigure the environment.

Based on research by Unit 42 2026-09-20 11 steps · 3 queries T1078 T1098 T1190

Brief

Why look for the pivot?

In the recent Unit 42 article, Inside the Modern SOC: Defending the Cross-Environment Pivot (https://unit42.paloaltonetworks.com/soc-cross-environment-pivot/), researchers highlight a critical gap in many security programs: the transition from an on-premises web exploit to a cloud-based identity compromise. While many detections focus on a single CVE or an isolated unusual login, identifying the link between them is where hunters find the real threat. This hunt provides a structured approach to identifying that specific moment when an adversary moves from a compromised web server to your management console.

Scoping the vulnerability surface

The hunt begins by identifying the most likely entry points. We use the vulnerability finding surface to list every host running web-facing or gateway services with high-severity vulnerabilities. The first query specifically targets software packages like Apache, Nginx, WordPress, Citrix, and Fortinet. We are looking for exposures that give an attacker the foothold needed to begin lateral movement using techniques like T1190.

Assessing exploit risk

Not every vulnerability represents an immediate threat. To reduce noise, an analyst or an automated agent reviews the scoping leads to determine if any identified CVEs are on the CISA KEV list or have public exploit code available. This step acts as a gate for the rest of the hunt. If we find no high-risk vulnerable hosts, the investigation terminates, saving the cost of running broad identity and network queries across the entire estate. This ensures the hunt remains performant even in large environments.

Identifying identity and network pivots

Once the hunt identifies high-risk hosts, it initiates two parallel investigations to find evidence of T1078 (Valid Accounts) and T1098 (Account Manipulation). The first query baselines administrative sign-ins to cloud consoles like AWS, Azure, and other management portals. It looks back 14 days and flags any login that is rare for the specific user or protocol, specifically looking for counts below five. Simultaneously, the second query inspects outbound network connections originating from the vulnerable hosts. We look for scripting interpreters like Python, curl, or PowerShell making connections to external web endpoints. This combination of rare identity activity and suspicious host-level networking provides the evidence needed to confirm a pivot.

Correlating the attack path

An analyst performs the final triage by connecting the timing of the vulnerability leads with the suspicious logins and outbound traffic. We ask if the rare cloud login occurred shortly after the vulnerable host initiated an outbound connection. If these events align, the analyst confirms a cross-environment pivot. The hunt then directs the user to revoke all active sessions for the compromised account and initiate patching for the beachhead host. This moves the workflow from a simple observation to a concrete response.

What this hunt cannot see

This hunt has two primary limitations. First, it depends on the accuracy and frequency of your vulnerability scanning. If a host was patched recently but the scan data is stale, the hunt may prioritize the wrong targets. Second, the hunt can only see identity activity captured in your central logging. If an adversary accesses a SaaS portal or a cloud region that does not report to your telemetry provider, the identity pivot remains invisible.

In this series

Steps

  1. Identify vulnerable web and gateway services

    Query · scoping

    Locate devices running web-facing or gateway services with critical vulnerabilities that serve as likely initial access points.

    reads hb_vulnerability_findingsql
    SELECT device_uid, cve_uid, severity, affected_package_name, affected_package_version, is_kev, is_exploit_available FROM hb_vulnerability_finding WHERE resource_type = 'device' AND severity_id >= 4 AND (LOWER(affected_package_name) LIKE '%apache%' OR LOWER(affected_package_name) LIKE '%nginx%' OR LOWER(affected_package_name) LIKE '%wordpress%' OR LOWER(affected_package_name) LIKE '%citrix%' OR LOWER(affected_package_name) LIKE '%fortinet%')

    What a hit looks like. A list of hosts with high-severity vulnerabilities in web-facing software. Silence means no critical exposures were detected in the current inventory.

  2. Assess exploit risk for scoping

    Agent triage

    Evaluate whether the identified vulnerabilities are actively being exploited (KEV) or have public exploit code available.

  3. Gate: Proceed with pivot hunt?

    Decision

    Stop the hunt if no high-risk web servers are identified, saving resources and reducing noise.

  4. Rare administrative logins to cloud consoles

    Query · baseline

    Identify administrative sign-ins to cloud management planes that are rare for the user or protocol.

    reads hb_auth_signinsql
    SELECT actor_user_name, dst_endpoint_name, auth_protocol, COUNT(*) as login_count, MIN(time) as first_login FROM hb_auth_signin WHERE status_id = 1 AND (LOWER(dst_endpoint_name) LIKE '%aws%' OR LOWER(dst_endpoint_name) LIKE '%azure%' OR LOWER(dst_endpoint_name) LIKE '%console%' OR LOWER(dst_endpoint_name) LIKE '%portal%') AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY actor_user_name, dst_endpoint_name, auth_protocol HAVING login_count <= 5

    What a hit looks like. A list of rare sign-ins to cloud management consoles. Silence means no unusual administrative logins were detected in the window.

  5. Outbound pivot traffic from vulnerable hosts

    Query · enrichment

    Find suspicious outbound connections from the specifically scoped vulnerable hosts to potential identity or C2 endpoints.

    reads hb_network_connectionsql
    SELECT device_hostname, process_name, dst_endpoint_ip, dst_endpoint_port, time FROM hb_network_connection WHERE direction = 'outbound' AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') AND dst_endpoint_port IN (443, 80) AND (LOWER(process_name) LIKE '%python%' OR LOWER(process_name) LIKE '%curl%' OR LOWER(process_name) LIKE '%powershell%') ORDER BY time DESC

    What a hit looks like. Outbound web traffic originating from vulnerable hosts via shell or scripting interpreters. Silence suggests no such automated pivot occurred.

  6. Correlate exploit and pivot activity

    Agent triage

    Connect the timing of the vulnerability with the rare administrative logins and outbound traffic to confirm a cross-environment pivot.

  7. Route on pivot evidence

    Decision

    Action confirmed account compromises or route for manual analyst verification.

  8. Revoke compromised sessions

    Response action

    Stop the adversary's access to the cloud management plane by terminating the compromised user session.

  9. Verify and patch beachhead

    Analyst task

    Confirm the scope of the intrusion on the web server and ensure the vulnerability is remediated.

  10. Close out investigation

    Analyst task

    Document the findings of the hunt and record any negative results for baseline history.

Coverage

Scenario coverage

StageCoveredHow, or why not
Web Application Exploitation
T1190
Yes find-vulnerable-web-leads, evaluate-exploit-risk
SaaS and Identity Manipulation
T1098
Yes rare-administrative-logins
Cloud Environment Provisioning
T1078
Yes outbound-pivot-traffic, triage-cross-environment-pivot
Data Staging for Exfiltration
T1074
Out of scope Belongs to another part of the 'Inside the Modern SOC: Defending the Cross-Environment Pivot' series.
Exfiltration over Command and Control
T1041
Out of scope Belongs to another part of the 'Inside the Modern SOC: Defending the Cross-Environment Pivot' series.

Blind spots

  • Needs hb_vulnerability_finding collection frequency. A server may appear vulnerable but have been remediated since the last scan read, leading to false scoping leads. It would answer Was the server patched since the last scan was collected?.
  • Needs hb_auth_signin coverage for all identity providers. If a specific SaaS portal or cloud region is not reporting to the log aggregator, the pivot will remain invisible. It would answer Are all cloud console sign-ins captured in our telemetry?.

Parameters & data

Parameters

ParameterTypeDefaultWhat it is
lookback_daysnumber14Days of history to examine for authentication and network events.
scope_hostslist[host]Specific hostnames identified as vulnerable in the scoping step; leave empty to check the entire estate.

Telemetry

SourceCategoryTelemetry
Endpoint telemetry (hb_ surfaces)endpointendpoint
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 standard rule alerts on a specific CVE or a rare login. This hunt correlates
  the two: it asks if a rare administrative login occurred shortly after a known-vulnerable
  host initiated outbound network traffic to an identity provider.'
blind_spots:
- id: vulnerability-scan-staleness
  question: Was the server patched since the last scan was collected?
  requires: hb_vulnerability_finding collection frequency
  risk: A server may appear vulnerable but have been remediated since the last scan
    read, leading to false scoping leads.
  stage: initial-access-web-exploit
- id: incomplete-auth-logs
  question: Are all cloud console sign-ins captured in our telemetry?
  requires: hb_auth_signin coverage for all identity providers
  risk: If a specific SaaS portal or cloud region is not reporting to the log aggregator,
    the pivot will remain invisible.
  stage: identity-account-manipulation
coverage:
- stage: initial-access-web-exploit
  status: covered
  steps:
  - find-vulnerable-web-leads
  - evaluate-exploit-risk
- stage: identity-account-manipulation
  status: covered
  steps:
  - rare-administrative-logins
- stage: cloud-resource-reconfiguration
  status: covered
  steps:
  - outbound-pivot-traffic
  - triage-cross-environment-pivot
- reason: 'Belongs to another part of the ''Inside the Modern SOC: Defending the Cross-Environment
    Pivot'' series.'
  stage: file-system-data-staging
  status: out_of_scope
- reason: 'Belongs to another part of the ''Inside the Modern SOC: Defending the Cross-Environment
    Pivot'' series.'
  stage: network-exfiltration-c2
  status: out_of_scope
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: keep-as-periodic-hunt
  justification: Adversaries convert single-server exploits into environment-wide
    compromises by pivoting to identity systems. Detecting this transition is essential
    for stopping an intrusion before it reaches its final objective.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An adversary has exploited an internet-facing web server to establish
  a beachhead and is now manipulating cloud or SaaS identities to persist and reconfigure
  the environment.
labels:
- hunt
- attack.t1190
- attack.t1098
- attack.t1078
name: Identity and Cloud Pivot from Web Exploits
parameters:
  lookback_days:
    default: '14'
    description: Days of history to examine for authentication and network events.
    from:
      kind: article
      observed: '2026-09-17'
      ref: unit42-cross-environment-pivot
    type: number
  scope_hosts:
    default: []
    description: Specific hostnames identified as vulnerable in the scoping step;
      leave empty to check the entire estate.
    from:
      kind: manual
      observed: '2026-09-17'
      ref: analyst-scoping
    type: list[host]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://unit42.paloaltonetworks.com/soc-cross-environment-pivot/
    gates:
    - dry-run
    - lint
    model: hb_google/gemini-3-flash-preview
rationale: The lead query identifies all high-severity vulnerabilities in web services.
  Populating the scope_hosts parameter with the resulting hostnames allows the network
  query to filter specifically for traffic originating from those beachheads.
references:
- name: 'Inside the Modern SOC: Defending the Cross-Environment Pivot'
  url: https://unit42.paloaltonetworks.com/soc-cross-environment-pivot/
related:
- hunt: cloud-persistence-via-backdoor-user
  reason: This hunt identifies the pivot; a following hunt should check for new users
    or keys created during the compromised session.
  relation: follows
scenario:
  stages:
  - name: Web Application Exploitation
    observables:
    - exploitation of internet-facing web servers
    - malicious http requests to public-facing applications
    slug: initial-access-web-exploit
    tactic: initial-access
    techniques:
    - T1190
  - name: SaaS and Identity Manipulation
    observables:
    - unfamiliar applications requesting elevated permissions
    - permissions changes within SaaS applications
    - OAuth or SAML authentication anomalies
    slug: identity-account-manipulation
    tactic: privilege-escalation
    techniques:
    - T1098
  - name: Cloud Environment Provisioning
    observables:
    - provisioning of cloud resources outside of normal activity
    - reconfiguration of cloud assets by unusual administrator accounts
    slug: cloud-resource-reconfiguration
    tactic: persistence
    techniques:
    - T1078
  - name: Data Staging for Exfiltration
    observables:
    - staging of sensitive data in temporary or unusual directories
    - unexpected file creation patterns on endpoints
    slug: file-system-data-staging
    tactic: collection
    techniques:
    - T1074
  - name: Exfiltration over Command and Control
    observables:
    - new network connections between systems that rarely communicate
    - data transfer to unfamiliar external IP addresses
    - C2 communication over established protocols
    slug: network-exfiltration-c2
    tactic: exfiltration
    techniques:
    - T1041
  summary: Adversaries exploit internet-facing applications to gain a foothold before
    pivoting across cloud and SaaS environments using compromised credentials. The
    attack culminates in the staging of sensitive data on endpoints and exfiltration
    via command-and-control channels.
series:
  index: 1
  slug: inside-the-modern-soc-defending-the-cross-environment-pivot
  title: 'Inside the Modern SOC: Defending the Cross-Environment Pivot'
  total: 2
severity: medium
targets:
  analyst:
    name: Tier-2 analyst
    role: analyst
  endpoint:
    category: endpoint
    name: Endpoint telemetry (hb_ surfaces)
    telemetry:
    - endpoint
  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
---


# Identity and Cloud Pivot from Web Exploits

This hunt identifies the transition from external exploitation to cross-environment identity theft. It begins by identifying web servers with critical vulnerabilities and uses those findings as a gate to inspect authentication anomalies and outbound network activity. The hunt specifically looks for rare administrative logins and outbound traffic from vulnerable hosts to identity endpoints, correlating the host-level exposure with cloud-level account manipulation.

## find-vulnerable-web-leads
<!-- Identify vulnerable web and gateway services -->
Locate devices running web-facing or gateway services with critical vulnerabilities that serve as likely initial access points.

```sqlite target=endpoint role=scoping
~~~yaml
expected: A list of hosts with high-severity vulnerabilities in web-facing software.
  Silence means no critical exposures were detected in the current inventory.
reads:
- device_uid
- cve_uid
- severity
- affected_package_name
- is_kev
silence: not_evidence_of_absence
source: hb_vulnerability_finding
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_uid, cve_uid, severity, affected_package_name, affected_package_version, is_kev, is_exploit_available FROM hb_vulnerability_finding WHERE resource_type = 'device' AND severity_id >= 4 AND (LOWER(affected_package_name) LIKE '%apache%' OR LOWER(affected_package_name) LIKE '%nginx%' OR LOWER(affected_package_name) LIKE '%wordpress%' OR LOWER(affected_package_name) LIKE '%citrix%' OR LOWER(affected_package_name) LIKE '%fortinet%')
```

## evaluate-exploit-risk
<!-- Assess exploit risk for scoping -->
```agent target=hunter
cite: required
context:
- find-vulnerable-web-leads
max_iterations: 3
objective: Review the vulnerabilities in find-vulnerable-web-leads. Determine if any
  hosts represent a high risk of current exploitation based on KEV status and severity.
success_criteria: A verdict on whether to proceed with expensive queries based on
  the risk of beachhead establishment.
tools:
- endpoint
- identity
- network
```

## gate-on-risk
<!-- Gate: Proceed with pivot hunt? -->
if~: "the evaluate-exploit-risk verdict identifies at least one high-risk vulnerable host" (confidence: high, judge=hunter)
then: → parallel-pivot-investigation
indeterminate: → close-out-investigation
unavailable: → close-out-investigation (blind_spot: vulnerability-scan-staleness)
else: → close-out-investigation

## parallel-pivot-investigation
<!-- Investigate identity and network pivots -->
parallel:
- → rare-administrative-logins
- → outbound-pivot-traffic
join: → triage-cross-environment-pivot

## rare-administrative-logins
<!-- Rare administrative logins to cloud consoles -->
Identify administrative sign-ins to cloud management planes that are rare for the user or protocol.

```sqlite target=identity role=baseline params=(lookback_days=lookback_days)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: A list of rare sign-ins to cloud management consoles. Silence means no unusual
  administrative logins were detected in the window.
prevalence:
  by: actor_user_name
  key:
  - actor_user_name
  - dst_endpoint_name
  rare_below: 5
reads:
- actor_user_name
- dst_endpoint_name
- auth_protocol
- time
silence: not_evidence_of_absence
source: hb_auth_signin
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT actor_user_name, dst_endpoint_name, auth_protocol, COUNT(*) as login_count, MIN(time) as first_login FROM hb_auth_signin WHERE status_id = 1 AND (LOWER(dst_endpoint_name) LIKE '%aws%' OR LOWER(dst_endpoint_name) LIKE '%azure%' OR LOWER(dst_endpoint_name) LIKE '%console%' OR LOWER(dst_endpoint_name) LIKE '%portal%') AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY actor_user_name, dst_endpoint_name, auth_protocol HAVING login_count <= 5
```

## outbound-pivot-traffic
<!-- Outbound pivot traffic from vulnerable hosts -->
Find suspicious outbound connections from the specifically scoped vulnerable hosts to potential identity or C2 endpoints.

```sqlite target=network role=enrichment params=(lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
expected: Outbound web traffic originating from vulnerable hosts via shell or scripting
  interpreters. Silence suggests no such automated pivot occurred.
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-09-20'
~~~
SELECT device_hostname, process_name, dst_endpoint_ip, dst_endpoint_port, time FROM hb_network_connection WHERE direction = 'outbound' AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') AND dst_endpoint_port IN (443, 80) AND (LOWER(process_name) LIKE '%python%' OR LOWER(process_name) LIKE '%curl%' OR LOWER(process_name) LIKE '%powershell%') ORDER BY time DESC
```

## triage-cross-environment-pivot
<!-- Correlate exploit and pivot activity -->
```agent target=hunter
cite: required
context:
- evaluate-exploit-risk
- rare-administrative-logins
- outbound-pivot-traffic
max_iterations: 6
objective: Determine if the rare logins or outbound traffic originate from or are
  correlated with the vulnerable hosts identified in the lead. Weigh the timing and
  the significance of the targeted cloud identities.
success_criteria: A per-host and per-user verdict citing the connection between the
  vulnerability and the subsequent identity behavior.
tools:
- endpoint
- identity
- network
```

## route-on-pivot-evidence
<!-- Route on pivot evidence -->
if~: "the triage verdict is malicious for at least one account-host correlation" (confidence: high, judge=hunter)
then: → revoke-compromised-identity
indeterminate: → verify-and-patch
unavailable: → verify-and-patch (blind_spot: incomplete-auth-logs)
else: → close-out-investigation

## revoke-compromised-identity
<!-- Revoke compromised sessions -->
```action target=identity
~~~yaml
approval: required
~~~
Revoke all active OAuth/SAML sessions and session cookies for the identified actor_user_name in the affected cloud provider console.
```
→ verify-and-patch

## verify-and-patch
<!-- Verify and patch beachhead -->
```manual target=analyst
Review the outbound network connections on the vulnerable hosts. Verify if any web shells were dropped. Coordinate the patching of the affected software packages identified in the lead.
```
→ end

## close-out-investigation
<!-- Close out investigation -->
```manual target=analyst
Log the vulnerable hosts that did not show pivot activity. If no pivot was found, recommend patching the identified CVEs and update the scoping parameters for the next monthly run.
```
→ 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.