Skip to content

Commit 4a0e889

Browse files
authored
Merge pull request #18 from Achiefs/177-db-hash
Added Hashscanner documentation and fixed some sections
2 parents f7b7a1f + 5f36b44 commit 4a0e889

File tree

2 files changed

+108
-4
lines changed

2 files changed

+108
-4
lines changed

docs/configuration-file.md

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ This parameter will come on each event produced by the process.
8787

8888
Defines where the events will be stored.
8989

90-
It receives a system path, ex: `C:\Users\event.json` (Windows systems) or `\home\events.json` (Unix systems).
90+
It receives a system path, ex: `C:\Users\events.json` (Windows systems) or `\home\events.json` (Unix systems).
9191

9292
- ### max_file_checksum
9393

@@ -102,6 +102,19 @@ This parameter will come on each event produced by the process.
102102

103103
To speed up hashing, decrease this value, minimum value `1`, and maximum value `128`, more than that will increase the event processing time and CPU consumption.
104104

105+
- ### max_file_size
106+
107+
Integer
108+
{: .label .label-purple }
109+
Advanced
110+
{: .label .label-red }
111+
112+
Default value: `128`.
113+
114+
Defines the maximum size of `events.json` file before being rotated.
115+
116+
we recommend to maintain this value as default. Increasing it will allow to rotate the file less times. Decreasing it will increase the rotations of the file.
117+
105118
- ### endpoint
106119

107120
Section
@@ -308,6 +321,78 @@ This parameter will come on each event produced by the process.
308321

309322
---
310323

324+
- ## hashscanner
325+
326+
Section
327+
{: .label .label-green }
328+
329+
Defines the current behaviour of file hash scans.
330+
331+
Hash scanner will take your primary engine config paths to be scanned.
332+
If you only have Audit paths defined Hash scanner will scan over those paths.
333+
If you only have Monitor paths defined Hash scanner will scan monitor section defined paths.
334+
If both engines are defined Hash scanner will select Audit (as usually is the critical one).
335+
336+
337+
- ### file
338+
339+
String
340+
{: .label }
341+
342+
Default value: `C:\ProgramData\fim\fim.db` for Windows systems, `/var/lib/fim/fim.db` for Unix systems.
343+
344+
Defines where the hash database will be stored.
345+
346+
It receives a system path, ex: `C:\Users\events.json` (Windows systems) or `\home\events.json` (Unix systems).
347+
348+
- ### enabled
349+
350+
Boolean
351+
{: .label .label-purple }
352+
353+
Default value: `true`.
354+
355+
It defines whether the hash scanner thread starts or not.
356+
357+
- ### interval
358+
359+
Integer
360+
{: .label .label-purple }
361+
Advanced
362+
{: .label .label-red }
363+
364+
Default value: `60`.
365+
366+
Defines the window interval to run hash scans, hashscanner thread will sleep the defined interval.
367+
368+
To speed up scans, decrease this value, minimum value `5` (not recommended for bigger paths more than 5.000 files), and suggested as maximum value `1440` (24h), more than that will introduce security risks. This scan is not intended for real-time analysis for that matter you should use Monitor or Audit engine.
369+
370+
- ### algorithm
371+
372+
String
373+
{: .label}
374+
375+
Default value: `Sha256`.
376+
377+
Allows to define hashing algoritmh applied to each file.
378+
379+
{: .note }
380+
> The `algorithm` parameter support the following values:
381+
> - `Sha224` or `sha224` or `SHA224` or `224`, use Sha224 as hashing algorithm.
382+
> - `Sha256` or `sha256` or `SHA256` or `256`, use Sha256 as hashing algorithm.
383+
> - `Sha384` or `sha384` or `SHA384` or `384`, use Sha384 as hashing algorithm.
384+
> - `Sha512` or `sha512` or `SHA512` or `512`, use Sha512 as hashing algorithm.
385+
> - `Keccak224` or `keccak224` or `KECCAK224` or `K224`, use Keccak224 as hashing algorithm.
386+
> - `Keccak256` or `keccak256` or `KECCAK256` or `K256`, use Keccak256 as hashing algorithm.
387+
> - `Keccak384` or `keccak384` or `KECCAK384` or `K384`, use Keccak384 as hashing algorithm.
388+
> - `Keccak512` or `keccak512` or `KECCAK512` or `K512`, use Keccak512 as hashing algorithm.
389+
>
390+
> If `algorithm` is changed after FIM first scan (`fim.db` file is present) you should remove `fim.db` file to avoid false positive events.
391+
>
392+
> Take into account that increasing the hash algorithm could lead to higher scan times so keep in mind the relation between interval and algorithm.
393+
394+
---
395+
311396
- ## log
312397

313398
Section
@@ -335,6 +420,19 @@ This parameter will come on each event produced by the process.
335420

336421
The supported options are [debug, info, error and warning].
337422

423+
- ### max_file_size
424+
425+
Integer
426+
{: .label .label-purple }
427+
Advanced
428+
{: .label .label-red }
429+
430+
Default value: `64`.
431+
432+
Defines the maximum size of `fim.log` file before being rotated.
433+
434+
we recommend to maintain this value as default. Increasing it will allow to rotate the file less times. Decreasing it will increase the rotations of the file.
435+
338436
{: .note }
339437
> The `ignore`,`allowed` and `exclude` parameters has two different formats:
340438
> ```

docs/installation-guide.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ For CentOS-based systems: download the `rpm` and jump to [CentOS-based install](
4949
- Windows 7 or greater.
5050
- macOS BigSur or greater.
5151

52-
- Supported architectures (Linux only):
53-
- For ARM64: [AARCH64, ARM64].
54-
- For AMD64: [X86_64, AMD64].
52+
- Supported architectures:
53+
- Linux
54+
- ARM64: [AARCH64, ARM64].
55+
- AMD64: [X86_64, AMD64].
56+
- Windows
57+
- X86_64.
58+
- macOS
59+
- x86_64 (Intel).
60+
- ARM64 (Apple Silicon).
5561

5662
---
5763

0 commit comments

Comments
 (0)