Skip to content

Commit 25f23ef

Browse files
w0rk3rSamirbous
andauthored
Apply suggestions from code review
Co-authored-by: Samirbous <[email protected]>
1 parent 41acd2b commit 25f23ef

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

rules/windows/persistence_ms_office_addins_file.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ file where host.os.type == "windows" and event.type != "deletion" and
8484
"C:\\Users\\*\\AppData\\Roaming\\Microsoft\\Excel\\XLSTART\\*",
8585
8686
/* Crowdstrike specific condition as it uses NT Object paths */
87-
"\\Device\\HarddiskVolume?\\Users\\*\\AppData\\Roaming\\Microsoft\\Word\\Startup\\*",
88-
"\\Device\\HarddiskVolume?\\Users\\*\\AppData\\Roaming\\Microsoft\\AddIns\\*",
89-
"\\Device\\HarddiskVolume?\\Users\\*\\AppData\\Roaming\\Microsoft\\Excel\\XLSTART\\*"
87+
"\\Device\\HarddiskVolume*\\Users\\*\\AppData\\Roaming\\Microsoft\\Word\\Startup\\*",
88+
"\\Device\\HarddiskVolume*\\Users\\*\\AppData\\Roaming\\Microsoft\\AddIns\\*",
89+
"\\Device\\HarddiskVolume*\\Users\\*\\AppData\\Roaming\\Microsoft\\Excel\\XLSTART\\*"
9090
)
9191
'''
9292

rules/windows/persistence_ms_outlook_vba_template.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type = "eql"
8383
query = '''
8484
file where host.os.type == "windows" and event.type != "deletion" and
8585
file.name : "VbaProject.OTM" and
86-
file.path : "*\\AppData\\Roaming\\Microsoft\\Outlook\\VbaProject.OTM"
86+
file.path : ("?:\\Users\\*\\AppData\\Roaming\\Microsoft\\Outlook\\VbaProject.OTM", "\\Device\\HarddiskVolume*\\Users\\*\\AppData\\Roaming\\Microsoft\\Outlook\\VbaProject.OTM")
8787
'''
8888

8989

rules/windows/persistence_powershell_profiles.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,12 @@ type = "eql"
130130
query = '''
131131
file where host.os.type == "windows" and event.type != "deletion" and
132132
file.name : ("profile.ps1", "Microsoft.Powershell_profile.ps1") and
133-
file.path : ("*\\Documents\\WindowsPowerShell\\*",
134-
"*\\Documents\\PowerShell\\*",
135-
"*\\Windows\\System32\\WindowsPowerShell\\*")
133+
file.path : ("?:\\Users\\*\\Documents\\WindowsPowerShell\\*.ps1",
134+
"?:\\Users\\*\\Documents\\PowerShell\\*.ps1",
135+
"?:\\Windows\\System32\\WindowsPowerShell\\*.ps1",
136+
"\\Device\\HarddiskVolume*\\Users\\*\\Documents\\WindowsPowerShell\\*.ps1",
137+
"\\Device\\HarddiskVolume*\\Users\\*\\Documents\\PowerShell\\*.ps1",
138+
"\\Device\\HarddiskVolume*\\Windows\\System32\\WindowsPowerShell\\*.ps1")
136139
'''
137140

138141

0 commit comments

Comments
 (0)