-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Feat: extend syslog clearing rule - add variants & empty-file idioms #5600
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
Merged
nasbench
merged 7 commits into
SigmaHQ:master
from
vl43den:feat/lnx-clear-syslog-coverage
Oct 28, 2025
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
77108b4
Feat: extend syslog clearing rule - add variants & empty-file idioms;…
vl43den b6a6e60
Feat: extend syslog clearing rule - add variants & empty-file idioms
vl43den 22937bb
Feat: extend syslog clearing rule - add variants & empty-file idioms
vl43den 74dac8f
Refine syslog clearing detection rules
nasbench 32bf0c0
Fix formatting in proc_creation_lnx_clear_syslog.yml
nasbench 2658ef5
Merge branch 'master' into feat/lnx-clear-syslog-coverage
swachchhanda000 8fed45a
Merge branch 'master' into feat/lnx-clear-syslog-coverage
nasbench File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
83 changes: 68 additions & 15 deletions
83
rules/linux/process_creation/proc_creation_lnx_clear_syslog.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,88 @@ | ||
| title: Commands to Clear or Remove the Syslog | ||
| title: Syslog Clearing or Removal Via System Utilities | ||
| id: 3fcc9b35-39e4-44c0-a2ad-9e82b6902b31 | ||
| status: test | ||
| description: Detects specific commands commonly used to remove or empty the syslog. Which is often used by attacker as a method to hide their tracks | ||
| description: | | ||
| Detects specific commands commonly used to remove or empty the syslog. Which is a technique often used by attacker as a method to hide their tracks | ||
| references: | ||
| - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1070.002/T1070.002.md | ||
| - https://www.virustotal.com/gui/file/54d60fd58d7fa3475fa123985bfc1594df26da25c1f5fbc7dfdba15876dd8ac5/behavior | ||
| author: Max Altgelt (Nextron Systems), Roberto Rodriguez (Cyb3rWard0g), OTR (Open Threat Research), MSTIC | ||
| date: 2021-10-15 | ||
| modified: 2024-10-14 | ||
| modified: 2025-10-15 | ||
| tags: | ||
| - attack.defense-evasion | ||
| - attack.t1070.002 | ||
| logsource: | ||
| product: linux | ||
| category: process_creation | ||
| detection: | ||
| selection: | ||
| selection_file: | ||
| CommandLine|contains: '/var/log/syslog' | ||
| selection_command_rm: | ||
| # Examples: | ||
| # rm -f /var/log/syslog | ||
| Image|endswith: | ||
| - '/rm' | ||
| CommandLine|contains: | ||
| - ' -r ' | ||
| - ' -f ' | ||
| - ' -rf ' | ||
| - '/var/log/syslog' # We use this to avoid re-writing a separate selection | ||
| selection_command_unlink: | ||
| # Examples: | ||
| # unlink /var/log/syslog | ||
| Image|endswith: '/unlink' | ||
| selection_command_mv: | ||
| # Examples: | ||
| # mv /var/log/syslog | ||
| Image|endswith: '/mv' | ||
| selection_command_truncate: | ||
| # Examples: | ||
| # truncate --size 0 /var/log/syslog | ||
| Image|endswith: '/truncate' | ||
| CommandLine|contains|all: | ||
| - '0 ' | ||
| - '/var/log/syslog' # We use this to avoid re-writing a separate selection | ||
| CommandLine|contains: | ||
| - '-s ' | ||
| - '-c ' | ||
| - '--size' | ||
| selection_command_ln: | ||
| # Examples: | ||
| # ln -sfn /dev/null /var/log/syslog | ||
| Image|endswith: '/ln' | ||
| CommandLine|contains|all: | ||
| - '/dev/null ' | ||
| - '/var/log/syslog' # We use this to avoid re-writing a separate selection | ||
| CommandLine|contains: | ||
| - '-sf ' | ||
| - '-sfn ' | ||
| - '-sfT ' | ||
|
swachchhanda000 marked this conversation as resolved.
|
||
| selection_command_cp: | ||
| # Examples: | ||
| # cp /dev/null /var/log/syslog | ||
| Image|endswith: '/cp' | ||
| CommandLine|contains: '/dev/null' | ||
|
swachchhanda000 marked this conversation as resolved.
|
||
| selection_command_shred: | ||
| # Examples: | ||
| # shred -u /var/log/syslog | ||
| Image|endswith: '/shred' | ||
| CommandLine|contains: '-u ' | ||
|
swachchhanda000 marked this conversation as resolved.
|
||
| selection_unique_other: | ||
| CommandLine|contains: | ||
| - 'rm /var/log/syslog' | ||
| - 'rm -r /var/log/syslog' | ||
| - 'rm -f /var/log/syslog' | ||
| - 'rm -rf /var/log/syslog' | ||
| - 'unlink /var/log/syslog' | ||
| - 'unlink -r /var/log/syslog' | ||
| - 'unlink -f /var/log/syslog' | ||
| - 'unlink -rf /var/log/syslog' | ||
| - 'mv /var/log/syslog' | ||
| - ' >/var/log/syslog' | ||
| - ' > /var/log/syslog' | ||
| - ' >/var/log/syslog' | ||
| - ' >| /var/log/syslog' # redirection empties w spacing, noclobber | ||
| - ': > /var/log/syslog' | ||
| - ':> /var/log/syslog' | ||
| - ':>/var/log/syslog' | ||
| - '>|/var/log/syslog' | ||
| selection_unique_journalctl: | ||
| CommandLine|contains: | ||
| - 'journalctl --vacuum' | ||
| condition: selection | ||
| - 'journalctl --rotate' # archives current journal files and creates new empty ones | ||
| condition: (selection_file and 1 of selection_command_*) or 1 of selection_unique_* | ||
| falsepositives: | ||
| - Log rotation. | ||
| - Maintenance. | ||
| level: high | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.