forked from T0pCyber/hawk
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to sus inbox rule detection
- Loading branch information
Showing
4 changed files
with
41 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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,25 @@ | ||
<# | ||
.SYNOPSIS | ||
Determines if an inbox rule is potentially suspicious | ||
.DESCRIPTION | ||
Determines if an inbox rule is potentially suspicious | ||
.PARAMETER InboxRule | ||
The inbox rule data | ||
#> | ||
Function Compare-SusInboxRule { | ||
param | ||
( | ||
[Parameter(Mandatory = $true)] | ||
[array]$InboxRule | ||
) | ||
|
||
$investigate = $false | ||
if ((($InboxRule.DeleteMessage -eq $true) -and ($InboxRule.MarkAsRead -eq $true)) -or ($InboxRule.DeleteMessage -eq $true)) { $Investigate = $true } | ||
if (!([string]::IsNullOrEmpty($InboxRule.ForwardAsAttachmentTo))) { $Investigate = $true } | ||
if (!([string]::IsNullOrEmpty($InboxRule.ForwardTo))) { $Investigate = $true } | ||
if (!([string]::IsNullOrEmpty($InboxRule.RedirectTo))) { $Investigate = $true} | ||
if ($InboxRule.MoveToFolder -in "Archive", "Conversation History", "RSS Subscription") { $Investigate = $true } | ||
if ($InboxRule.RuleName -like '*.*' -or $InboxRule.RuleName -like '*,*' -or $InboxRule.RuleName -like '*"*'){ $Investigate = $true } | ||
|
||
return $Investigate | ||
} |