John Lamb
08/14/2024, 9:40 PMMike Myers
08/15/2024, 5:13 AM0
value means there is a executable file path listed for the process, but no file now exists at that path. A value of -1
means it cannot be determined because there is no path available to checkJohn Lamb
08/15/2024, 1:43 PMJohn Lamb
08/15/2024, 1:44 PMMike Myers
08/15/2024, 4:31 PMThomas Stromberg
08/27/2024, 1:31 AMon_disk
to detect malware that delete's itself.
It unfortunately does trigger in cases when programs are upgraded and located at a new path - homebrew for example. Here's the query we where we use `on_disk`: https://github.com/chainguard-dev/osquery-defense-kit/blob/main/detection/evasion/parent-missing-from-disk-macos.sql
It's worth noting that on macOS, on_disk
does not distinguish between "is the original executable on disk" and "does some file exist at the same path the executable was once located at". It could be a 0-byte file for all it cares.
That said, I haven't seen any examples of malware that replaces itself with a 0-byte file or other arbitrary content yet.Mike Myers
08/27/2024, 5:27 PMJohn Lamb
09/03/2024, 11:49 PM