During a threat hunt in a containerized cloud environment, an analyst confirms that an attacker compromised a running application container and modified its runtime binaries. Which remediation process best restores a trustworthy state without leaving hidden artifacts?
Select an answer to reveal the explanation.
Short Explanation
In an immutable container world, trying to scrub a compromised runtime by hand is like mopping the floor while the pipe is still leaking. Capture what you need for investigation, kill the tainted instance, and redeploy from a verified clean image instead of patching in place.
Full Explanation
Capture evidence, terminate, and redeploy a clean image is the correct remediation process because ephemeral containers should be treated as immutable; preserving volatile logs and filesystem diffs before destroying the tainted instance prevents lingering backdoors while restoring a verified baseline. Manually delete suspicious files inside the running container risks missing hidden scripts, modified libraries, or in-memory payloads and breaks immutability guarantees. Restart the compromised container without changing its runtime layer may leave persistent volume mounts or writable layer modifications intact, allowing immediate reinfection. Disable all container logging to reduce host performance overhead removes critical visibility needed to confirm eradication and detect follow-on attempts. As a caveat, redeploying the exact same vulnerable image without patching the underlying flaw or rotating exposed secrets will allow the adversary to compromise the fresh container again. As an operational check, verify the cryptographic digest of the newly deployed image against the signed registry build and confirm no unauthorized runtime modifications reappear.