PowerShell download and execute is an attack technique where a PowerShell script retrieves code or a payload from a remote location and runs it on the host. It is commonly used for fileless execution, living-off-the-land activity, and rapid delivery of malicious commands that can bypass basic application controls and inspection.
How PowerShell download and execute works
PowerShell download and execute is an execution pattern, not a single product feature. An attacker or operator uses PowerShell to reach out to a remote location, pull down a script or payload, and then run it immediately on the host. That makes the technique fast, flexible, and well suited to staging follow-on commands without dropping an obvious executable first.
Because PowerShell is built into many Windows environments, this pattern can blend into legitimate administration. The same convenience that helps defenders automate tasks also gives adversaries a familiar runtime for fetching content from URLs, pasting in encoded commands, or chaining into later stages with minimal local artefacts.
Why this technique is effective
Download and execute is attractive because it separates delivery from execution. The initial command can be small while the real payload is hosted elsewhere, which reduces visible payload size on disk and can make content inspection harder. It also lets the operator change what is hosted remotely without touching every endpoint again.
The technique is especially useful for fileless or near-fileless activity, where the important behaviour happens in memory or through script content rather than a traditional installer. It is also a common bridge from initial access into discovery, credential theft, lateral movement, or ransomware staging when the downloaded code is only the first step in a broader intrusion.
What defenders should look for
Exposure usually shows up in the command line, parent-child process chain, and outbound network activity. A PowerShell process that immediately makes an external request, fetches content from a suspicious domain, or launches with unusual flags is a strong signal, especially when it is initiated by Office, browser, script host, or another user-facing process.
Detection improves when you correlate script block logging, PowerShell transcription, and endpoint telemetry with proxy, DNS, and firewall logs. That combination helps separate normal administrative scripting from staged payload retrieval, particularly when the downloaded content is obfuscated, encoded, or followed by rapid process spawning. See the T1105 Ingress Tool Transfer Defensive Guide for behavioural detection patterns that map directly to tool download activity, including PowerShell-driven retrieval.
For broader threat mapping, the behaviour aligns with established intrusion tradecraft in the MITRE ATT&CK Enterprise Matrix, where ingress tool transfer and related execution chains are used to stage follow-on activity. Hardening the host alone is not enough if outbound retrieval remains unrestricted.
Reducing the blast radius
Controls should focus on limiting where PowerShell can reach, what it can launch, and which hosts are allowed to script freely. Application control, egress filtering, constrained scripting where appropriate, and strong logging all help reduce the value of this technique. If download and execute is blocked at the network or application layer, the attacker loses the easiest path to rapid staging.
Because this pattern often delivers the first reusable foothold, incident responders should treat any confirmed use as a potential precursor to additional compromise. If the downloaded code executed successfully, review the host for persistence, unusual child processes, new services, scheduled tasks, and any credentials or tokens that may have been exposed or used during the session. A successful download is often only the visible part of a larger execution chain.
Risk and Threat Considerations
PowerShell download and execute is risky because it combines trusted local execution with remote, attacker-controlled content. That makes it a common way to bypass basic allowlists, delay detection until after retrieval, and move quickly from initial access to payload execution.
Failure mechanism: The host trusts PowerShell as an administrative tool, then allows it to fetch and run code from outside the environment before content inspection, application control, or network restrictions can intervene.
Impact: Attackers can stage malware, run living-off-the-land activity, and pivot into persistence or lateral movement with very little on-disk evidence, raising the chance of a broader compromise.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
MITRE ATT&CK addresses the attack and risk surface, while CIS Controls v8, NIST SP 800-53 Rev 5 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1105 — Ingress Tool Transfer | Covers remote payload retrieval used by PowerShell download and execute. |
| Recommendation — Map remote retrieval events to T1105 and hunt for staged execution in endpoint and network telemetry. | ||
| CIS Controls v8 | CIS-10 — Malware Defenses | PowerShell download and execute is a common malware delivery and execution path. |
| Recommendation — Strengthen malware defenses to detect and block script-based payload retrieval and execution. | ||
| NIST SP 800-53 Rev 5 | SI-4 — System Monitoring | Detects suspicious PowerShell retrieval and execution through host and network monitoring. |
| AC-4 — Information Flow Enforcement | Egress and content-flow restrictions directly limit remote download and execute behaviour. | |
| Recommendation — Correlate process, script, DNS, and proxy telemetry to identify remote code retrieval and execution. Enforce information-flow controls to restrict where PowerShell can retrieve and execute code from. | ||
| NIST CSF 2.0 | DE.CM-01 — Networks and network services are monitored to find potentially adverse events | This technique is visible through network monitoring of remote retrieval and callback behaviour. |
| Recommendation — Monitor network activity for suspicious PowerShell retrieval patterns and unexpected external destinations. | ||
Practitioner Guidance
What to watch for: Treat PowerShell instances that fetch remote content as high-signal events when they originate from user workflows that do not normally require scripting. Focus review on the parent process, the destination URL, the decoded command line, and whether the retrieved content was immediately executed.
Practitioner note: The main mistake is assuming that “it is only PowerShell” means it is benign. In practice, the risk comes from the combination of trusted runtime plus remote execution, so the decision point is whether that behaviour is expected, authorised, and observable.
Related resources from NHI Mgmt Group
- What breaks when users are allowed to execute PowerShell from untrusted prompts?
- Why do hidden download-and-execute chains in software packages increase compromise risk for developer environments?
- Why do malicious packages become more dangerous when they can move beyond simple download-and-execute behavior?
- How should security teams detect obfuscated PowerShell scripts before they execute in a decoy or production environment?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 2, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org