Traditional malware-based detection can miss attacks that never drop a classic payload. Script execution, admin checks, scheduled task persistence, and legitimate tunnel tooling can look like routine administration. Defenders need controls that watch for chained behaviours, unusual parent-child process relationships, new persistence tasks, and outbound requests carrying verification data or host details.
Why This Matters for Security Teams
When phishing payloads use scripts, scheduled tasks, and remote tunnels, the attack often looks like administration instead of malware delivery. That breaks the assumptions behind signature-based AV, simple file-hash blocking, and alerting that only fires when a binary lands on disk. The real risk is chained behaviour: script interpreters, privilege checks, persistence creation, and outbound tunnelling that can all appear legitimate in isolation.
This is especially dangerous in NHI-heavy environments, where stolen tokens, service accounts, and automation credentials make it easy to blend malicious actions into ordinary workload activity. NHI Management Group’s Ultimate Guide to NHIs notes that 80% of identity breaches involved compromised non-human identities such as service accounts and API keys. That is the operational backdrop for these attacks: the payload is often not a file, but a sequence of identity-backed actions.
Controls in CIS Controls v8 help by pushing defenders toward inventory, logging, and controlled execution, but the key lesson is narrower: detection must follow behaviour, not just malware artifacts. In practice, many security teams encounter this only after a tunnel is already established and the attacker has used routine-looking scripts to move laterally.
How It Works in Practice
These campaigns usually start with a scriptable foothold, such as PowerShell, JavaScript, Python, or a signed admin tool launched by a user or endpoint agent. From there, the attacker may perform system discovery, check for elevated privileges, create a scheduled task for persistence, and then launch a tunnel to a remote relay. None of those steps needs to look malicious on its own. The problem is the sequence, the parent-child process chain, and the fact that the tunnel often rides over allowed ports or trusted domains.
Defenders need to model the chain as an identity-and-execution problem. A phishing page or payload that captures verification data, host details, or session material can be followed by one or more scripts that bootstrap access, then by a persistence mechanism that ensures the access survives reboot or user logout. At that point, a remote tunnel can provide interactive control without dropping conventional malware. This is why behaviour analytics, endpoint telemetry, and network detections must be correlated rather than tuned separately.
Current guidance suggests three practical controls:
- Alert on suspicious script interpreters spawning admin utilities, archive tools, or scheduled-task creation commands.
- Track new persistence objects, especially tasks created shortly after browser, email, or collaboration-tool activity.
- Inspect outbound connections for tunnel-like patterns, unusual SNI or destination churn, and requests carrying host or verification data.
NHI-focused analysis is useful here because the campaign may steal or replay non-human credentials rather than install a classic implant. NHIMG’s Shai Hulud npm malware campaign and CoPhish OAuth Token Theft via Copilot Studio both show how credential exposure and trusted automation can be abused without a conventional payload. These controls tend to break down in highly managed endpoints where scripts, scheduled tasks, and remote admin tooling are already common, because allowlists become too broad to separate legitimate automation from attacker tradecraft.
Common Variations and Edge Cases
Tighter execution control often increases operational overhead, requiring organisations to balance reduced attack surface against automation friction. That tradeoff is most visible on developer workstations, helpdesk endpoints, and server fleets where scripts and tunnel utilities are part of normal operations. Best practice is evolving, and there is no universal standard for this yet, but the direction is clear: allow based on task context, not just tool name.
One common edge case is legitimate tunnelling used for support, CI/CD, or remote administration. Blocking it outright can disrupt business operations, so defenders usually need stronger device posture checks, tighter egress controls, and time-bound approvals. Another edge case is scheduled-task abuse on servers that already run many legitimate jobs. In that environment, detection should prioritize novelty, such as a new task created from a user session, an unexpected script path, or a service account that suddenly performs interactive actions.
Defenders should also account for NHI compromise as a multiplier. If a stolen API key, token, or service account is available, the attacker may not need persistence on every host. Instead, the tunnel becomes a temporary bridge while the identity itself provides access. The Schneider Electric credentials breach and CircleCI Breach illustrate the broader lesson: once trusted identities are compromised, normal-looking automation can become the delivery mechanism.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-01 | Covers detection gaps when scripts and tunnels abuse non-human identities. |
| OWASP Agentic AI Top 10 | A-04 | Behavioural chaining mirrors agentic abuse of tools and autonomous actions. |
| CSA MAESTRO | MAESTRO-3 | Addresses runtime abuse of tool access, persistence, and outbound control channels. |
| NIST AI RMF | GOVERN | Supports governance for chained, automated behaviour that hides behind legitimate activity. |
| NIST CSF 2.0 | DE.CM-1 | Continuous monitoring is needed for parent-child process and persistence anomalies. |
Inventory NHI-driven scripts, keys, and service accounts, then alert on unusual execution chains.
Related resources from NHI Mgmt Group
- What breaks when identity teams rely on one-off access reviews instead of scheduled reporting?
- What breaks when organisations rely only on phishing awareness instead of layered email defenses?
- What breaks when organisations rely on basic identity checks instead of full due diligence for remote customers?
- What breaks when access reviews rely on memory instead of ownership data?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on August 24, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org