Authentication databases, system configuration, logs and system executables decide how a host behaves below the user level, so an attacker who changes them gains persistence, credentials or cover without running anything obviously malicious. MITRE D3FEND names the countermeasure System File Analysis (D3-SFA) and defines it as "Monitoring system files such as authentication databases, configuration files, system logs, and system executables for modification or tampering." It is a Detect technique under Operating System Monitoring, its digital artefact is the Operating System File, and its child technique is Service Binary Verification (D3-SBV). This card explains what D3-SFA watches, which ATT&CK techniques D3FEND relates it to, the Windows and Linux signals that implement it, how to verify it and where it falls short. It is for detection engineers and host owners; general tool selection for file integrity monitoring is in the File Integrity Monitoring Guide.
Key takeaways
- Scope is the operating system's own files. D3-SFA covers files that are part of, or store information about, the operating system: authentication stores, configuration, logs and system binaries, not business data.
- Baseline first. D3FEND's considerations call for a baseline or snapshot of file checksums for later comparison, and warn that false positives and log volume need planning.
- Wide ATT&CK reach, inferred. D3FEND relates D3-SFA through the Operating System File artefact to techniques from Proc Filesystem (T1003.007) and Proc Memory (T1055.009) to PAM changes, systemd services, dynamic linker hijacking and log clearing.
- Three MITRE CAR analytics show the shape. D3FEND cites analytics for log clearing (events 1100, 1102, 1104 and 104), permission changes (event 4670 and
chmod) and autorun differences. - Change control decides the noise. Patching rewrites system files every month; without a link between alerts and approved changes, D3-SFA drowns in expected modifications.
D3-SFA at a glance
| Attribute | Value |
|---|---|
| D3FEND ID | D3-SFA (d3f:SystemFileAnalysis) |
| Tactic | Detect |
| Parent technique | Operating System Monitoring (D3-OSM) |
| Child technique | Service Binary Verification (D3-SBV) |
| Digital artefact | Operating System File (D3FEND relation: analyzes) |
| D3FEND references | MITRE CAR-2016-04-002 User Activity from Clearing Event Logs; CAR-2019-07-001 Access Permission Modification; CAR-2013-01-002 Autorun Differences |
| Typical data sources | Windows Security and System logs with file system auditing, Linux audit records, file integrity monitoring agents, EDR file events, scheduled baseline scans |
| Effort | Medium: the watch list is short, but tuning against patching and configuration management takes time |
How it works
D3FEND's article is brief: the technique ensures the integrity of system-owned file resources, because system files can change behaviour below the user level. In practice D3-SFA combines three methods.
- Baseline comparison: hash and record attributes of system files, then compare on a schedule or on change. Differences that do not match an approved change are investigated.
- Real-time change events: operating system auditing or an agent records writes, deletes, permission and ownership changes on watched paths as they happen, with the process and account responsible.
- Content analysis: for files whose meaning matters more than their hash, such as PAM configuration, sudoers, autorun locations or service definitions, parse the content and alert on specific risky entries.
| Method | Strength | Weakness | Fits when |
|---|---|---|---|
| Scheduled baseline scan | Simple, catches any change regardless of how it was made | Gap between scans; no actor information | Stable servers, compliance evidence |
| Real-time audit events | Shows who and which process made the change | Volume; needs careful path selection | High-value hosts such as domain controllers and jump hosts |
| Content-aware rules | Low noise, catches the risky line rather than any edit | Needs a rule per file type | Authentication and privilege configuration files |
ATT&CK techniques D3FEND relates to D3-SFA
Relationship type: inferred only. D3FEND lists these relations as "inferred and experimental", derived because each technique accesses or modifies an Operating System File or one of its sub-artefacts such as configuration, log or executable files (D3FEND 1.6.0, checked November 2026). The ontology records three direct relations: Proc Filesystem accesses, Proc Memory accesses and may modify, and Device Driver Discovery may access Operating System File. D3FEND still lists Clear Linux or Mac System Logs under an ID that ATT&CK v20 has revoked; the successor T1685.006 is shown. Each ID was checked against ATT&CK v20.
| Group | ATT&CK techniques | System files involved (examples) |
|---|---|---|
| Credential access | T1003.007 Proc Filesystem; T1556.003 Pluggable Authentication Modules; T1056.003 Web Portal Capture; T1212 Exploitation for Credential Access; T1649 Steal or Forge Authentication Certificates | /proc/<pid> entries, PAM modules and configuration, certificate stores |
| Privilege escalation and persistence | T1543.002 Systemd Service; T1548.003 Sudo and Sudo Caching; T1055.009 Proc Memory | Unit files, sudoers, process memory exposed through /proc |
| Stealth and execution flow | T1574.006 Dynamic Linker Hijacking; T1574.010 Services File Permissions Weakness; T1574.005 Executable Installer File Permissions Weakness; T1036.003 Rename Legitimate Utilities; T1564.006 Run Virtual Instance | /etc/ld.so.preload, service and installer binaries, copied or renamed system utilities |
| Defence impairment | T1685.006 Clear Linux or Mac System Logs | Files under /var/log |
| Discovery | T1652 Device Driver Discovery; T1018 Remote System Discovery | Driver files, hosts files |
| Execution, lateral movement, impact | T1072 Software Deployment Tools; T1489 Service Stop | Deployment agent binaries and configuration; service files |
Not every row is equally detectable with file monitoring. Changes to PAM, sudoers, unit files, /etc/ld.so.preload and logs are classic D3-SFA wins. Reads of /proc for credential or memory access are poorly served by file watches and are better caught at the system call layer with D3-SCA System Call Analysis. Technique detail: T1003 OS Credential Dumping, T1055 Process Injection Defensive Guide and T1652 Device Driver Discovery.
What to watch
Platforms are listed alphabetically. The paths are common examples, not a complete list; adapt them to your builds.
| Platform | Files and locations | Signal |
|---|---|---|
| Linux | /etc/passwd, /etc/shadow, /etc/sudoers and /etc/sudoers.d/, /etc/pam.d/, /etc/ld.so.preload, systemd unit directories, /etc/ssh/sshd_config, /var/log/, system binary directories | Audit rules in the form -a always,exit -F arch=b64 -F path=... -F perm=wa -F key=... (the -w form is documented as deprecated); process creation events for chmod as in CAR-2019-07-001; scheduled hash baselines |
| Windows | %SystemRoot%\System32 binaries and drivers, the hosts file, service binaries, autorun locations, event log files | Event 4663 (an attempt was made to access an object) with a SACL on the path and Audit File System enabled, filtered on WriteData, AppendData, DELETE, WRITE_DAC and WRITE_OWNER; event 4670 for permission changes; events 1100, 1102, 1104 and System 104 for log clearing; periodic Autoruns comparison as in CAR-2013-01-002 |
Microsoft's own monitoring recommendation for event 1102 is simple: you should not normally see it, so investigate every occurrence. For Linux implementation detail, see the Linux File Integrity Monitoring Guide and the Linux Logging and auditd for Defenders Guide.
Where identity fits
Many of the files in scope are identity stores and identity configuration: /etc/shadow, sudoers, PAM stacks, SSH daemon settings and authorised key locations. A change there creates or widens access for a human or a service account. Alerts should name the account and process that made the change, and changes made by configuration management service accounts should be matched to an approved run rather than trusted by default.
Implementation steps
- Define the watch list. Start with authentication and privilege configuration, logs, service definitions and system binaries on your most valuable hosts. Keep it short enough to review.
- Take the baseline. Hash watched files on a known-good build and store the baseline off the host, as D3FEND's considerations recommend.
- Enable change events. On Windows, enable Audit File System and set SACLs on the watched paths; on Linux, load keyed audit rules. Forward events off-host immediately.
- Link to change management. Tag patch windows and configuration management runs so expected changes are labelled rather than suppressed.
- Write targeted content rules. Alert on new entries in
/etc/ld.so.preload, new NOPASSWD lines in sudoers, new PAM modules and new services, regardless of change window. - Pilot and tune. Run for two to four weeks on a server group, review every alert, then extend. D3FEND notes log volume and false positives as known concerns.
- Roll back safely. If rules overload hosts or the SIEM, remove the noisiest path rule rather than disabling the set, and re-baseline after major upgrades.
How to verify it works
- Replay the CAR tests in a lab: grant full control on a test file with
icaclson Windows and runchmod 777on a test file on Linux; confirm the 4670 and process events reach the SIEM. - Edit a watched file: append a comment to a watched configuration file on a test host and confirm the audit key or 4663 event and the baseline difference both appear.
- Clear a test log: clear the Security log on a test host and confirm event 1102 alerts, from the forwarded copy.
- Audit the coverage: confirm every host in scope has the audit rules or SACLs loaded and a recent baseline.
| Metric | Example target (NHI Mgmt Group suggestion, not a standard) | Why it matters |
|---|---|---|
| In-scope hosts with rules loaded and a current baseline | 100% | Unwatched hosts are blind spots |
| System file changes matched to an approved change | Rising toward all changes | Unmatched changes are the ones to investigate |
| Log clearing alerts investigated | 100% | Clearing logs rarely has a legitimate reason |
| Alerts per host per week after tuning | Stable and reviewable by the team | Noise that is not reviewed hides real changes |
| Lab tests passed per quarter | All | Proves events flow end to end |
Limits, bypasses and failure patterns
- Baselines taken after compromise: a baseline of an already altered host records the attacker's changes as normal. Baseline from a known-good build.
- Root or SYSTEM can blind the monitor: an attacker with full privileges can stop auditing or the agent before changing files; pair with D3-SDM System Daemon Monitoring and off-host forwarding.
- In-memory changes: techniques that modify a running process or load code without writing a watched file leave nothing for D3-SFA to compare.
- Too many paths: watching whole system directories in real time creates volume that teams stop reviewing; CAR notes that cron jobs running
chmodand folder permission changes per file both inflate counts. - Patch noise treated as permanent exception: suppressing the binary directories entirely to stop patch noise removes coverage of replaced system binaries, which D3-SBV is meant to catch.
- Local-only logs: log clearing is only visible if events left the host before the clear.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | SI-7 Software, Firmware, and Information Integrity | Integrity verification of system software and information |
| NIST SP 800-53 Rev 5 | AU-9 Protection of Audit Information | Detecting and preventing log tampering |
| NIST SP 800-53 Rev 5 | CM-3 Configuration Change Control; SI-4 System Monitoring | Matching file changes to approved changes and monitoring for the rest |
| NIST CSF 2.0 | DE.CM-09 | Monitoring software and runtime environments for adverse events |
| MITRE ATT&CK mitigations | M1022 Restrict File and Directory Permissions; M1047 Audit | Prevention and review that this detection complements |
| MITRE D3FEND | D3-OSM, D3-SFA, D3-SBV | Parent, technique and child |
See M1022 Restrict File and Directory Permissions for the preventive side.
Related countermeasures
- File Integrity Monitoring: the general file integrity technique; D3-SFA focuses it on operating system files. See D3-FIM File Integrity Monitoring.
- Service Binary Verification: the D3-SFA child that checks service executables.
- System Init Config Analysis: covers autorun and init configuration that CAR-2013-01-002 compares. See D3-SICA System Init Config Analysis.
- Local File Permissions: the hardening counterpart to permission change detection. See D3-LFP Local File Permissions.
Practitioner checklist
- Keep a short, reviewed watch list of system files per platform.
- Baseline watched files from a known-good build and store it off-host.
- Enable Audit File System with SACLs on Windows and keyed audit rules on Linux.
- Alert on every event 1102 and on Linux log file truncation or deletion.
- Write content rules for sudoers, PAM,
/etc/ld.so.preloadand new services. - Link file change alerts to change management records.
- Forward events off-host in real time.
- Re-baseline after every major upgrade and record why.
- Test rules quarterly with the CAR lab cases.
Standards and references
- MITRE D3FEND: System File Analysis (D3-SFA)
- MITRE CAR: CAR-2016-04-002 User Activity from Clearing Event Logs
- MITRE CAR: CAR-2019-07-001 Access Permission Modification
- MITRE CAR: CAR-2013-01-002 Autorun Differences
- Microsoft Learn: Event 4663, an attempt was made to access an object
- Microsoft Learn: Event 1102, the audit log was cleared
- Linux man-pages: audit.rules(7)
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
Related NHI Mgmt Group resources: File Integrity Monitoring Guide · Linux File Integrity Monitoring Guide · D3-FIM File Integrity Monitoring · MITRE D3FEND Guide