33. File integrity monitoring (FIM)
This guide describes Lawliet 1.5.13.s (the current release). Screens, commands and procedures may change in later versions; the usage guide is updated with each release. Check the version your server runs under Settings > Platform or with ./lawliet version, and see the Releases page for what changed.
FIM watches chosen files, directories and (on Windows) registry keys on each host. The agent records an approved baseline - hashes, sizes, owners, permissions - and then reports every change against it, with the process that made the change when the platform can identify it. A change is either expected (a patch, a deployment) and accepted into the baseline, or unauthorised and investigated.
FIM is a licensed module.
Permissions:
| Task | Permission | Four-eyes |
|---|---|---|
| See events, policies, baselines, coverage | View FIM | - |
| Create, edit, enable, disable, delete policies; build a baseline; verify; accept into baseline | Manage FIM | no |
| Triage events (status, note) | Triage findings | no |
33.1 The tabs#
Path: FIM. The page title is File integrity monitoring.
- Tiles: Total events, Critical/High, Investigating, Malicious.
- Tabs: Changes, Policies, Agents and baselines.
33.2 Procedure: create a FIM policy#
Permission: Manage FIM. Four-eyes: no.
Risk: watching a busy directory (logs, caches, temporary files) floods the event list and costs CPU on the host. Rollback: disable or delete the policy.
- Open FIM > Policies and press New policy.
- Optional: Start from a template - "fills the fields below; everything stays editable". Or keep Blank policy.
- Fill the form:
| Field | Meaning |
|---|---|
| Name | For example "Payment web root" |
| Operating system | Any OS, Linux, macOS or Windows |
| Description | Optional |
| Monitored paths | One per line; a file or a directory |
| Excluded paths | And everything below them |
| Include patterns | Empty = every file |
| Exclude patterns | A name, or a path with / |
| Registry keys (Windows) | For example HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Values are hashed; polled every 10 s in real time |
| Detection | Real time - as each change happens, or Scheduled, every N |
| Include subdirectories | Watch below the monitored directories |
| Report these changes | Created, Modified (content), Deleted, Renamed, Permissions, Owner, Attributes (Windows) |
| Hash | sha256, sha512, sha1, md5, or no content hash |
| Hash files up to | Larger files are not content-hashed (MB) |
| Severity | low, medium, high, critical |
| Apply to agents | Tick hosts; none selected = every matching agent |
| Enabled | "agents start enforcing it within five minutes" |
- Press Create policy (or Save changes for an existing policy). The button stays disabled while "N problems to fix before saving" is shown; each problem is named under its field.
What you see: the policy in Policies with its Scope, Watches, Filters and Reports.
Next: build the baseline on each agent (33.3). Until a baseline exists the agent has nothing to compare against.
Procedure: change, disable or delete a FIM policy#
Permission: Manage FIM. Four-eyes: no. Risk: disabling or deleting a policy stops monitoring those paths on its hosts, so changes there go unseen; widening it can flood the event list. Rollback: change it back, enable it again, or create it again (a deleted policy is gone, with its baselines).
To change it:
- Open FIM > Policies and click the policy's name. The editor opens with its values.
- Change the fields and press Save changes. Agents pick up the change within five minutes. Build the baseline again (33.3) if you changed the paths or filters.
To disable or enable it:
- Press Disable on the policy's row. The row shows " - disabled" under the name and its hosts stop monitoring those paths; Verify all agents is greyed out.
- Press Enable to turn it back on. You see "Policy enabled".
To delete it:
- Press Delete on the policy's row.
- Confirm "Delete policy "<name>"? Its hosts stop monitoring these paths."
- What you see: "Policy deleted". Events it already raised stay in Changes.
33.3 Baselines and verification#
Path: FIM > Agents and baselines. Columns: Agent, Policy, Mode, Baseline, Last baseline, Last verify. "No policy applies to this host." means no policy targets it.
Procedure: build a baseline#
Do this after the host is in its approved state (after patching, before go-live).
- Find the agent and policy row and press Baseline now.
- The scan view opens: "Waiting for the agent. Tasks are delivered on its next heartbeat and run on the host."
- When it completes, the Baseline column shows the number of entries. Click it to browse the baseline (Path, Type, Mode, Owner, Size, Hash; Filter by path...).
Procedure: verify a host against its baseline#
- Press Verify now on the row (or Verify all agents on the Policies tab, which says "N scan(s) queued" and how many hosts were skipped).
- The agent re-hashes the policy's files and reports every difference as an event.
- Open the result from the Last verify cell of the row. "No differences: all N path(s) match the baseline." means nothing changed.
Procedure: accept verified changes into the baseline#
Permission: Manage FIM. Use this after a planned change (patching, a deployment), once you have confirmed every difference is legitimate. Rollback: none in the console; if you accepted a change by mistake, restore the file on the host and build the baseline again.
- Open the verification result (step 3 above). It lists each changed, new and removed path.
- Press Accept on a single path, or Accept all N change(s) into the baseline.
- The baseline now holds the new state; the next verification compares against it.
Administrators can also run both from Operations (chapter 39).
33.4 Working the changes#
Path: FIM > Changes. The Event matrix: File path, Host, Event type, Changed by, Severity, Status, Risk, Detected. Filter by path... narrows it.
Click an event for the detail: Path, Change, Severity, Risk, Host, Authorised, Detected, Changed by (process, Identified by, Executable), Renamed from, Found by, and the before/after of Mode, Size, Owner and the hashes (Hash before, Hash after).
Procedure: triage a change#
Permission: Triage findings.
- Open the event and press one of the statuses under Set status:
| Status | Meaning |
|---|---|
| acknowledged | Seen, not yet judged |
| investigating | Being looked at now |
| expected | A legitimate change - deployment, patch, or approved edit |
| malicious | Unauthorised. Treat as an incident |
| resolved | Dealt with; no further action needed |
- Type the reason in the note and press Save.
Procedure: accept a change into the baseline#
Permission: Manage FIM. Use this only for a change you have confirmed is legitimate.
- Open the event and press Accept into baseline.
- The baseline is updated to the file's new state, so later verifications compare against it.
A malicious change: open an investigation (chapter 34) and consider containment (chapter 36). Do not accept it into the baseline.
33.5 If it fails#
| Symptom | Cause | Fix |
|---|---|---|
| No events from a host | No policy applies, no baseline, or the agent is offline | Check Agents and baselines |
| Baseline stays "Waiting for the agent" | Agent offline | Check Environment > Hosts |
| Thousands of events | A noisy path is watched | Add it to Excluded paths or Exclude patterns |
| Changed by is empty | The process could not be identified for that change | Use the time and host to search Logs |
| FIM column on Proof of protection says Not configured | No FIM policy on that host | Create a policy and baseline |

