Detect it by checking whether an application binary has been replaced, altered or tampered with. Compare hashes, signatures and file metadata against trusted baselines, and watch for unexpected writes to installed executables, version drift and launch failures after modification. Reinstall or restore from known-good media, and investigate the source of any changed executable before returning it to use.
What changes when an application executable is compromised
A compromised application executable is a trust break in the software you expected to be static and verifiable. Detection starts by treating the file as an asset with an identity of its own: compare it to the trusted baseline, then ask whether the binary has the same content, signature, publisher metadata and install location that it had when you approved it.
The most reliable signals are simple but should be combined. Hash mismatch indicates the file content changed; signature mismatch suggests the file is no longer the vendor-signed artifact you trust; unexpected timestamp, size or path changes often reveal repackaging, replacement or post-install tampering. A good baseline is the last known-good executable, not the current one on disk after the alert.
Detection is stronger when you correlate file integrity with host behaviour. An executable that suddenly fails to launch, spawns unusual child processes, or is rewritten soon after installation deserves review even if the name looks normal. The same applies when patching activity or software deployment is expected, because legitimate change can mask malicious replacement unless the team can prove the update came from a trusted source.
How to confirm exposure without overtrusting the installed binary
First confirm whether the changed file is truly the production binary, a copied staging artifact, or a benign update left behind by software maintenance. Check the installed path against the expected software inventory, compare the current digest against your baseline, and validate the signing chain rather than relying on the presence of a signature alone. If the executable is supposed to be managed by a package system, verify the package record too.
File metadata is useful only when interpreted carefully. A different modification time may be harmless after a reinstall, but combined with an unexpected write to a protected application directory it becomes a strong indicator of tampering. Likewise, a binary that retains the original name while moving to a different directory can indicate replacement designed to evade casual checks. The point is to prove provenance, not just change.
Teams should also review the surrounding system state. Look for other modified files in the same application tree, persistence entries, scheduled tasks, service changes or new network connections that appeared after the executable changed. Those clues help distinguish a corrupted install from an intrusion that used the executable as a foothold or persistence mechanism.
What to do when the executable has already been altered
When the baseline comparison confirms replacement or tampering, treat the host as potentially compromised until proven otherwise. Remove the altered binary from use, restore a known-good version from trusted media or a clean redeployment pipeline, and then validate that the restored file matches the expected hash and signature before re-enabling the service or application.
If the changed executable may have been used to execute attacker code, preserve evidence first. Capture the file, its hashes, local logs and any relevant process, service or event telemetry before cleanup. That gives you a way to determine whether the issue was simple corruption, unauthorized modification, or a broader compromise that also touched credentials, configuration or adjacent binaries.
After restoration, verify whether the same change could recur. If the application directory is writable by the wrong account, the package source is untrusted, or update controls are weak, the executable can be replaced again even after recovery. Integrity monitoring, controlled software distribution and restricted write access to installed binaries are what keep the fix durable.
Risk and Threat Considerations
Modified executables are high-risk because they sit at the boundary between normal software change and attacker-controlled code execution. If defenders only check whether a file exists, they can miss a trojanized binary that still launches successfully or a legitimate-looking replacement that preserves the original filename.
Failure mechanism: An attacker or malicious insider writes to an application directory, swaps the executable, or alters the file after installation so the system continues to trust a binary that no longer matches the approved baseline.
Impact: The altered program may execute unauthorized code, defeat software trust assumptions, create persistence, or open a path to broader compromise if the executable runs with elevated privileges or accesses sensitive data or services.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.DS-01 — Data-at-rest is protected | Executable integrity relies on protecting software files from unauthorized modification. |
| DE.CM-09 — Computing hardware, software, and data are monitored for changes | Detecting tampered executables depends on monitoring file and software changes on endpoints. | |
| PR.PS-04 — Secure software is deployed | Restoring a known-good executable depends on controlled deployment of trusted software artifacts. | |
| Recommendation — Protect installed binaries from unauthorized alteration and verify file integrity after change. Monitor software files for unauthorized change and alert on unexpected executable replacement. Deploy only trusted software builds and restore altered executables from approved sources. | ||
| NIST SP 800-53 Rev 5 | SI-7 — Software, Firmware, and Information Integrity | This control directly addresses integrity checks, trusted baselines, and tamper detection for executables. |
| CM-5 — Access Restrictions for Change | Preventing unauthorized writes to application binaries depends on restricting who can modify them. | |
| Recommendation — Implement integrity verification for executables and investigate unauthorized modifications immediately. Restrict write access to installed executables and approved update paths. | ||
| CIS Controls v8 | CIS-2 — Inventory and Control of Software Assets | Executable tampering is easier to spot when software assets and their expected locations are inventoried. |
| Recommendation — Maintain accurate software inventories and compare executable files against approved baselines. | ||
Practitioner Guidance
What to verify: Confirm the exact trusted baseline you will compare against, including hash, signature and install path. If you do not have a known-good reference, build one from a trusted build or deployment source before you rely on file-integrity alerts.
Decision rule: If the executable hash changed and the change was not tied to a verified update process, treat it as a security event, not a routine drift issue. If the binary is signed but the signature chain or publisher metadata does not match expectations, escalate the review even when the filename looks normal.
Practitioner takeaway: The safest interpretation of a changed executable is that provenance is uncertain until you can prove otherwise, so detection should always connect file integrity, software provenance and host behaviour before the binary is trusted again.
Related resources from NHI Mgmt Group
- How should security teams detect Active Directory compromise before data is exposed?
- How should security teams detect SAP compromise before data exfiltration starts?
- How should security teams detect identity compromise after authentication?
- How should security teams detect business email compromise without relying on payloads?
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 October 17, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org