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

Some file paths match to wrong paths. #251

Open
FANGOD opened this issue Jul 6, 2022 · 1 comment
Open

Some file paths match to wrong paths. #251

FANGOD opened this issue Jul 6, 2022 · 1 comment
Labels
bug Something isn't working priority: 2 (medium) time est: 1 hour We estimate this issue will take ≈1 hour to complete

Comments

@FANGOD
Copy link

FANGOD commented Jul 6, 2022

Like this url: https://www.socinvestigation.com/socgholish-malware-on-the-rise-detection-response/

I got this:

"file_paths": [
            "/all*\") OR (CommandHistory=\"*whoami /all*\")))) OR (ImageFileName=\"*\\\\nltest.exe",
            "/all%'))) or (\"Image\" ilike '%\\nltest.exe",
            "/all'))) or (NewProcessName endswith @'\\nltest.exe",
            "/all`)) OR (process:`*\\nltest.exe",
            "/all*\")) OR (Image=\"*\\\\nltest.exe",
            "/all\"))) or (FolderPath endswith @\"\\nltest.exe",
            "/all*\"))) OR (Image=\"*\\\\nltest.exe",
            "/all'))) || ((Image contains 'nltest.exe",
            "/all*\" OR deviceCustomString1 CONTAINS \"*whoami /all*\"))))) OR (((destinationProcessName ENDSWITH \"*\\\\nltest.exe",
            "/all*)) OR (process_name:*\\\\nltest.exe",
            "/all*\")))) OR (Image=\"*\\nltest.exe"
        ]

I'm not sure if it's from windows_file_path or unix_file_path, but maybe 'windows_file_path' should not allow :*?"<>| (not start)?
\/:*?"<>| These are symbols that filenames are not allowed to contain.

In fact, the blank space has brought too many problems.

@fhightower fhightower added the time est: 1 hour We estimate this issue will take ≈1 hour to complete label Jul 7, 2022
@fhightower
Copy link
Owner

Thanks for reporting this, @FANGOD! As your example demonstrates, file path parsing has been a weak point of this library for a while.

Improving file path parsing isn't my top priority right now, but this is definitely something I want to address in the near future. Thanks again for taking the time to report this bug - it's very helpful!

@fhightower fhightower added the bug Something isn't working label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: 2 (medium) time est: 1 hour We estimate this issue will take ≈1 hour to complete
Projects
None yet
Development

No branches or pull requests

2 participants