Repository navigation
[New Rule] Timestomping using SetFile #7194
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
Open
litemars
wants to merge
10
commits into
main
Choose a base branch
from
new_rule/timestomp_with_setfile.toml
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+63
−0
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8fb20db
adding timestomp rule for macOS
litemars 788a244
Update defense evasion rule metadata
litemars 0e09a84
transform to BBR
litemars 0af9aa2
Merge branch 'main' into new_rule/timestomp_with_setfile.toml
litemars fd1fbe8
Clean up timestomping rule documentation
litemars 0f9ccdc
Change creation_date to 2026/11/24
litemars e73e5fe
Refine description of SetFile usage on macOS
litemars 05dacfb
Update rules_building_block/defense_evasion_timestomp_setfile.toml
litemars 17488cd
Update rules_building_block/defense_evasion_timestomp_setfile.toml
litemars d4666a3
Update rules_building_block/defense_evasion_timestomp_setfile.toml
litemars 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
63 changes: 63 additions & 0 deletions
63
rules_building_block/defense_evasion_timestomp_setfile.toml
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 | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,63 @@ | ||||||
| [metadata] | ||||||
| creation_date = "2026/11/24" | ||||||
| integration = ["endpoint"] | ||||||
| maturity = "production" | ||||||
| updated_date = "2026/11/24" | ||||||
|
|
||||||
| [rule] | ||||||
| author = ["Elastic"] | ||||||
| building_block_type = "default" | ||||||
| description = """ | ||||||
| Identifies the use of SetFile on macOS to change a file's creation or modification timestamp. SetFile, included with | ||||||
| Xcode Command Line Tools, explicitly sets the creation date with -d and the modification date with -m. Adversaries use it to | ||||||
| timestomp files so they blend in with legitimate content and hinder forensic analysis. | ||||||
| """ | ||||||
| from = "now-119m" | ||||||
| index = ["logs-endpoint.events.process-*"] | ||||||
| interval = "60m" | ||||||
| language = "eql" | ||||||
| license = "Elastic License v2" | ||||||
| name = "Timestomping using SetFile" | ||||||
|
|
||||||
| references = ["https://ss64.com/mac/setfile.html"] | ||||||
| risk_score = 21 | ||||||
| rule_id = "d093c7c1-d6cb-4277-b2c9-74477b393b7f" | ||||||
|
|
||||||
| severity = "low" | ||||||
| tags = [ | ||||||
| "Domain: Endpoint", | ||||||
| "OS: macOS", | ||||||
| "Use Case: Threat Detection", | ||||||
| "Tactic: Defense Evasion", | ||||||
| "Rule Type: BBR", | ||||||
| "Data Source: Elastic Defend", | ||||||
| "Rule Type: Event Correlation (EQL)", | ||||||
| "Platform: macOS", | ||||||
| ] | ||||||
| timestamp_override = "event.ingested" | ||||||
| type = "eql" | ||||||
|
|
||||||
| query = ''' | ||||||
| process where host.os.type == "macos" and event.type == "start" and event.action == "exec" and | ||||||
| process.name == "SetFile" and process.args in ("-d", "-m") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Use case insensitive ":" |
||||||
| ''' | ||||||
|
|
||||||
|
|
||||||
| [[rule.threat]] | ||||||
| framework = "MITRE ATT&CK" | ||||||
| [[rule.threat.technique]] | ||||||
| id = "T1070" | ||||||
| name = "Indicator Removal" | ||||||
| reference = "https://attack.mitre.org/techniques/T1070/" | ||||||
| [[rule.threat.technique.subtechnique]] | ||||||
| id = "T1070.006" | ||||||
| name = "Timestomp" | ||||||
| reference = "https://attack.mitre.org/techniques/T1070/006/" | ||||||
|
|
||||||
|
|
||||||
|
|
||||||
| [rule.threat.tactic] | ||||||
| id = "TA0005" | ||||||
| name = "Defense Evasion" | ||||||
| reference = "https://attack.mitre.org/tactics/TA0005/" | ||||||
|
|
||||||
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.