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

macos: automating audit rules install #6447

Merged
merged 7 commits into from
May 25, 2020

Conversation

npamnani-uptycs
Copy link
Contributor

@npamnani-uptycs npamnani-uptycs commented May 18, 2020

No need to edit macos /etc/security/* files and reboot the machine anymore.
if --disable_audit is false, rules are controlled by -
--audit_allow_sockets default(false)
--audit_allow_process_events default(true)
--audit_allow_user_events default(true)
--audit_allow_fim_events default(false)

With this implementation osquery can inform kernel in what events its interested. That way it will not interfere with default audit trail mechanism of the system. Unlike linux kernel, OSX takes the responsibility of de-multiplexing the audit messages and apply the installed rules before delivering the messages to the userland.

@theopolis
Copy link
Member

Awesome! Do you know if this configuration needs to be removed / restored each time osquery runs? I think the important part is restoring the audit configuration if osquery stops.

@theopolis
Copy link
Member

Also it looks like the CI build failures are valid.

@npamnani-uptycs
Copy link
Contributor Author

npamnani-uptycs commented May 20, 2020

Do you know if this configuration needs to be removed / restored each time osquery runs? I think the important part is restoring the audit configuration if osquery stops.

We are configuring the audit pipe i.e. setting the attributes of audit pipe fd. We are not disturbing the setting of audit trail. In fact we can create 32(in case of 10.12 kernel) audit pipes and all can work independently and all can have different filtering rules and settings and which go away once fd is closed.

osquery/events/darwin/openbsm.cpp Outdated Show resolved Hide resolved
osquery/events/darwin/openbsm.cpp Outdated Show resolved Hide resolved
osquery/events/darwin/openbsm.cpp Outdated Show resolved Hide resolved
osquery/events/darwin/openbsm.cpp Outdated Show resolved Hide resolved
@theopolis theopolis merged commit 6c75b04 into osquery:master May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants