File Deletion
A Sigma rule for process creation on Linux, by Ömer Günal, oscd.community.
informational 1 ATT&CK technique 3 programs it names 15 everyday examples trip it
What it looks for
detection:
selection:
Image|endswith:
- '/rm'
- '/shred'
- '/unlink'
condition: selection
The rule’s detection, its selections and fields in order of name. The whole rule, with its references and false positives, is on SigmaHQ, by Ömer Günal, oscd.community, under the Detection Rule License 1.1. CmdID evaluates it on a command line alone: a test on what a command line cannot show, such as the parent process or the user, is not met.
Command lines that trip it
Overwrite a file and show progress on the screen on the page for shred
shred --verbose path/to/fileIdentifyOverwrite a file, leaving zeros instead of random data on the page for shred
shred --zero path/to/fileIdentifyTest your microphone by recording a 5 second sample and playing it back on the page for arecord
arecord --duration 5 test-mic.wav && aplay test-mic.wav && rm test-mic.wavIdentify[Interactive] Remove a torrent from the daemon on the page for deluge-console
rm torrent_idIdentifyReset apps usage count (default cache directory: $XDG_CACHE_HOME/fuzzel) on the page for fuzzel
rm --verbose $HOME/.cache/fuzzelIdentifyMark bank.csv as all new, as if not yet imported on the page for hledger-import
rm --force .latest.bank.csvIdentify[Interactive] Remove a partition in interactive mode on the page for parted.interactive
rm /dev/sdXNIdentifyRemove specific files ignoring nonexistent ones on the page for rm
rm --force path/to/file1 path/to/file2 ...IdentifyRemove specific files interactively prompting before each removal on the page for rm
rm --interactive path/to/file1 path/to/file2 ...IdentifyRemove specific files printing info about each removal on the page for rm
rm --verbose path/to/file1 path/to/file2 ...IdentifyAnd 3 more examples on CmdID’s program pages.
The commands LOLBAS or GTFOBins documents for shred trip it too: each is on its program’s page, read by CmdID.