capa-rules
capa-rules copied to clipboard
limit use of OS-specifics in .NET rules e.g. "... on Windows"
.NET is cross-platform so we should not us OS-specific references unless we are absolutely sure e.g. #706 where OS-specific types may be used. Instead, we should use "... in .NET" e.g. "read file in .NET" and, in the case of reading a OS-specific file, opt to add a match for "read file in .NET" alongside OS-specific features.
Overall, I think this change results in less user confusion e.g. #706 we see matches for "read file on Windows" when, in fact, we are looking at a file intended to be run on Android via Mono.
Open to more discussion!
Affects these "on Windows" rules that contain .NET features:
- rules/collection/network/get-mac-address-on-windows.yml
- rules/host-interaction/file-system/files/list/enumerate-files-on-windows.yml
- rules/host-interaction/file-system/read/read-file-on-windows.yml
- rules/host-interaction/file-system/write/write-file-on-windows.yml
- rules/host-interaction/process/create/create-process-on-windows.yml
Hi @mike-hunhoff, I would like to work on this issue. Let me know if any additional rules have this issue as well.
Hi @mike-hunhoff, I would like to work on this issue. Let me know if any additional rules have this issue as well.
Great @Abtaha ! @mr-tz included a list of rules above that I believe covers everything. Please reach out if you have any specific questions, we'd be happy to answer them!
The below all contain both .NET and native features (and have ... on linux
equivalents).
Should we split them up into native and .NET (... in .NET
) to clean this up?
- https://github.com/mandiant/capa-rules/blob/master/collection/network/get-mac-address-on-windows.yml
- https://github.com/mandiant/capa-rules/blob/master/host-interaction/file-system/files/list/enumerate-files-on-windows.yml
- https://github.com/mandiant/capa-rules/blob/master/host-interaction/file-system/read/read-file-on-windows.yml
- https://github.com/mandiant/capa-rules/blob/master/host-interaction/file-system/write/write-file-on-windows.yml
- https://github.com/mandiant/capa-rules/blob/master/host-interaction/process/create/create-process-on-windows.yml