Skip to content

Commit 662db08

Browse files
committed
Merge branch 'develop'
2 parents 1fe1c5a + c412186 commit 662db08

File tree

1,139 files changed

+22929
-18995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,139 files changed

+22929
-18995
lines changed

Invoke-Monkey365.ps1

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,48 @@ Function Invoke-Monkey365{
459459
}
460460
return
461461
}
462+
#Check if list collectors
463+
If($PSBoundParameters.ContainsKey('ListRule') -and $PSBoundParameters['ListRule'].IsPresent){
464+
#Get command Metadata
465+
$MetaData = New-Object -TypeName "System.Management.Automation.CommandMetaData" (Get-Command -Name "Get-Rule")
466+
$newPsboundParams = [ordered]@{}
467+
if($null -ne $MetaData){
468+
$param = $MetaData.Parameters.Keys
469+
foreach($p in $param.GetEnumerator()){
470+
if($PSBoundParameters.ContainsKey($p)){
471+
$newPsboundParams.Add($p,$PSBoundParameters[$p])
472+
}
473+
}
474+
#Add verbose, debug
475+
$newPsboundParams.Add('Verbose',$O365Object.verbose)
476+
$newPsboundParams.Add('Debug',$O365Object.debug)
477+
$newPsboundParams.Add('InformationAction',$O365Object.InformationAction)
478+
#Add pretty print
479+
[void]$newPsboundParams.Add('Pretty',$true);
480+
#Add RulesPath
481+
If($newPsboundParams.Contains('RulesPath')){
482+
$newPsboundParams.RulesPath = $O365Object.rulesPath;
483+
}
484+
Else{
485+
[void]$newPsboundParams.Add('RulesPath',$O365Object.rulesPath);
486+
}
487+
#Remove RuleSet if null
488+
If($newPsboundParams.Contains('RuleSet') -and $null -eq $newPsboundParams['RuleSet']){
489+
[void]$newPsboundParams.Remove('RuleSet');
490+
}
491+
#Remove instance if EntraID is selected
492+
If($newPsboundParams.Contains('Instance') -and $newPsboundParams['Instance'] -eq 'EntraID'){
493+
[void]$newPsboundParams.Remove('Instance');
494+
}
495+
#Remove Instance if null
496+
If($newPsboundParams.Contains('Instance') -and $null -eq $newPsboundParams['Instance']){
497+
[void]$newPsboundParams.Remove('Instance');
498+
}
499+
#Execute command
500+
Get-Rule @newPsboundParams
501+
}
502+
return
503+
}
462504
#Check for mandatory params
463505
Test-MandatoryParameter
464506
#Import MSAL module
@@ -536,4 +578,4 @@ Function Invoke-Monkey365{
536578
[System.GC]::GetTotalMemory($true) | out-null
537579
}
538580
}
539-
}
581+
}

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ The following example will retrieve data and metadata from Azure AD and SharePoi
6565

6666

6767
``` powershell
68-
$param = @{
68+
$options = @{
6969
Instance = 'Microsoft365';
70-
Analysis = 'SharePointOnline';
70+
Collect = 'ExchangeOnline';
7171
PromptBehavior = 'SelectAccount';
7272
IncludeEntraID = $true;
73-
ExportTo = 'PRINT';
73+
ExportTo = 'CSV';
7474
}
75-
$assets = Invoke-Monkey365 @param
75+
Invoke-Monkey365 @options
7676
```
7777

7878
# Regulatory compliance checks
@@ -93,9 +93,7 @@ By default, the HTML report shows you the CIS (Center for Internet Security) Ben
9393

9494
The following standards are supported by Monkey365:
9595

96-
* CIS Microsoft Azure Foundations Benchmark v2.0.0
9796
* CIS Microsoft Azure Foundations Benchmark v3.0.0
98-
* CIS Microsoft 365 Foundations Benchmark v2.0.0
9997
* CIS Microsoft 365 Foundations Benchmark v3.0.0
10098

10199
More standards will be added in next releases (NIST, HIPAA, GDPR, PCI-DSS, etc..) as they are available.

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
1+
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -77,4 +77,4 @@ $param = @{
7777
}
7878
Write-information @param
7979
#Start process
80-
Start-Process docker -ArgumentList $buildArgs -NoNewWindow -Wait
80+
Start-Process docker -ArgumentList $buildArgs -NoNewWindow -Wait

collectors/azure/APIM/Get-MonkeyAZAPIM.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
1+
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -130,3 +130,4 @@ function Get-MonkeyAZAPIM {
130130

131131

132132

133+

collectors/azure/alerts/securityalerts/Get-MonkeyAzSecurityAlert.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
1+
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -137,3 +137,4 @@ function Get-MonkeyAzSecurityAlert {
137137

138138

139139

140+

collectors/azure/appservices/Get-MonkeyAzAppServiceInfo.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
1+
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -136,3 +136,4 @@ function Get-MonkeyAzAppServiceInfo {
136136

137137

138138

139+

collectors/azure/botchannels/Get-MonkeyAzBotChannel.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
1+
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -138,3 +138,4 @@ function Get-MonkeyAzBotChannel {
138138

139139

140140

141+

collectors/azure/classicvm/virtualmachines/Get-MonkeyAzClassicDisk.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
1+
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -131,3 +131,4 @@ function Get-MonkeyAzClassicDisk {
131131

132132

133133

134+

collectors/azure/classicvm/virtualmachines/Get-MonkeyAzClassicVM.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
1+
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -170,3 +170,4 @@ function Get-MonkeyAzClassicVM {
170170

171171

172172

173+

collectors/azure/cognitive/Get-MonkeyAzCognitiveService.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
1+
# Monkey365 - the PowerShell Cloud Security Tool for Azure and Microsoft 365 (copyright 2022) by Juan Garrido
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -146,3 +146,4 @@ function Get-MonkeyAzCognitiveService {
146146

147147

148148

149+

0 commit comments

Comments
 (0)