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

Remove ending spaces from selection in posh_ps_susp_invocation_generic.yml #5034

Open
BlakeHensleyy opened this issue Oct 4, 2024 · 1 comment
Assignees
Labels
False-Positive Issue reporting a false positive with one of the rules

Comments

@BlakeHensleyy
Copy link

Rule UUID

ed965133-513f-41d9-a441-e38076a0798f

Example EventLog

ScriptBlockText: powershell.exe -EncodedCommand aGVsbG8gd29ybGQ= -windowstyle hidden -noninteractive

Description

This is more of a false negative because the sigma rule will not detect -noninteractive or -w hidden being used at the end of the command.

To correct this false negative, the detection should be the following with selection_hidden and selection_noninteractive are updated to remove the space at the end of the selections:

detection:
    selection_encoded:
        ScriptBlockText|contains:
            - ' -enc '
            - ' -EncodedCommand '
            - ' -ec '
    selection_hidden:
        ScriptBlockText|contains:
            - ' -w hidden'
            - ' -window hidden'
            - ' -windowstyle hidden'
            - ' -w 1'
    selection_noninteractive:
        ScriptBlockText|contains:
            - ' -noni'
            - ' -noninteractive'
    condition: all of selection*

selection_encoded should not be updated without a space at the end because it requires the option input is not included in the selection.

@BlakeHensleyy BlakeHensleyy added the False-Positive Issue reporting a false positive with one of the rules label Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

Welcome @BlakeHensleyy 👋

It looks like this is your first issue on the Sigma rules repository!

The following repository accepts issues related to false positives or 'rule ideas'.

If you're reporting an issue related to the pySigma library please consider submitting it here

If you're reporting an issue related to the deprecated sigmac library please consider submitting it here

Thanks for taking the time to open this issue, and welcome to the Sigma community! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
False-Positive Issue reporting a false positive with one of the rules
Projects
None yet
Development

No branches or pull requests

2 participants