What is File Integrity Monitoring (FIM)?
File Integrity Monitoring detects unauthorized changes to critical files. Required by PCI DSS, foundational to incident response, often misconfigured.
What File Integrity Monitoring Actually Does
FIM works by establishing a cryptographic baseline of files and configuration items, then periodically rechecking those files against the baseline to detect changes. The technical mechanism is straightforward: at baseline time, the FIM agent computes a cryptographic hash (typically SHA-256 or SHA-1) of every file in the monitored scope. At each subsequent scan, the agent recomputes hashes and compares against the baseline. Any deviation triggers an alert.
What Gets Monitored
The FIM scope varies by environment and threat model. For PCI DSS compliance, the explicit minimum is monitoring of system files, application binaries, and configuration files within the cardholder data environment. For broader security programs, the scope typically expands to include operating system binaries, security tool configurations, web server document roots, application code directories, system startup scripts, scheduled task definitions, and Windows registry keys associated with autostart locations.
The selection of monitored files matters significantly. Monitoring too broadly produces alert fatigue — legitimate operating system updates, application patches, and routine administrative changes generate alerts that drown out malicious activity. Monitoring too narrowly leaves obvious gaps where attackers can modify system state without triggering detection. Mature FIM programs maintain a curated scope that reflects the actual attack surface rather than defaulting to either extreme.
Real-Time versus Scheduled Monitoring
FIM platforms operate in two modes. Real-time monitoring uses operating system kernel hooks (file system minifilter drivers on Windows, fanotify or inotify on Linux) to detect changes as they occur. Scheduled monitoring computes hashes on a defined interval — typically every 6, 12, or 24 hours — and compares against baseline. Real-time monitoring provides faster detection but generates higher CPU and I/O overhead; scheduled monitoring is operationally cheaper but introduces latency between attacker action and detection.
For most enterprise environments, the appropriate pattern is a hybrid: real-time monitoring on the most critical files (privileged binaries, security tool configurations, web shell drop locations) and scheduled monitoring on broader scope. The FIM platform selection — Tripwire Enterprise, OSSEC/Wazuh, Microsoft Defender for Endpoint, Trend Micro Deep Security, Qualys FIM — typically supports both modes with policy-level configuration.
Why FIM Matters for Detection and Compliance
The Specific Attack Patterns FIM Catches
FIM is operationally valuable because several specific attack patterns produce file changes that other detection categories miss. Web shells dropped to a web server document root are detected by FIM the moment they appear on disk, before any HTTP traffic ever reaches them. Modifications to security tool configurations — disabling EDR, removing alert forwarding rules, changing logging verbosity — are exactly the kind of evasive action that FIM is designed to surface. Modifications to scheduled tasks and Windows registry autostart keys are how persistence is most commonly established post-compromise; FIM catches these where network monitoring does not.
The complementary nature of FIM to other detection layers is the operational case. Network monitoring catches communication. Endpoint detection catches process behavior. File integrity monitoring catches the artifact left behind. An attacker who is careful about behavioral indicators and network signatures may still need to modify files on disk to establish persistence or maintain access — and FIM is the detection layer that surfaces those modifications.
The PCI DSS Requirement
PCI DSS requirement 11.5 explicitly mandates file integrity monitoring on cardholder data environments. The requirement specifies that critical system files, configuration files, and content files must be monitored at least weekly with alerting on unauthorized modifications. For organizations subject to PCI DSS, FIM is not a discretionary security investment — it is a structural compliance requirement, and FIM-related findings are among the most common categories surfaced during PCI DSS Reports on Compliance (ROCs).
The HIPAA and SOC 2 Implications
HIPAA does not explicitly require FIM but the Security Rule's audit controls (164.312(b)) and integrity standards (164.312(c)(1)) effectively require equivalent capability for systems handling electronic protected health information. SOC 2 Type II audits routinely evaluate the integrity-monitoring controls a service organization has in place for systems that affect the trust services criteria — particularly the Processing Integrity and Confidentiality categories.
Why FIM Programs Frequently Fail
The most common FIM program failure mode is alert fatigue. A typical Linux server running an active application produces hundreds to thousands of file modifications per day during normal operation — application log writes, temporary file creation, cache updates, patch installation. A FIM program that does not carefully scope monitored locations and define exclusions for expected change patterns generates alert volumes that exceed the security team's capacity to investigate. The team stops reviewing alerts. The compliance auditor sees FIM is deployed and checks the box. The attacker walks through unnoticed.
How to Deploy FIM Effectively
Scope Selection
Effective FIM begins with deliberate scope selection rather than default-everything monitoring. The scope should reflect the actual attack surface: operating system binaries (limited to those that should not change between patches), security tool configurations, web server document roots, application code directories that should not change at runtime, scheduled task definitions, Windows registry autostart keys, and credential storage locations (Linux /etc/passwd, /etc/shadow, /etc/sudoers; Windows LSASS-related registry keys).
The scope should explicitly exclude high-change locations that have no security relevance — application log directories, temporary file locations, cache directories, user document folders on workstations. The exclusion list needs to be reviewed periodically as the application footprint changes.
Baseline Management
The FIM baseline is rebuilt after every legitimate change to monitored files — patch installation, software updates, approved configuration changes. The baseline rebuild process needs to be operational discipline, not exception handling. Mature FIM programs integrate baseline updates with change management workflows: a change ticket that modifies system configuration triggers a corresponding FIM baseline update, and changes outside the change management process produce alerts regardless of legitimacy.
Alert Routing and Triage
FIM alerts feed into the broader security operations workflow — SIEM ingestion, SOC analyst triage, integration with EDR alerts for correlated investigation. The triage discipline distinguishes between expected changes (patching, approved administrative actions) and unexpected changes (anything else). For unexpected changes on high-criticality files, the response should be immediate; for unexpected changes on lower-criticality files, batched daily review may be appropriate.
Related Reading
- What is PCI DSS? — the compliance framework that explicitly mandates FIM
- What is SIEM? — the platform that typically ingests FIM alerts for correlated analysis
- What is EDR? — the complementary detection layer for behavioral analysis
- What is Incident Response? — the operational discipline that uses FIM data during investigation
The 2016 SWIFT Bangladesh Bank Heist: A File Integrity Failure
In February 2016, attackers operating from Lazarus Group infrastructure stole $81 million from Bangladesh Bank by issuing fraudulent SWIFT transfer instructions through the bank's compromised payment terminal. The attack chain depended on a specific operational maneuver: malware silently altered the SWIFT Alliance Access executable and the bank's transaction confirmation print files, suppressing the printed confirmation receipts that bank staff would have used to detect the unauthorized transfers.
The fraudulent transfers were initiated on a Friday before the start of the weekend in Bangladesh and the start of the workweek in New York. Without the printed confirmation receipts — which the malware had stripped from the print queue — bank staff did not discover the transfers until Monday. By that time, approximately $81 million had been laundered through Philippine casino accounts and was largely unrecoverable.
The case is widely cited in the financial services compliance literature as the canonical example of file integrity monitoring failure. Cryptographic hashing of the SWIFT Alliance Access binary and active monitoring of the print spool files would have generated alerts within minutes of the malware's modification activity. PCI DSS, GLBA, and SOX-aligned FIM controls exist specifically because attacks of this class are difficult to detect through any other means once the initial compromise has occurred.
The compliance requirement that mandates file integrity monitoring on cardholder data environments — one of the most frequently cited audit findings in PCI DSS assessments.
How Cloudskope Can Help
Cloudskope's Microsoft 365 and Azure Security Assessment includes file integrity monitoring scope review across the in-scope environment — surfacing the gaps between deployed FIM coverage and the actual high-value file locations that warrant monitoring. For organizations preparing for PCI DSS assessment, our Compliance Risk Assessment specifically evaluates FIM configuration against the PCI DSS 11.5 requirement and the related audit evidence the QSA will request.
.png)