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

Address Kibana false positives #391

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

egibs
Copy link
Member

@egibs egibs commented Jul 30, 2024

This PR addresses the false positives seen here.

Most of the false positives were from a third-party rule and two were from our rules. One of the latter failures was due to JavaScript code failing a PHP rule and the other was failing due to the strings matching a Kibana security rule.

I've added both of the latter two findings as samples for better coverage.

Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
@egibs egibs requested a review from hectorj2f July 30, 2024 19:52
@@ -116,8 +116,13 @@ rule php_eval_gzinflate_base64_backdoor : critical {
$f_gzinflate = "gzinflate("
$f_base64_decode = "base64_decode"

$not_php = "PHP_FLOAT_DIG" fullword
$not_js = " ?? "
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also do this for the base64_python_functions rule where JS code was being evaluated in the context of Python code.

}

rule find_generic_password : high {
meta:
description = "Looks up a password from the Keychain"
strings:
$ref = /find-generic-passsword[ \-\w\']{0,32}/
$ctkcard = "/System/Library/Frameworks/CryptoTokenKit.framework/ctkcard"
$not_ctkcard = "/System/Library/Frameworks/CryptoTokenKit.framework/ctkcard"
$not_elastic_author = { 22 61 75 74 68 6F 72 22 3A 20 5B 0A 20 20 20 20 22 45 6C 61 73 74 69 63 22 0A 20 20 5D }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"author": [
    "Elastic"
  ]

@egibs egibs merged commit 44b5a48 into chainguard-dev:main Jul 30, 2024
6 checks passed
@egibs egibs deleted the address-kibana-false-positives branch July 30, 2024 20:00
egibs added a commit to egibs/malcontent that referenced this pull request Aug 5, 2024
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
egibs added a commit to egibs/malcontent that referenced this pull request Sep 25, 2024
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants