SC-18(4): Prevent Automatic Execution
SC-18(4) requires you to stop mobile code from running automatically in the systems and locations you define, and to force a defined set of checks or approvals before any such code executes. Operationally, this means turning off auto-run behaviors and putting technical “gates” in front of scripts, macros, browser active content, and similar code paths. 1
Key takeaways:
- Define where “mobile code” is in scope, then block automatic execution in those locations. 1
- Enforce a pre-execution requirement (policy + technical control) before code runs. 1
- Keep assessor-ready evidence: configuration baselines, enforcement logs, and documented exceptions. 2
SC-18(4): prevent automatic execution requirement is a control enhancement under NIST SP 800-53 Rev. 5 focused on “mobile code,” meaning code that can be delivered and executed across a network boundary or within a host/application context without traditional installation controls. Your assessor will not accept “we have antivirus” as a substitute. They will look for two things: (1) automatic execution is prevented in defined locations, and (2) your organization enforces a specific condition or set of conditions before code executes. 1
For a Compliance Officer, CCO, or GRC lead, the fastest path to operationalization is to treat SC-18(4) as a scoping and enforcement problem. First, define which environments and entry points are in scope (end-user endpoints, VDI, jump hosts, browsers, productivity suites, application servers, CI/CD runners). Second, pick concrete technical mechanisms that disable auto-execution and force pre-execution validation (allowlisting, signed code enforcement, macro controls, browser policies, email/content controls). Third, make the evidence repeatable, so you can prove continuous enforcement rather than a one-time hardening project. 2
Regulatory text
NIST excerpt: “Prevent the automatic execution of mobile code in {{ insert: param, sc-18.04_odp.01 }} and enforce {{ insert: param, sc-18.04_odp.02 }} prior to executing the code.” 1
Operator translation (what you must do):
- You decide and document the in-scope locations (the control’s parameters) where mobile code must not auto-run. These parameters are the placeholders in the excerpt. 1
- You implement technical settings that prevent auto-execution in those locations (for example: disable autorun, disable untrusted macros, block active content by default). 1
- You enforce a pre-execution requirement (also parameterized) such as “only signed code may run,” “only allowlisted scripts may run,” or “user must explicitly approve after warning plus sandbox scan.” The key is that the requirement is defined and enforced before execution, not after. 1
Plain-English interpretation
SC-18(4) is about preventing “drive-by” execution. If code arrives through a browser, email, document, chat, removable media, or network share, it must not execute automatically in your defined environments. If the business still needs some mobile code, you must put a gate in front of it and prove the gate is enforced consistently. 2
Who it applies to (entity and operational context)
This requirement commonly applies to:
- Federal information systems adopting NIST SP 800-53 controls. 2
- Contractor systems handling federal data where 800-53 is a contractual or assessment requirement. 2
Operational contexts where SC-18(4) is usually assessed deeply:
- End-user computing (Windows/macOS) where scripts, macros, and browser content execute.
- VDI/jump hosts used for admin actions.
- Application servers where “download-and-run” patterns exist (plugins, dynamic code loading).
- Developer and CI/CD environments where scripts and packages execute frequently.
What you actually need to do (step-by-step)
Step 1: Define “mobile code” for your environment (practical scope statement)
Write a one-page scope note that lists your mobile code categories, at minimum:
- Browser active content (scripts, embedded content, extensions)
- Office-like macros and embedded scripts
- OS scripting (PowerShell, Bash, Python, JavaScript runtimes where relevant)
- Signed/unsigned installers and “run from share” executables
- Email and collaboration tool attachments that can execute code
Tie this to your system boundary: corporate endpoints, privileged endpoints, and any regulated enclaves.
Evidence to generate now: “SC-18 Mobile Code Scope & Parameters” doc that explicitly fills in the two parameters: where auto-execution must be prevented and what must be enforced pre-execution. 1
Step 2: Assign an accountable control owner and operators
SC-18(4) fails in audits when it is “everybody’s job.” Put names to it:
- Control owner: usually Endpoint Engineering or Security Engineering
- Operators: EUC/MDM admins, GPO owners, EDR team, email security team
- Compliance partner: GRC validates evidence cadence and exceptions
Daydream (as a GRC workflow) fits here as the system of record to map ownership, procedures, and recurring evidence artifacts so the control stays assessable after staff turnover. 2
Step 3: Prevent automatic execution (technical baselines you can implement)
Pick controls appropriate to each platform and entry point, then baseline them.
Common enforcement patterns (choose what matches your environment):
- Endpoints: disable autorun/autoplay; block “run from internet” behaviors; restrict script hosts; control removable media execution.
- Productivity apps: block macros from untrusted sources; allow only signed macros; enforce Protected View and similar safe-open modes.
- Browsers: restrict active content, restrict extensions, block automatic downloads/open, enforce click-to-run for risky content.
- Email/collaboration: block executable attachments; detonate/sandbox; strip active content from documents where feasible.
Minimum expectation for auditors: you can show the settings are centrally managed and applied to in-scope assets, not hand-configured. 2
Step 4: Enforce a pre-execution requirement (the “gate”)
Define the condition(s) that must be satisfied before execution. Examples of enforceable gates:
- Allowlisting: only approved scripts/binaries can execute.
- Signing: only code signed by approved publishers can run.
- Privileged workflow: execution requires elevated approval (admin rights, controlled jump host session, change ticket linkage).
- Content validation: scan + reputation check + policy decision before execution is permitted.
Write this as a short, testable statement: “In [in-scope locations], mobile code executes only if [pre-execution conditions] are met.” 1
Step 5: Build an exception process that won’t break the control
You will have business cases for exceptions (legacy macros, vendor tools, admin scripts). Handle them with:
- Time-bounded exceptions with an owner
- Compensating controls (segmented host, restricted user group, monitoring)
- Review and re-approval triggers (app version changes, publisher changes)
Your assessor will accept exceptions only when they are documented, approved, and monitored.
Step 6: Prove it works (testing and continuous evidence)
Test at two levels:
- Design test: confirm policies exist and are targeted to in-scope systems.
- Operating test: demonstrate blocked auto-execution, and show logs for pre-execution enforcement decisions.
For continuous evidence, set a recurring pull of configuration reports and enforcement events, then store them in your control evidence repository (Daydream can track recurring evidence requests and due dates so you are not rebuilding screenshots every audit cycle). 2
Required evidence and artifacts to retain
Keep evidence that answers: “Where is it enforced, how is it enforced, and how do you know it stayed enforced?”
Recommended artifacts:
- Control narrative for SC-18(4) with the filled-in parameters (scope locations + pre-execution requirements). 1
- Configuration baselines (GPO/MDM profiles, browser policies, macro policies, allowlisting/signing policies).
- Asset targeting proof (device groups, OU mappings, MDM smart groups, server role targeting).
- Enforcement logs from endpoint security, allowlisting, script control, or application control showing denies/approvals.
- Exception register with approvals and expirations.
- Test records (what was tested, when, results, remediation tickets).
Common exam/audit questions and hangups
Expect these:
- “Define mobile code for your system.” If you cannot define it, the assessor will define it broadly. 2
- “Show me prevention of automatic execution.” They will ask for policy settings and a demonstration on a representative endpoint.
- “What exactly is enforced prior to execution?” “We scan after it runs” fails the requirement language. 1
- “How do you manage exceptions?” If exceptions are informal, the control is not consistently enforced.
- “How do you know settings didn’t drift?” One-time screenshots do not answer continuous operation.
Frequent implementation mistakes and how to avoid them
- Mistake: Treating macros only as a user training problem. Fix: enforce macro and script controls centrally, then add training as a supporting measure.
- Mistake: Relying on EDR detection after execution. Fix: implement preventive gates (allowlisting/signing) where feasible; align to “prior to executing the code.” 1
- Mistake: Undefined “locations.” Fix: explicitly list in-scope environments (endpoints, VDI, jump hosts, regulated subnet).
- Mistake: Exceptions without expiry. Fix: require expiration and re-approval, or the exception becomes your real policy.
- Mistake: No evidence cadence. Fix: set a recurring evidence schedule and store outputs consistently; Daydream can automate ownership mapping and evidence reminders. 2
Enforcement context and risk implications
No public enforcement cases were provided in the source catalog for this requirement, so you should treat SC-18(4) primarily as an assessment and breach-prevention control rather than a citation-driven enforcement hot spot. 2
Risk-wise, automatic execution paths are a common initial access and lateral movement enabler: a user opens a document, a macro runs; a browser executes active content; a script runs from a share; an admin host auto-runs something it should not. SC-18(4) reduces that exposure by forcing intentional execution plus pre-execution validation. 2
Practical 30/60/90-day execution plan
First 30 days (stabilize scope + quick wins)
- Publish the SC-18(4) scope/parameter document (locations + pre-execution requirement). 1
- Assign control owner and evidence owners; set an evidence calendar in Daydream or your GRC system. 2
- Implement the highest-impact “no auto-exec” baselines for endpoints (autorun controls, macro default hardening, browser policy guardrails).
- Stand up an exception register and approval workflow.
Next 60 days (enforce pre-execution gates)
- Roll out allowlisting/signing controls for scripts and high-risk executables in the highest-risk populations (privileged users, finance, HR, IT admins).
- Integrate email/collaboration attachment controls with policy decisions that align to your pre-execution requirement.
- Document how enforcement decisions are logged and retained.
By 90 days (make it auditable and durable)
- Expand controls to remaining in-scope asset groups and verify targeting coverage.
- Run a control effectiveness test: attempt execution of blocked mobile code and capture logs + results.
- Close the loop on exceptions: validate compensating controls, enforce expirations, and remove stale approvals.
- Package a “SC-18(4) audit binder” in your evidence repository: narrative, configs, logs, tests, exceptions. 2
Frequently Asked Questions
What counts as “mobile code” for SC-18(4)?
Define it based on your environment: scripts, macros, browser active content, and any code that can be delivered and executed without a traditional install process. Document your definition and scope so the assessor doesn’t expand it for you. 2
Does SC-18(4) mean I must block all scripts and macros?
No. It requires preventing automatic execution in defined locations and enforcing conditions prior to execution. Many programs allow approved or signed code while blocking untrusted or automatically launched code paths. 1
What is an acceptable “prior to executing” control?
A gate that makes an execution decision before the code runs, such as allowlisting, signature enforcement, or a policy decision point that blocks unapproved code. Pure detection after execution does not match the requirement text. 1
How do I handle legacy business macros that users depend on?
Treat them as managed software: inventory them, sign them or allowlist them, restrict where they can run, and track exceptions with an owner and expiration. Keep evidence that the exception is controlled and reviewed.
What evidence is most persuasive to auditors for SC-18(4)?
Centrally managed configuration baselines plus enforcement logs showing blocks/approvals, paired with a clear scope statement and a working exception process. Add a repeatable evidence pull so you can show continuous operation. 2
Where does Daydream fit in implementing SC-18(4)?
Use Daydream to assign control ownership, document the implementation procedure, and schedule recurring evidence collection (config exports, logs, exception reviews) so you stay audit-ready as the environment changes. 2
Footnotes
Frequently Asked Questions
What counts as “mobile code” for SC-18(4)?
Define it based on your environment: scripts, macros, browser active content, and any code that can be delivered and executed without a traditional install process. Document your definition and scope so the assessor doesn’t expand it for you. (Source: NIST SP 800-53 Rev. 5)
Does SC-18(4) mean I must block all scripts and macros?
No. It requires preventing *automatic* execution in defined locations and enforcing conditions prior to execution. Many programs allow approved or signed code while blocking untrusted or automatically launched code paths. (Source: NIST SP 800-53 Rev. 5 OSCAL JSON)
What is an acceptable “prior to executing” control?
A gate that makes an execution decision before the code runs, such as allowlisting, signature enforcement, or a policy decision point that blocks unapproved code. Pure detection after execution does not match the requirement text. (Source: NIST SP 800-53 Rev. 5 OSCAL JSON)
How do I handle legacy business macros that users depend on?
Treat them as managed software: inventory them, sign them or allowlist them, restrict where they can run, and track exceptions with an owner and expiration. Keep evidence that the exception is controlled and reviewed.
What evidence is most persuasive to auditors for SC-18(4)?
Centrally managed configuration baselines plus enforcement logs showing blocks/approvals, paired with a clear scope statement and a working exception process. Add a repeatable evidence pull so you can show continuous operation. (Source: NIST SP 800-53 Rev. 5)
Where does Daydream fit in implementing SC-18(4)?
Use Daydream to assign control ownership, document the implementation procedure, and schedule recurring evidence collection (config exports, logs, exception reviews) so you stay audit-ready as the environment changes. (Source: NIST SP 800-53 Rev. 5)
Operationalize this requirement
Map requirement text to controls, owners, evidence, and review workflows inside Daydream.
See Daydream