-
Notifications
You must be signed in to change notification settings - Fork 1k
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
WIP: Allow file change before syscheck raise an alert #790
base: master
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,110 @@ | |||
/* Copyright (C) 2009 Trend Micro Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is an entirely new file, you should probably take ownership.
30094bb
to
11880da
Compare
Note; I don't expect this pull request to be merged as-is, I opened it for discussion. |
Being able to account for file system changes caused by updates is something many system admins have asked about in the past. Would you mind sharing how you have been using this proposed feature? I'm not clear on how one would go about automating, say, an 'apt-get upgrade' or a 'yum update', but am very curious. |
I have to say that I do not use the proposed patch in production, nor have I fully tested it (as in a multiple remote agents setup). For apt, I expect to be able to get the list of file changes before running the upgrade with a mix of Probably something like |
Hi,
When my hosts gets an upgrade, either distribution packages or
in-house applications, I get flooded with
Integrity file changed
alerts for files and software I upgraded.
Actually, I do not want those alerts, whose lower the signal/noise
ratio. Morever, I tend to just not read these kind of alerts since I
feel most of them are false-positive.
At the moment, OSSEC miss a feature to allow a file to change prior to
the actual update.
I thought of the following requierements:
Based on these requierements, I extended
syscheckd
to accept a-u <timestamp>
. Called with this switch,syscheckd
won't startin daemon, but will read paths from stdin. Those path will be sent to
the monitor, together with the timestamp.
On the monitor (whatever host is running
analysisd
actually), wewatch for those message and produce
allowchanges
token in anagent-specific queue. This token contains
Now everytime
analysisd
is about togenerated an alert for an integrity change, it try to consume one
token for the file. If a token have been found, we set the decoder to
syscheck-allowchange
, and users can write their rules according to their needs.Otherwise, the old behaviour still apply.
As a security consideration, we could argue that this mechanism allow
an attacker to silentely changes binary on the agents if she allows
the changes before being evil. In fact, the monitor already trust
syscheckd
for the file integrity, so an attacker with root accesscould simply just turn it off.
What do you think about it ?