Skip to content

Commit 755ff80

Browse files
committed
update docs
1 parent 2e8e3c9 commit 755ff80

8 files changed

Lines changed: 360 additions & 76 deletions

File tree

docs/assets/css/extra.css

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,62 @@
1-
.container {
2-
font-family: arial;
3-
font-size: 24px;
4-
margin: 25px;
5-
width: 350px;
6-
height: 200px;
7-
outline: dashed 1px black;
8-
}
9-
10-
.center {
1+
.center {
112
display: flex;
123
align-items: center;
134
justify-content: center;
14-
}
5+
}
6+
7+
.center-badges {
8+
text-align: center;
9+
}
10+
.center-badges img {
11+
display: inline-block;
12+
}
13+
14+
15+
16+
/* Logo spacing (first image on the page) */
17+
.md-content img[alt="Monkey365 logo"] {
18+
display: block;
19+
margin: 0.25rem 0 0.75rem 0;
20+
border-radius: 14px;
21+
border: 1px solid var(--md-default-fg-color--lightest);
22+
background: color-mix(in srgb, var(--md-default-bg-color) 80%, white 20%);
23+
padding: 6px;
24+
}
25+
26+
/* Badges row: give consistent spacing */
27+
.md-content a > img[src*="img.shields.io"] {
28+
margin-right: 0.35rem;
29+
margin-bottom: 0.35rem;
30+
}
31+
32+
/* Buttons: add breathing room when multiple buttons are stacked */
33+
.md-content .md-button {
34+
margin-right: 0.4rem;
35+
margin-bottom: 0.5rem;
36+
}
37+
38+
/* Code block in "Start in 3 commands" should look crisp */
39+
.md-content pre > code {
40+
border-radius: 0.9rem;
41+
}
42+
43+
/* Screenshots and diagrams: constrain width + subtle frame */
44+
.md-content img[alt="Example HTML report"],
45+
.md-content img[alt="Monkey365 architecture"] {
46+
display: block;
47+
max-width: min(980px, 100%);
48+
width: 100%;
49+
height: auto;
50+
margin: 0.75rem 0 1rem 0;
51+
border-radius: 1rem;
52+
border: 1px solid var(--md-default-fg-color--lightest);
53+
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
54+
}
55+
56+
/* Mobile: reduce shadows slightly */
57+
@media (max-width: 600px) {
58+
.md-content img[alt="Example HTML report"],
59+
.md-content img[alt="Monkey365 architecture"] {
60+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
61+
}
62+
}

docs/assets/images/consent.png

45.2 KB
Loading
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
author: Juan Garrido
3+
---
4+
5+
# Using Access Tokens with Monkey365
6+
7+
Monkey365 supports direct authentication using **access tokens**, enabling fully non‑interactive execution for automation, CI/CD pipelines or service‑principal–based workflows.
8+
This feature allows users to pass one or more access tokens to Monkey365, which will automatically route each token to the correct API based on its **audience** (`aud`) claim.
9+
10+
## Overview
11+
12+
You can provide access tokens to Monkey365 by using the `-AccessToken` parameter. The parameter accepts a single token (string) or multiple tokens (array of strings).
13+
14+
Each token is inspected to determine which Microsoft 365 or Azure service it applies to. Monkey365 then uses the appropriate token when making API calls.
15+
16+
???+ note
17+
Expired or malformed tokens are ignored.
18+
19+
20+
## Usage Examples
21+
22+
### Passing a Single Token
23+
24+
```powershell
25+
$graph = az account get-access-token --resource https://graph.microsoft.com/ --query accessToken -o tsv
26+
27+
$p = @{
28+
AccessToken = $graph;
29+
IncludeEntraId = $true;
30+
TenantId = "00000000-0000-0000-0000-000000000000";
31+
Verbose = $true;
32+
InformationAction = "Continue"
33+
}
34+
Invoke-Monkey365 @p
35+
```
36+
37+
### Passing Multiple Tokens
38+
39+
```powershell
40+
$azureRM = az account get-access-token --query accessToken -o tsv
41+
$graph = az account get-access-token --resource https://graph.microsoft.com/ --query accessToken -o tsv
42+
$storage = az account get-access-token --resource https://storage.azure.com/ --query accessToken -o tsv
43+
$vault = az account get-access-token --resource https://vault.azure.net --query accessToken -o tsv
44+
45+
$accessTokens = [System.Collections.Generic.List[System.String]]::new()
46+
[void]$accessTokens.Add($azureRM);
47+
[void]$accessTokens.Add($graph);
48+
[void]$accessTokens.Add($storage);
49+
[void]$accessTokens.Add($vault);
50+
51+
$p = @{
52+
Instance = "Azure";
53+
Collect = "All";
54+
AccessToken = $accessTokens;
55+
IncludeEntraId = $true;
56+
TenantId = "00000000-0000-0000-0000-000000000000";
57+
Verbose = $true;
58+
InformationAction = "Continue"
59+
}
60+
Invoke-Monkey365 @p
61+
```
62+
This allows Monkey365 to:
63+
64+
- Query EntraID via Microsoft Graph
65+
- Enumerate Azure subscriptions and resources via ARM
66+
67+
All without any interactive login.
68+
69+
### Notes & Recommendations
70+
- Tokens must be valid JWT access tokens.
71+
- Monkey365 does not refresh tokens.
72+
- Ensure tokens include the correct scopes or resource audiences.
73+
74+
### Troubleshooting
75+
76+
#### Monkey365 reports "Invalid token"
77+
- Ensure the token is an access token, not an ID token.
78+
- Verify the aud claim matches a supported API.
79+
- Check token expiration (exp claim).
80+
81+
#### API calls fail with 401/403
82+
- Token may be missing required scopes/permissions.
83+
- Service principal may not have required roles (e.g., Reader on subscription).
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
author: Juan Garrido
3+
---
4+
5+
# Using the Microsoft Graph Client ID
6+
7+
Monkey365 supports multiple authentication methods when connecting to Microsoft Entra ID. By default, Monkey365 uses the **Azure PowerShell client ID** `1950a258-227b-4e31-a9cf-717495945fc2`.
8+
9+
This <a href='https://learn.microsoft.com/en-us/troubleshoot/entra/entra-id/governance/verify-first-party-apps-sign-in#application-ids-of-microsoft-tenant-owned-applications' target='_blank'>client ID</a> is **pre‑authorized by Microsoft** for a **limited set of Microsoft Graph scopes**. Using the default clientId is enough for basic configuration review, but the application do **not** include many of the advanced or privileged scopes required for deeper Entra ID assessments, so there will be collectors that won't be allowed to fetch results due to lack of granted scopes.
10+
11+
To support more advanced scenarios, Monkey365 also allows authentication using Microsoft's tenant‑owned Microsoft Graph Client ID `14d82eec-204b-4c2f-b7e8-296a70dab67e`
12+
13+
Using this client ID enables Monkey365 to request additional Microsoft Graph scopes that are **not available** through the **Azure PowerShell client ID**, such as `RoleManagement.Read.Directory` or `PrivilegedAccess.Read.AzureADGroup`. Using this clientId provides Monkey365 with broader visibility into privileged roles, access policies or directory‑wide configuration.
14+
15+
## Enabling Microsoft Graph Authentication
16+
17+
To switch from the default Azure PowerShell client ID to the Microsoft‑owned Graph Client ID, set the `useMgGraph` property to `true` in your [monkey365.config](../configuration/configuration-file.md) configuration file:
18+
19+
```json
20+
"mgGraph": {
21+
"useMgGraph": "true"
22+
...
23+
}
24+
```
25+
When enabled, Monkey365 will automatically use the Microsoft Graph Client ID during authentication and request the required permissions.
26+
27+
## Microsoft Graph Permissions
28+
29+
When the Microsoft Graph Client ID is selected, Monkey365 will request the following Microsoft Graph scopes:
30+
31+
- User.Read.All
32+
- Application.Read.All
33+
- Policy.Read.All
34+
- Organization.Read.All
35+
- OrgSettings-AppsAndServices.Read.All
36+
- RoleManagement.Read.Directory
37+
- GroupMember.Read.All
38+
- Directory.Read.All
39+
- PrivilegedEligibilitySchedule.Read.AzureADGroup
40+
- PrivilegedAccess.Read.AzureADGroup
41+
- RoleManagementPolicy.Read.AzureADGroup
42+
- Group.Read.All
43+
- SecurityEvents.Read.All
44+
- IdentityRiskEvent.Read.All
45+
- UserAuthenticationMethod.Read.All
46+
- AuditLog.Read.All
47+
- AccessReview.Read.All
48+
49+
These permissions allow Monkey365 to perform a comprehensive security and configuration assessment across Entra ID, including privileged access, audit logs, identity protection, and directory‑wide configuration.
50+
51+
The above scopes are configurable and can be set in [monkey365.config](../configuration/configuration-file.md) configuration file under the scopes section, as shown below:
52+
53+
```json
54+
"mgGraph":{
55+
"useMgGraph": "true",
56+
"scopes": [
57+
"User.Read.All",
58+
"Application.Read.All",
59+
"Policy.Read.All",
60+
"Organization.Read.All",
61+
"OrgSettings-AppsAndServices.Read.All",
62+
"RoleManagement.Read.Directory",
63+
"GroupMember.Read.All",
64+
"Directory.Read.All",
65+
"PrivilegedEligibilitySchedule.Read.AzureADGroup",
66+
"PrivilegedAccess.Read.AzureADGroup",
67+
"RoleManagementPolicy.Read.AzureADGroup",
68+
"Group.Read.All",
69+
"SecurityEvents.Read.All",
70+
"IdentityRiskEvent.Read.All",
71+
"UserAuthenticationMethod.Read.All",
72+
"AuditLog.Read.All",
73+
"AccessReview.Read.All"
74+
]
75+
}
76+
}
77+
```
78+
79+
???+ note
80+
If you are authenticating with the Microsoft Graph Client ID for the first time, you will be prompted to grant the necessary permissions, as shown below:
81+
![](../assets/images/consent.png)

docs/configuration/general-options.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ Use this flag to list available frameworks:
8383
Invoke-Monkey365 -ListFramework
8484
```
8585

86+
```-AccessToken```
87+
88+
Use this flag to provide external access tokens. More information can be seen [here](../authentication/access_token.md)
89+
90+
8691
## Listing collectors
8792

8893
The `-ListCollector` flag is used to display a list of available collectors within Monkey365. Collectors are modular components that gather specific sets of data from cloud environments such as Azure, Microsoft 365, or Entra ID.

docs/index.md

Lines changed: 64 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
---
22
author: Juan Garrido
3+
hide:
4+
- navigation
5+
- toc
36
---
47

58
# Monkey365
69

710
<div class="center">
8-
<img src='assets/images/monkey365.png' />
11+
<img src='assets/images/MonkeyLogo.png' />
912
</div>
1013

14+
[![GitHub release](https://img.shields.io/github/v/release/silverhack/monkey365?display_name=tag&sort=semver)](https://github.com/silverhack/monkey365/releases)
15+
[![PowerShell Gallery](https://img.shields.io/powershellgallery/v/monkey365)](https://www.powershellgallery.com/packages/monkey365/)
16+
[![License](https://img.shields.io/github/license/silverhack/monkey365)](https://github.com/silverhack/monkey365/blob/main/LICENSE)
17+
[![Stars](https://img.shields.io/github/stars/silverhack/monkey365?style=social)](https://github.com/silverhack/monkey365/stargazers)
18+
[![Follow @tr1ana](https://img.shields.io/twitter/follow/tr1ana?style=social)](https://twitter.com/tr1ana)
19+
[![GitHub Downloads](https://img.shields.io/github/downloads/silverhack/monkey365/total?style=flat&logo=powershell&label=GitHub%20Release%20Download)](https://github.com/silverhack/monkey365/releases)
20+
[![PowerShell Gallery Downloads](https://img.shields.io/powershellgallery/dt/monkey365.svg?style=flat&logo=powershell&label=PSGallery%20Download)](https://www.powershellgallery.com/packages/monkey365)
1121

1222
Monkey365 is an Open Source security tool that can be used to easily conduct not only Microsoft 365, but also Azure subscriptions and Microsoft Entra ID security configuration reviews without the significant overhead of learning tool APIs or complex admin panels from the start.
1323

14-
Monkey365 has been designed to tackle these difficulties and get results fast and without any requirements. The results will be visualised in a simplified HTML report to quickly identify potential issues. As such, security consultants will be able to effectively address issues from a single vulnerability report.
24+
Monkey365 has been designed to tackle these difficulties and get results fast and without any requirements. The results can be visualised in a simplified HTML report to quickly identify potential issues. As such, security consultants will be able to effectively address issues from a single vulnerability report. Click through findings, and evidence in a report format suitable for reviews.
1525

1626
![](assets/images/htmlreport.png)
1727

@@ -25,10 +35,56 @@ To help with this effort, Monkey365 also provides several ways to identify secur
2535

2636
Monkey365 works in three phases. In the first phase, collectors will issue queries against the multiple data sources to retrieve the desired metadata about targeted tenant or subscription, and then will collect information. Once all the necessary metadata is collected, the result is passed to an internal module in order to start the verifying phase, in which the tool uses the data collected in first phase to perform query search with a default set of rules, as a mechanism to evaluate the configuration and to search for potential misconfigurations and security issues. The third phase starts to generate reports, such as an HTML report containing structured data for quick checking and verification of the results.
2737

28-
# Documentation
38+
# Getting Started
2939

30-
* [Getting Started](install/install-instructions.md)
31-
* [License and Contributing](license/license-contributing.md)
32-
* [Support](support/support.md)
33-
* [Disclaimer](support/disclaimer.md)
34-
* [Sample report](sample/monkey365.html)
40+
```powershell
41+
#Install module
42+
Install-Module Monkey365 -Scope CurrentUser
43+
#Set params
44+
$param = @{
45+
Instance = 'Microsoft365';
46+
Collect = 'ExchangeOnline','MicrosoftTeams','Purview','SharePointOnline';
47+
PromptBehavior = 'SelectAccount';
48+
IncludeEntraID = $true;
49+
ExportTo = 'HTML';
50+
}
51+
#Execute monkey365
52+
Invoke-Monkey365 @param
53+
```
54+
55+
---
56+
57+
[Getting started](install/install-instructions.md){ .md-button .md-button--primary }
58+
[Quick start](getting_started/basic-usage.md){ .md-button }
59+
[Authentication](authentication/overview.md){ .md-button }
60+
[Sample report](sample/monkey365_azure.html){ .md-button }
61+
62+
!!! warning "Permissions required"
63+
Monkey365 needs appropriate permissions to read tenant and subscription configuration data.
64+
Review: [Required permissions →](getting_started/permissions.md)
65+
66+
---
67+
68+
# Automation-friendly output
69+
70+
Export results as **JSON**, **CSV**, or **CLIXML** for pipelines and post-processing.
71+
72+
- [Exporting overview](exporting/exporting-data.md)
73+
- [Export JSON](exporting/export-json.md)
74+
- [Export CSV](exporting/export-csv.md)
75+
- [Export HTML](exporting/export-html.md)
76+
77+
# Extensible security checks
78+
Create custom rules and rulesets for organization-specific controls.
79+
80+
- [Security checks overview](security_checks/overview.md)
81+
- [Create a custom rule](security_checks/custom-rule.md)
82+
- [Custom ruleset](security_checks/custom-ruleset.md)
83+
84+
# Next steps
85+
86+
- Configure scan behavior → [General options](configuration/general-options.md)
87+
- Azure-specific tuning → [Azure options](configuration/azure-options.md)
88+
- Microsoft 365 tuning → [Microsoft 365 options](configuration/microsoft365-options.md)
89+
- Handle throttling → [Rate limits & retry](configuration/rate-limit.md)
90+
- Logging (File/Slack/Teams) → [Logging introduction](logging/introduction.md)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3514,7 +3514,7 @@ <h5 class="modal-title-header" id="MonkeyRawObject_d67addac8097472cacc14dc0b15aa
35143514
<!--Sidebar-->
35153515
<div class="sidebar" id="sidebar">
35163516
<div class="header">
3517-
<a class="sidebar-brand" href="javascript:show('monkey-main-dashboard')">
3517+
<a class="sidebar-brand" href="https://silverhack.github.io/monkey365/">
35183518
<img src="https://cdn.jsdelivr.net/gh/silverhack/monkey365assets@latest//assets/inc-monkey/logo/MonkeyLogo.png" alt="monkey365">
35193519
</img>
35203520
<span class="align-middle me-3">Monkey365</span>

0 commit comments

Comments
 (0)