Join our Newsletter — 33% off our NHI Course
Home› Glossary› Threats, Abuse & Incident Response› Non-Persistent Malware
Threats, Abuse & Incident Response

Non-Persistent Malware

← Back to Glossary
By NHI Mgmt Group Updated November 3, 2026 Domain: Threats, Abuse & Incident Response

Non-persistent malware is malicious code that runs only in memory or in a temporary state and leaves little or no file-based presence on disk. It often relies on scripts, injected code, scheduled tasks, or legitimate system tools, which makes detection depend on process, memory, and behaviour monitoring rather than file scans alone.

How non-persistent malware behaves

Non-persistent malware is designed to do its work without leaving much behind on disk. That makes it different from older file-centric malware that is easier to hunt with static signatures alone. The practical security problem is that the malicious activity may exist only long enough to execute, steal data, launch follow-on actions, or stage a later payload.

This style of malware often blends into normal execution paths by using scripts, injected code, scheduled tasks, or built-in system tools. That means defenders have to think about what the system is doing, not just what files are present. For a broader taxonomy of malware behaviours and evasion patterns, see the Malware Guide.

Why it is harder to detect

Because the code may live only in memory or a temporary state, a non-persistent infection can disappear before a delayed scan runs. Traditional file inspection can miss it entirely if the payload is never written to a durable location or is removed quickly after execution.

Detection therefore depends more on process telemetry, memory analysis, command-line review, script visibility, and behavioural correlation. That is especially important when legitimate tooling is abused, because the activity can look like ordinary administration unless defenders watch for unusual parent-child process chains, suspicious module loading, or unexpected script execution.

In environments with many endpoints or remote workspaces, this problem becomes more pronounced when the user session itself is the main delivery vehicle. The Virtual Desktop (VDI) and DaaS Security Guide is relevant here because session isolation, image rebuilds, and access governance all affect how quickly ephemeral malware can be removed or contained.

Common abuse patterns and security consequences

Non-persistent malware is attractive to attackers because it can reduce artefacts, frustrate forensics, and support short-lived credential theft or hands-on-keyboard activity. In practice, the malicious code may be only one step in a wider compromise chain, with the real objective being data theft, credential capture, lateral movement, or deployment of a second-stage payload.

Its security consequence is not limited to the initial process that runs in memory. If the malware steals tokens, API keys, session cookies, or privileged credentials before it disappears, the resulting compromise can outlast the malware itself. That is why defenders should assume that the absence of a file does not mean the absence of an incident.

For threat-pattern mapping, the MITRE ATT&CK Enterprise Matrix is useful for reasoning about credential access, privilege escalation, and lateral movement, while the CIS Controls v8 helps anchor defence around inventory, logging, malware defence, and access control.

Defending against non-persistent malware

Defence works best when it is layered. File scanning still has value, but it is insufficient on its own for this class of threat. Strong endpoint telemetry, memory-aware detection, script logging, application control, and behavioural monitoring give defenders a better chance of seeing what executes rather than only what persists.

Hunting should also include the systems and identities touched during execution. If non-persistent malware touched admin sessions, service credentials, or secrets stores, the incident response effort should treat those as potentially exposed even when no malicious file remains on disk.

The CircleCI breach 2023 illustrates why session theft and secret exposure matter, while the Shai Hulud npm malware campaign shows how malicious code can be used to expose secrets and propagate into development workflows.

Risk and Threat Considerations

Non-persistent malware raises the likelihood of missed detection because the malicious code can execute, steal data, and exit before traditional file-based controls see it. That makes short dwell time, living-off-the-land activity, and memory-resident payloads especially dangerous in environments that rely too heavily on signature scanning.

Failure mechanism: The malware abuses transient execution paths, script hosts, injected processes, or legitimate system tools to avoid durable artefacts while it performs theft, staging, or command execution.

Impact: Organisations can lose credentials, sessions, keys, or sensitive data, and may not realise the host was compromised until follow-on actions or external indicators reveal the breach.

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 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-5 — Account ManagementNon-persistent malware often abuses accounts, scripts and tools.
Recommendation — Harden account use and revoke suspicious access paths quickly.
NIST SP 800-53 Rev 5AU-2 — Event LoggingRuntime-only malware is best seen through process and script telemetry.
SI-4 — System MonitoringThis threat depends on behaviour monitoring rather than file scans.
Recommendation — Log endpoint events needed to reconstruct transient execution. Monitor processes, memory activity and command execution for anomalies.
MITRE ATT&CKT1059 — Command and Scripting InterpreterScripts are a common execution path for fileless or transient malware.
T1055 — Process InjectionInjected code is a core non-persistent malware technique.
Recommendation — Hunt for suspicious script execution and abnormal interpreter use. Detect suspicious cross-process memory activity and injection patterns.

Practitioner Guidance

What to watch for: Prioritise process, memory, and script telemetry over file presence when investigating suspicious endpoints. Correlate unusual execution chains, short-lived processes, unexpected task creation, and outbound connections with likely compromise, then review whether any credentials, tokens, or keys were exposed during the session.

Practitioner takeaway: If malware leaves little or nothing on disk, your detection strategy has to assume the most valuable evidence will be in runtime behaviour, not in static files.

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.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 3, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org