-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Real-time file monitoring stops working if several files are encrypted at the same time #1402
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
Comments
This error appears in agent ossec.log file and after that real-time file monitoring stops working: |
Additional info about this defect: It depends on the number of files encrypted at the same time. Following the steps to reproduce above, if only first 25 files from Test folder are encrypted at the same time the defect doesn't happen
However if next 50 files from Test folder are encrypted at the same time only one event is forwarded and the error appears in agent ossec.log Then, if ossec agent is restarted FMI events are forwarded properly
|
After some investigation: It looks like the WinAPI function Suggested changes are: |
Pull request was created for this issue #1409 |
Thanks. The PR has been merged in already, as far as I could see. |
So first and foremost, this is one of the best bug reports Ive ever seen. It is both actionable and repeatable. Furthermore, it has brought a new developer to the project. I would be my pleasure to both backport this to the 2.9.X branch and to 3.0. Please let me know which you would prefer @billy-shears For everyone else, if you're looking to do a bug report, this is the gold standard |
Thanks a lot, Scott @atomicturtle! |
Fixes issue ossec#1402 reported by @billy-shears
Deploy HIDS agent on Windows 2008 server
Disable auto_ignore option in ossec server configuration and restart ossec
/etc/init.d/ossec restart
Add real-time monitoring for C:\Data directory in agent ossec.conf
<directories check_all="yes" realtime="yes">C:\Data</directories>
Create C:\Data\Test folder and 200 files inside Test and restart ossec agent service on Windows 2008 server
Add real-time monitoring for C:\Data directory in agent ossec.conf and restart agent service
<directories check_all="yes" realtime="yes">C:\Data</directories>
Check that C:\Data directory is being monitored in real time by ossec agent and wait until real-time file monitoring starts
agent ossec.log
Encrypt C:\Data\Test folder and files
a. Select C:\Data\Test folder
b. Right-click the file or folder and select Properties.
c. On the General tab, click the Advanced button.
d. Check the box for the "Encrypt contents to secure data" option.
e. Click OK and then Apply.
f. Select 'Apply changes to this folder, subfolders and files' and click on OK
Check the error in ossec.log and if HIDS events are generated when the directory and files are encrypted
Actual Behavior: Real-time file monitoring stops working if several files are encrypted at the same time
Expected Behavior: Real-time file monitoring should not stop working if several files are encrypted at the same time
The text was updated successfully, but these errors were encountered: