-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from maester365/merill-cisa
Updated CISA help doc and split risk into two
- Loading branch information
Showing
19 changed files
with
166 additions
and
89 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
20 changes: 20 additions & 0 deletions
20
powershell/public/cisa/entra/Test-MtCisaBlockHighRiskSignIn.md
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,20 @@ | ||
Sign-ins detected as high risk SHALL be blocked. | ||
|
||
Rationale: Blocking high-risk sign ins may prevent compromised sign-ins from accessing the tenant. This prevents compromised sign-ins from accessing the tenant. | ||
|
||
#### Remediation action: | ||
|
||
Create a Conditional Access policy blocking sign-ins determined high risk by the Identity Protection service. Configure the following policy settings in the new Conditional Access policy as per the values below: | ||
|
||
* Users > Include > **All users** | ||
* Target resources > Cloud apps > **All cloud apps** | ||
* Conditions > Sign-in risk > **High** | ||
* Access controls > Grant > **Block Access** | ||
|
||
#### Related links | ||
|
||
* [CISA Risk Based Policies - MS.AAD.2.3](https://github.com/cisagov/ScubaGear/blob/main/PowerShell/ScubaGear/baselines/aad.md#msaad23v1) | ||
* [CISA ScubaGear Rego Reference](https://github.com/cisagov/ScubaGear/blob/main/PowerShell/ScubaGear/Rego/AADConfig.rego#L138) | ||
|
||
<!--- Results ---> | ||
%TestResult% |
39 changes: 39 additions & 0 deletions
39
powershell/public/cisa/entra/Test-MtCisaBlockHighRiskSignIn.ps1
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,39 @@ | ||
<# | ||
.SYNOPSIS | ||
Checks if Sign-In Risk Based Policies - MS.AAD.2.3 is set to 'blocked' | ||
.DESCRIPTION | ||
Sign-ins detected as high risk SHALL be blocked. | ||
.EXAMPLE | ||
Test-MtCisaBlockHighRiskSignIn | ||
Returns true if at least one policy is set to block high risk sign-ins. | ||
#> | ||
|
||
Function Test-MtCisaBlockHighRiskSignIn { | ||
[CmdletBinding()] | ||
[OutputType([bool])] | ||
param() | ||
|
||
$result = Get-MtConditionalAccessPolicy | ||
|
||
$blockPolicies = $result | Where-Object {` | ||
$_.state -eq "enabled" -and ` | ||
$_.grantControls.builtInControls -contains "block" -and ` | ||
$_.conditions.applications.includeApplications -contains "all" -and ` | ||
$_.conditions.signInRiskLevels -contains "high" -and ` | ||
$_.conditions.users.includeUsers -contains "All" } | ||
|
||
$testResult = $blockPolicies.Count -ge 1 | ||
|
||
if ($testResult) { | ||
$testResultMarkdown = "Well done. Your tenant has one or more policies that block high risk sign-ins:`n`n%TestResult%" | ||
} else { | ||
$testResultMarkdown = "Your tenant does not have any conditional access policies that block high risk sign-ins." | ||
} | ||
Add-MtTestResultDetail -Result $testResultMarkdown -GraphObjectType ConditionalAccess -GraphObjects $blockPolicies | ||
|
||
return $testResult | ||
} |
20 changes: 20 additions & 0 deletions
20
powershell/public/cisa/entra/Test-MtCisaBlockHighRiskUser.md
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,20 @@ | ||
Users detected as high risk SHALL be blocked. | ||
|
||
Rationale: Blocking high-risk users may prevent compromised accounts from accessing the tenant. This prevents compromised accounts from accessing the tenant. | ||
|
||
#### Remediation action: | ||
|
||
Create a conditional access policy blocking users categorized as high risk by the Identity Protection service. Configure the following policy settings in the new conditional access policy as per the values below: | ||
|
||
* Users > Include > **All users** | ||
* Target resources > Cloud apps > **All cloud apps** | ||
* Conditions > User risk > **High** | ||
* Access controls > Grant > **Block Access** | ||
|
||
#### Related links | ||
|
||
* [CISA Risk Based Policies - MS.AAD.2.1](https://github.com/cisagov/ScubaGear/blob/main/PowerShell/ScubaGear/baselines/aad.md#msaad21v1) | ||
* [CISA ScubaGear Rego Reference](https://github.com/cisagov/ScubaGear/blob/main/PowerShell/ScubaGear/Rego/AADConfig.rego#L85) | ||
|
||
<!--- Results ---> | ||
%TestResult% |
39 changes: 39 additions & 0 deletions
39
powershell/public/cisa/entra/Test-MtCisaBlockHighRiskUser.ps1
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,39 @@ | ||
<# | ||
.SYNOPSIS | ||
Checks if User Risk Based Policies - MS.AAD.2.1 is set to 'blocked' | ||
.DESCRIPTION | ||
Users detected as high risk SHALL be blocked. | ||
.EXAMPLE | ||
Test-MtCisaBlockHighRiskUser | ||
Returns true if at least one policy is set to block high risk users. | ||
#> | ||
|
||
Function Test-MtCisaBlockHighRiskUser { | ||
[CmdletBinding()] | ||
[OutputType([bool])] | ||
param() | ||
|
||
$result = Get-MtConditionalAccessPolicy | ||
|
||
$blockPolicies = $result | Where-Object {` | ||
$_.state -eq "enabled" -and ` | ||
$_.grantControls.builtInControls -contains "block" -and ` | ||
$_.conditions.applications.includeApplications -contains "all" -and ` | ||
$_.conditions.userRiskLevels -contains "high" -and ` | ||
$_.conditions.users.includeUsers -contains "All" } | ||
|
||
$testResult = $blockPolicies.Count -ge 1 | ||
|
||
if ($testResult) { | ||
$testResultMarkdown = "Well done. Your tenant has one or more policies that block high risk users :`n`n%TestResult%" | ||
} else { | ||
$testResultMarkdown = "Your tenant does not have any conditional access policies that block high risk users." | ||
} | ||
Add-MtTestResultDetail -Result $testResultMarkdown -GraphObjectType ConditionalAccess -GraphObjects $blockPolicies | ||
|
||
return $testResult | ||
} |
File renamed without changes.
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,9 @@ | ||
BeforeDiscovery { | ||
$EntraIDPlan = Get-MtLicenseInformation -Product EntraID | ||
} | ||
|
||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.2.3", "CISA", "Security", "All" -Skip:( $EntraIDPlan -ne "P2" ){ | ||
It "MS.AAD.2.3: Sign-ins detected as high risk SHALL be blocked." { | ||
Test-MtCisaBlockHighRiskSignIn | Should -Be $true -Because "an enabled policy for all users blocking high risk sign-ins shall exist." | ||
} | ||
} |
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,9 @@ | ||
BeforeDiscovery { | ||
$EntraIDPlan = Get-MtLicenseInformation -Product EntraID | ||
} | ||
|
||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.2.1", "CISA", "Security", "All" -Skip:( $EntraIDPlan -ne "P2" ){ | ||
It "MS.AAD.2.1: Users detected as high risk SHALL be blocked." { | ||
Test-MtCisaBlockHighRiskUser | Should -Be $true -Because "an enabled policy for all users blocking high risk users shall exist." | ||
} | ||
} |
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,9 @@ | ||
BeforeDiscovery { | ||
$EntraIDPlan = Get-MtLicenseInformation -Product EntraID | ||
} | ||
|
||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.1.1", "CISA", "Security", "All", "MS.AAD" -Skip:( $EntraIDPlan -eq "Free" ) { | ||
It "MS.AAD.1.1: Legacy authentication SHALL be blocked." { | ||
Test-MtCisaBlockLegacyAuth | Should -Be $true -Because "an enabled policy for all users blocking legacy auth access shall exist." | ||
} | ||
} |
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,9 @@ | ||
BeforeDiscovery { | ||
$EntraIDPlan = Get-MtLicenseInformation -Product EntraID | ||
} | ||
|
||
Describe "CISA SCuBA" -Tag "MS.AAD", "MS.AAD.2.2", "CISA", "Security", "All" -Skip:( $EntraIDPlan -ne "P2" ) { | ||
It "MS.AAD.2.2: A notification SHOULD be sent to the administrator when high-risk users are detected." { | ||
Test-MtCisaNotifyHighRisk | Should -Be $true -Because "an enabled is a recipient of risky user login notifications." | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.