-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Update: Suspicious Copy From or To System Directory #5482
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
base: master
Are you sure you want to change the base?
Update: Suspicious Copy From or To System Directory #5482
Conversation
- '\System32' | ||
- '\SysWOW64' | ||
- '\WinSxS' | ||
condition: 1 of selection_* and target | ||
filter_main_cmd: | ||
CommandLine|endswith: | ||
- 'C:\Windows\System32\xcopy.exe' | ||
- 'C:\Windows\SysWOW64\xcopy.exe' | ||
- 'C:\Windows\System32\robocopy.exe' | ||
- 'C:\Windows\SysWOW64\robocopy.exe' | ||
condition: 1 of selection_* and target and not 1 of filter_main_* | ||
falsepositives: |
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.
- '\System32' | |
- '\SysWOW64' | |
- '\WinSxS' | |
condition: 1 of selection_* and target | |
filter_main_cmd: | |
CommandLine|endswith: | |
- 'C:\Windows\System32\xcopy.exe' | |
- 'C:\Windows\SysWOW64\xcopy.exe' | |
- 'C:\Windows\System32\robocopy.exe' | |
- 'C:\Windows\SysWOW64\robocopy.exe' | |
condition: 1 of selection_* and target and not 1 of filter_main_* | |
falsepositives: | |
- ' C:\Windows\System32' | |
- ' C:\Windows\SysWOW64' | |
- ' C:\Windows\WinSxS' | |
- ' "C:\Windows\System32' | |
- ' "C:\Windows\SysWOW64' | |
- ' "C:\Windows\WinSxS' | |
- " 'C:\Windows\System32" | |
- " 'C:\Windows\SysWOW64" | |
- " 'C:\Windows\WinSxS" | |
condition: 1 of selection_* and target | |
falsepositives: |
Even though I have added the filter, it would still have fp on legitimate cases like C:\Windows\System32\xcopy.exe C:\Test C:\Test\A.
So, I propose we add preceding space with the full paths. This way, the filter more accurately matches only the intended directory references and avoids executables being run from those locations (e.g., cmd.exe, robocopy.exe, etc.).
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.
I like this approach much better.
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.
The line 53-36 caused parsing issue, thus I had to use regex as last resort
- '\System32' | ||
- '\SysWOW64' | ||
- '\WinSxS' | ||
CommandLine|re: (?i)\s[\s'"]?C:\\Windows\\((System32|SysWOW64|WinSxS)) |
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.
CommandLine|re: (?i)\s[\s'"]?C:\\Windows\\((System32|SysWOW64|WinSxS)) | |
CommandLine|re|i: \s['"]?C:\\Windows\\(System32|SysWOW64|WinSxS) |
- see https://github.com/SigmaHQ/sigma-specification/blob/main/appendix/sigma-modifiers-appendix.md#regular-expression
- I don't see why the beginning needs to match
\s\s?
- remove redundant grouping
@@ -13,7 +13,7 @@ references: | |||
- https://thedfirreport.com/2023/08/28/html-smuggling-leads-to-domain-wide-ransomware/ | |||
author: Florian Roth (Nextron Systems), Markus Neis, Tim Shelton (HAWK.IO), Nasreddine Bencherchali (Nextron Systems) | |||
date: 2020-07-03 | |||
modified: 2023-08-29 | |||
modified: 2025-06-16 |
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.
modified: 2025-06-16 | |
modified: 2025-07-28 |
author: Nasreddine Bencherchali (Nextron Systems) | ||
date: 2023-08-29 | ||
date: 2025-06-16 |
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.
date: 2025-06-16 | |
date: 2023-08-29 | |
modified: 2025-07-28 |
Summary of the Pull Request
Skeleton Spider abused the xcopy utility to copy ie4unit.exe from system32 to %AppData%\Microsoft\ to execute malicious inf file.
Changelog
fix: Suspicious Copy From or To System Directory - add FP filter
update: LOL-Binary Copied From System Directory - add new LOLBIN
Example Log Event
Fixed Issues
SigmaHQ Rule Creation Conventions