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

[sigmac] [splunk] Unescaped . in query #15

Open
phantinuss opened this issue Sep 30, 2022 · 6 comments
Open

[sigmac] [splunk] Unescaped . in query #15

phantinuss opened this issue Sep 30, 2022 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@phantinuss
Copy link

Hi,

I think .s should be escaped in Splunk searches.

I create a query:

sigmac -t splunk -c tools/config/splunk-windows.yml rules/windows/process_creation/proc_creation_win_commandline_path_traversal.yml
((((ParentCommandLine="*cmd*" ParentCommandLine="*/c*" CommandLine="*/../../*")) NOT (((CommandLine="*\\Tasktop\\keycloak\\bin\\/../../jre\\bin\\java*")))))

and paste it to Splunk and start the search and the dots are removed:
image

When I escape the dots with \ the query seems to be functional

@phantinuss
Copy link
Author

Or maybe the / is the character which has to be escaped?

@thomaspatzke
Copy link
Member

Just verified here, same behavior. Agreed, this must be fixed.

@thomaspatzke thomaspatzke self-assigned this Sep 30, 2022
@thomaspatzke thomaspatzke added the bug Something isn't working label Sep 30, 2022
@frack113
Copy link
Member

frack113 commented Oct 1, 2022

Find this https://research.splunk.com/application/dfe55688-82ed-4d24-a21b-ed8f0e0fda99/
search "\/..\/..\/..\/..\/..\/..\/..\/..\/..\/"

@nasbench
Copy link
Member

There is no mention of the dot or forward slash as characters that need to be escaped in an SPL search query. See here

image

@phantinuss
Copy link
Author

As you can see in the screenshot of the first post it is an issue, documented or not. And the solution to escape / will work at least in all the cases I tested. Adding an unneeded but valid escape shouldn't break things. And in some cases (see first screenshot) it is needed.

@thomaspatzke
Copy link
Member

Seem to have disappeared in Splunk 9.x.

@thomaspatzke thomaspatzke transferred this issue from SigmaHQ/sigma Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants