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

[Request] Add Verbose Dev-Logging #198

Open
import-pandas-as-numpy opened this issue Nov 29, 2024 · 5 comments
Open

[Request] Add Verbose Dev-Logging #198

import-pandas-as-numpy opened this issue Nov 29, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@import-pandas-as-numpy
Copy link

import-pandas-as-numpy commented Nov 29, 2024

I have a bug to report in Chainsaw, however it is transient and difficult to reproduce; often manifesting when parsing ~5GB+ event logs (which means testing data is also difficult to supply.)

I would appreciate a way to gain insight into where this may be hanging so I can raise a more comprehensive bug report, as at the moment I can simply state that large event logs cause Chainsaw to occasionally simply not continue parsing.

@reece394
Copy link
Contributor

I can confirm I have been seeing similar issues but it happens randomly. I found that reducing the number of rules that are put into memory helps reduce this though particularly sliming down the sigma rules folder to just windows rules

@alexkornitzer
Copy link
Collaborator

That is very reasonable i'll try an action that this weekend.

I assume from the comments its hanging and not crashing?

@alexkornitzer alexkornitzer added the enhancement New feature or request label Dec 2, 2024
@reece394
Copy link
Contributor

reece394 commented Dec 2, 2024

Yeah it gets to a certain point and just hangs. Sometimes rerunning it gets it to complete the second time no issues which makes it more annoying to troubleshoot.

I will put this in here as well just in case. I have noticed that if you run an EDR product/ Antivirus sometimes it reads the rules in memory and likely treats the behaviour as malicious and that can cause a hang. When I whitelisted the binary it reduced it but not completely eliminated the problem so it seems multifaceted.

@alexkornitzer
Copy link
Collaborator

Ta for the extra info, i'll wire chainsaw up with -v so then when it happens again we can get some better output. I'll litter debug prints where I think they are needed and we can refine as required.

alexkornitzer added a commit that referenced this issue Dec 22, 2024
Chainsaw now supports the ability to handle `-v` and `-vv` where the
former will print debug message where set and the latter will print
trace messages where set. The current use of debug and trace is not
exhaustive as its mainly geared to track down the linked issue, and I am
being a bit lazy.
@alexkornitzer
Copy link
Collaborator

Finally got around to adding in logging where I hope will allow us to get to the bottom of the above. If you manage to replicate please try with -v or -vv if we can't work it out with that I will add more logging in. Sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants