-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add Florian Roth's rules #304
Conversation
Signed-off-by: egibs <[email protected]>
The
|
Signed-off-by: egibs <[email protected]>
@@ -58,6 +58,8 @@ func findFilesRecursively(ctx context.Context, root string, c Config) ([]string, | |||
|
|||
// cleanPath removes the temporary directory prefix from the path. | |||
func cleanPath(path string, prefix string) string { | |||
// if the path has "private" prefix, remove it | |||
path = strings.ReplaceAll(path, "/private", "") |
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.
Not sure why this started happening (on MacOS) but the path
had a /private/...
prefix which caused the TrimPrefix
to return the original path unaltered.
/* $command18 = "/mount " ascii prone to FPs */ | ||
|
||
condition: | ||
( filename == "sudoers" or filepath contains "/etc/sudoers.d" ) and |
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.
The filename
and filepath
external variables were present in 12 of the copied rule files so I excluded those from the update.sh
rsync
.
Signed-off-by: egibs <[email protected]>
Signed-off-by: egibs <[email protected]>
Signed-off-by: egibs <[email protected]>
Signed-off-by: egibs <[email protected]>
Signed-off-by: egibs <[email protected]>
Signed-off-by: egibs <[email protected]>
Since Florian is also the guy behind YARAForge, I suspect the best of his rules are already part of bincapz. Is there anything you feel like is missing? |
* Tweak password_finder_mimipenguin rule Signed-off-by: egibs <[email protected]> * Move Finder to extra strings Signed-off-by: egibs <[email protected]> * Remove overlapping strings related to #304 Signed-off-by: egibs <[email protected]> * Update rules/combo/stealer/password.yara Signed-off-by: Evan Gibler <[email protected]> * Add mimipenguin samples Signed-off-by: egibs <[email protected]> * Fix simple results Signed-off-by: egibs <[email protected]> * Tweak rule now that we have samples Signed-off-by: egibs <[email protected]> * Fix tests Signed-off-by: egibs <[email protected]> --------- Signed-off-by: egibs <[email protected]> Signed-off-by: Evan Gibler <[email protected]> Co-authored-by: Thomas Strömberg <[email protected]>
That's a good question. I'll comb through them and see if there's something more targeted we can implement. I'll carry over the path formatting fix into a new PR. |
Closing for now. Cherry-picking specific rules and adding samples for them is more useful than adding all of the rules (some of which may cause false positives or need to be turned off). |
* Tweak password_finder_mimipenguin rule Signed-off-by: egibs <[email protected]> * Move Finder to extra strings Signed-off-by: egibs <[email protected]> * Remove overlapping strings related to chainguard-dev#304 Signed-off-by: egibs <[email protected]> * Update rules/combo/stealer/password.yara Signed-off-by: Evan Gibler <[email protected]> * Add mimipenguin samples Signed-off-by: egibs <[email protected]> * Fix simple results Signed-off-by: egibs <[email protected]> * Tweak rule now that we have samples Signed-off-by: egibs <[email protected]> * Fix tests Signed-off-by: egibs <[email protected]> --------- Signed-off-by: egibs <[email protected]> Signed-off-by: Evan Gibler <[email protected]> Co-authored-by: Thomas Strömberg <[email protected]>
* Tweak password_finder_mimipenguin rule Signed-off-by: egibs <[email protected]> * Move Finder to extra strings Signed-off-by: egibs <[email protected]> * Remove overlapping strings related to chainguard-dev#304 Signed-off-by: egibs <[email protected]> * Update rules/combo/stealer/password.yara Signed-off-by: Evan Gibler <[email protected]> * Add mimipenguin samples Signed-off-by: egibs <[email protected]> * Fix simple results Signed-off-by: egibs <[email protected]> * Tweak rule now that we have samples Signed-off-by: egibs <[email protected]> * Fix tests Signed-off-by: egibs <[email protected]> --------- Signed-off-by: egibs <[email protected]> Signed-off-by: Evan Gibler <[email protected]> Co-authored-by: Thomas Strömberg <[email protected]>
Relates to: #267
Florian Roth's signature-base repository contains a lot of interesting rules.
TBD how much overlap there is with what we currently have but I wanted to get a PR going to add them -- we'll also want to ensure that YaraCI doesn't have any false negatives.
The repository is licensed under DRL 1.1 which allows us to integrate these rules so long as we attribute them appropriately (which will happen automatically via Rule metadata).