Skip to content
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

More ps script policy test exclusion #207

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 11_file_create/exclude_psscriptpolicytest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<TargetFilename condition="contains all">C:\Windows\Temp;__PSScriptPolicyTest;.ps1</TargetFilename>
<User condition="is">NT AUTHORITY\SYSTEM</User>
</Rule>
<Rule groupRelation="and">
<Image condition="is">C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Windows\Temp;__PSScriptPolicyTest;.ps1</TargetFilename>
<User condition="is">NT AUTHORITY\SYSTEM</User>
</Rule>
</FileCreate>
</RuleGroup>
</EventFiltering>
Expand Down
16 changes: 16 additions & 0 deletions 11_file_create/exclude_psscriptpolicytest_user.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Sysmon schemaversion="4.30">
<EventFiltering>
<RuleGroup name="" groupRelation="or">
<FileCreate onmatch="exclude">
<Rule groupRelation="and">
<Image condition="is">C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Users\;\AppData\Local\Temp\;__PSScriptPolicyTest;.ps1</TargetFilename>
</Rule>
<Rule groupRelation="and">
<Image condition="is">C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Users\;\AppData\Local\Temp\;__PSScriptPolicyTest;.ps1</TargetFilename>
</Rule>
</FileCreate>
</RuleGroup>
</EventFiltering>
</Sysmon>
22 changes: 22 additions & 0 deletions 23_file_delete/exclude_psscriptpolicytest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Sysmon schemaversion="4.60">
<EventFiltering>
<RuleGroup name="" groupRelation="or">
<FileDelete onmatch="exclude">
<Rule groupRelation="and">
<Image condition="is">C:\Windows\system32\wsmprovhost.exe</Image>
<TargetFilename condition="contains all">C:\Users\;\AppData\Local\Temp;__PSScriptPolicyTest;.ps1</TargetFilename>
</Rule>
<Rule groupRelation="and">
<Image condition="is">C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Windows\Temp;__PSScriptPolicyTest;.ps1</TargetFilename>
<User condition="is">NT AUTHORITY\SYSTEM</User>
</Rule>
<Rule groupRelation="and">
<Image condition="is">C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Windows\Temp;__PSScriptPolicyTest;.ps1</TargetFilename>
<User condition="is">NT AUTHORITY\SYSTEM</User>
</Rule>
</FileDelete>
</RuleGroup>
</EventFiltering>
</Sysmon>
16 changes: 16 additions & 0 deletions 23_file_delete/exclude_psscriptpolicytest_user.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Sysmon schemaversion="4.60">
<EventFiltering>
<RuleGroup name="" groupRelation="or">
<FileDelete onmatch="exclude">
<Rule groupRelation="and">
<Image condition="is">C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Users\;\AppData\Local\Temp\;__PSScriptPolicyTest;.ps1</TargetFilename>
</Rule>
<Rule groupRelation="and">
<Image condition="is">C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Users\;\AppData\Local\Temp\;__PSScriptPolicyTest;.ps1</TargetFilename>
</Rule>
</FileDelete>
</RuleGroup>
</EventFiltering>
</Sysmon>
22 changes: 22 additions & 0 deletions 26_file_delete_detected/exclude_psscriptpolicytest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Sysmon schemaversion="4.60">
<EventFiltering>
<RuleGroup name="" groupRelation="or">
<FileDeleteDetected onmatch="exclude">
<Rule groupRelation="and">
<Image condition="is">C:\Windows\system32\wsmprovhost.exe</Image>
<TargetFilename condition="contains all">C:\Users\;\AppData\Local\Temp;__PSScriptPolicyTest;.ps1</TargetFilename>
</Rule>
<Rule groupRelation="and">
<Image condition="is">C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Windows\Temp;__PSScriptPolicyTest;.ps1</TargetFilename>
<User condition="is">NT AUTHORITY\SYSTEM</User>
</Rule>
<Rule groupRelation="and">
<Image condition="is">C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Windows\Temp;__PSScriptPolicyTest;.ps1</TargetFilename>
<User condition="is">NT AUTHORITY\SYSTEM</User>
</Rule>
</FileDeleteDetected>
</RuleGroup>
</EventFiltering>
</Sysmon>
16 changes: 16 additions & 0 deletions 26_file_delete_detected/exclude_psscriptpolicytest_user.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Sysmon schemaversion="4.60">
<EventFiltering>
<RuleGroup name="" groupRelation="or">
<FileDeleteDetected onmatch="exclude">
<Rule groupRelation="and">
<Image condition="is">C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Users\;\AppData\Local\Temp\;__PSScriptPolicyTest;.ps1</TargetFilename>
</Rule>
<Rule groupRelation="and">
<Image condition="is">C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe</Image>
<TargetFilename condition="contains all">C:\Users\;\AppData\Local\Temp\;__PSScriptPolicyTest;.ps1</TargetFilename>
</Rule>
</FileDeleteDetected>
</RuleGroup>
</EventFiltering>
</Sysmon>