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

SCA Regex: Ensure ntp is configured #4209

Closed
nmartinez-nimeops opened this issue Nov 9, 2019 · 1 comment
Closed

SCA Regex: Ensure ntp is configured #4209

nmartinez-nimeops opened this issue Nov 9, 2019 · 1 comment
Assignees
Labels
feed type/bug Something isn't working

Comments

@nmartinez-nimeops
Copy link

Hi,
seems that the regex is not good for 3026 Ensure ntp is configured

- 'f:/etc/ntp.conf -> r:^restrict\s+-4\s+default|^restrict\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery\s+'

- 'f:/etc/ntp.conf -> r:^restrict\s+-6\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery\s+'

The last \s+ not needed for results:

restrict -4 default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

-> No space after noquery

A good one:

- 'f:/etc/ntp.conf -> r:^restrict\s+-4\s+default|^restrict\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery'

- 'f:/etc/ntp.conf -> r:^restrict\s+-6\s+default && r:\s+kod\s+ && r:\s+nomodify\s+ && r:\s+notrap\s+ && r:\s+nopeer\s+ && r:\s+noquery'

File: https://github.com/wazuh/wazuh/blob/master/etc/sca/debian/cis_debian9_L1.yml

@cristgl
Copy link
Contributor

cristgl commented Nov 11, 2019

Hi @nimeops,

Thank you so much for reporting this bug, it has been fixed in this PR wazuh/wazuh-ruleset#521. You can follow the revision and merge of it in the mentioned link.

Best regards and thank you again,
Cristina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feed type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants