File Integrity (sec-integrity)
Checks the integrity of system files, detects unknown binaries, SUID/SGID files, and executable files in temporary directories.
Configuration
| Parameter | Type | Default | Description |
|---|
enabled | bool | true | Enable/disable module |
check_interval_multiplier | int | 6 | Check interval multiplier (6 x check_interval = 30 min at default) |
system_paths | list | ["/usr/bin", "/usr/sbin", "/usr/local/bin", "/usr/local/sbin"] | System paths for binary checking |
ignore_paths | list | [] | Paths to exclude |
tmp_paths | list | ["/tmp", "/var/tmp"] | Temporary directories to check |
sensitive_dirs | list | ["/etc", "/usr/bin", "/usr/sbin", "/usr/lib"] | Directories for permission checking |
max_find_depth | int | 3 | Maximum search depth in tmp directories |
YAML Example
sec_integrity:
enabled: true
check_interval_multiplier: 6
system_paths:
- "/usr/bin"
- "/usr/sbin"
ignore_paths:
- "/usr/local/bin/custom-tool"
tmp_paths:
- "/tmp"
- "/var/tmp"
Diagnostic Codes
Linux
| Code | Severity | Meaning | Recommendation |
|---|
| 7300 | 0 | No integrity issues detected | — |
| 7301 | 1 | Binary does not belong to any package | Verify origin |
| 7302 | 1 | New SUID/SGID file found | Review SUID bit, remove if unnecessary |
| 7303 | 1 | World-writable file in sensitive directory | Restrict permissions |
| 7304 | 1 | File without valid owner (orphaned UID/GID) | Set owner or remove file |
| 7305 | 2 | Executable file in temporary directory | Investigate and remove file |
Windows
| Code | Severity | Meaning | Recommendation |
|---|
| 8300 | 0 | No integrity issues detected | — |
| 8301 | 2 | SFC/CBS reports system file corruption | Run sfc /scannow |
| 8302 | 1 | System file modified (hash mismatch) | Verify file |
| 8303 | 1 | Unsigned file in System32 | Verify origin |
| 8304 | 1 | Alternate Data Stream (ADS) on file | Review and remove ADS if necessary |
| 8305 | 2 | Executable file in temporary directory | Investigate and remove file |
- Linux: Uses
dpkg -S/rpm -qf for package verification, find for SUID/tmp scanning.
- Windows: Uses SFC logs, Authenticode signature verification, NTFS ADS detection.