Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstable FIM tests for Solaris agent #3405

Closed
Rebits opened this issue Oct 3, 2022 · 2 comments
Closed

Unstable FIM tests for Solaris agent #3405

Rebits opened this issue Oct 3, 2022 · 2 comments
Assignees

Comments

@Rebits
Copy link
Member

Rebits commented Oct 3, 2022

Version Commit Report
4.5.0 9ce0d83 solaris_report.zip

Description

Solaris agent FIM tests seem unstable. The test case test_realtime_unsupported[get_configuration0]. It is required to check these tests and ensure they are stable

@Rebits Rebits changed the title IT FIM: Unstable test for Solaris agent Unstable FIM tests for Solaris agent Oct 5, 2022
@jmv74211 jmv74211 added this to the Development 4.5 milestone Oct 7, 2022
@fedepacher
Copy link
Contributor

fedepacher commented Nov 3, 2022

Update 2022/11/03

The Wazuh agent works as is expected in manual testing in a Solaris 11 OS, ignoring the realetime tag and using the scheduled mode instead.
To check this it has configured the local_internal_option.conf file as follows:

syscheck.debug=2
monitord.rotate_log=0

And the ossec.conf file is as follows:

<syscheck>
  <disabled>no</disabled>
  <directories check_all="yes" realtime="yes">/dir</directories>
</syscheck>

It has created/updated/deleted files inside /dir folder to check the wazuh agent behavior.
As the scheduled mode is performed (instead of realtime mode) the <frecuency> tag by default is 12 hours therefore, it has modified the local system DateTime with the following command:

date 1104055222
Friday, November  4, 2022 05:52:00 AM EET

To launch the check file integrity monitoring.

@fedepacher
Copy link
Contributor

Update 2022/11/07

I have noticed that every time the test fails is because it has performed a DateTime change before letting Wazuh achieve the following log:

DEBUG: Finished calculating FIM integrity.

This means, that the test creates/modifies/deletes a file, makes a DateTime change, and checks for the FIM integrity result but, as FIM has not finished calculating the integrity it fails.
This problem may be done by the use of DateTime change. To avoid the use of the time travel function, I propose the addition of the following tag to the ossec.conf file i the syscheck module:

<frequency>3</frequency>

This tag will set the scan frequency to 3 seconds instead of using the default value of 43200 seconds (12 hours).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants