-
Notifications
You must be signed in to change notification settings - Fork 603
[New] Command Line Obfuscation via Whitespace Padding #4860
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
Conversation
Samirbous
commented
Jun 30, 2025
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
Starting the rule tests ... |
Starting the rule tests ... |
Starting the rule tests ... |
…l to defense_evasion_whitespace_padding_command_line.toml
Starting the rule tests ... |
rules/cross-platform/defense_evasion_whitespace_padding_command_line.toml
Show resolved
Hide resolved
@@ -0,0 +1,128 @@ | |||
[metadata] | |||
creation_date = "2025/06/30" | |||
integration = ["endpoint", "system", "windows", "auditd_manager", "m365_defender", "crowdstrike"] |
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.
s1 maybe? cc @w0rk3r
rules/cross-platform/defense_evasion_whitespace_padding_command_line.toml
Outdated
Show resolved
Hide resolved
type = "esql" | ||
|
||
query = ''' | ||
FROM logs-* metadata _id, _version, _index |
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.
We may want to limit the indexes here, logs-*
would probably be expensive as it will search for all integrations
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.
if the integration is not enabled it may error with Unknown Index
, listing all the integration indexes may result also in perf hit.
This supersedes the old deprecated rule #2315 |
…d_line.toml Co-authored-by: Ruben Groenewoud <[email protected]>
…d_line.toml Co-authored-by: Ruben Groenewoud <[email protected]>
⛔️ Test failed Results
|
⛔️ Test failed Results
|
⛔️ Test failed Results
|
⛔️ Test failed Results
|
⛔️ Test failed Results
|
FROM logs-* metadata _id, _version, _index | ||
| where event.category == "process" and event.type == "start" and event.action != "fork" | ||
// more than 100 spaces in process.command_line | ||
| eval multi_spaces = LOCATE(process.command_line, space(100)) |
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.
Sorry I missed this, should have been Esql.process_command_line_locate
or Esql.process_command_line_white_spaces
. This field will not get picked up in telemetry as multi_spaces
.
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.
we don't need it in telem 👍