-
Notifications
You must be signed in to change notification settings - Fork 40
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
adding an event of deleting bash history #106
Conversation
Signed-off-by: h4l0gen <[email protected]>
Signed-off-by: Kapil Sharma <[email protected]>
Signed-off-by: Kapil Sharma <[email protected]>
@FedeDP as expected this rule iss triggered in above terminal when attempted by event-generator in terminal below. |
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.
I don't think we should remove the user bash_history file :/
first of all this CANNOT be accepted by any user, moreover this is not idempotent since the second time one runs it it will fail to generate a Falco event because the file is not present anymore.
The rule (https://github.com/falcosecurity/rules/blob/main/rules/falco-incubating_rules.yaml#L1017) just checks that either we rename or remove a file whose name ends in ash_history
, therefore there is no need to actually delete user bash_history, we can just create a file named ash_history
anywhere (in a temp folder) and then remove it.
@FedeDP I was thinking about renaming .bash_history file but that will create problem of |
Signed-off-by: Kapil Sharma <[email protected]>
I changed event as per @FedeDP suggestions. And this event triggered related rule. |
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.
Left a suggestion.
Also, is this still wip?
Co-authored-by: Federico Di Pierro <[email protected]> Signed-off-by: Kapil Sharma <[email protected]>
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.
/approve
LGTM label has been added. Git tree hash: 4b3efb2b121100ab9171a77128af265398739d2e
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, h4l0gen The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area events
What this PR does / why we need it:
this event will trigger rule Delete_or_rename_shell_history
Which issue(s) this PR fixes:
Fixes #105
Special notes for your reviewer: