Giter Club home page Giter Club logo

simuland's Introduction

SimuLand

See the announcement on the Microsoft Security Blog.

AboutPurposeStructureLabsContributingTrademarks


About

SimuLand is an open-source initiative by Microsoft to help security researchers around the world deploy lab environments that reproduce well-known techniques used in real attack scenarios, actively test and verify effectiveness of related Microsoft 365 Defender, Azure Defender and Microsoft Sentinel detections, and extend threat research using telemetry and forensic artifacts generated after each simulation exercise.

These lab environments will provide use cases from a variety of data sources including telemetry from Microsoft 365 Defender security products, Azure Defender and other integrated data sources through Microsoft Sentinel data connectors.

Purpose

As we build out the SimuLand framework and start populating lab environments, we will be working under the following basic principles:

  • Understand the underlying behavior and functionality of adversary tradecraft
  • Identify mitigations and attacker paths by documenting preconditions for each attacker action
  • Expedite the design and deployment of threat research lab environments
  • Stay up-to-date with the latest techniques and tools used by real threat actors
  • Identify, document, and share relevant data sources to model and detect adversary actions
  • Validate and tune detection capabilities

Structure

Folder Description
Lab Environments Azure Resource Manager (ARM) Templates and documents to deploy lab environments. Some environments contributed through this initiative require at least a Microsoft 365 E5 license (paid or trial) and an Azure tenant. Depending on the lab guide being worked on, the design of the network environments might change a little. While some labs would replicate a hybrid cross-domain environment (on-prem -> Cloud), others would focus only on resources in the cloud.
Lab Guides Step-by-step lab guides summarizing simulation scenarios. From a defensive perspective, simulation steps are also mapped to detection queries and alerts from Microsoft 365 Defender, Azure Defender, and Microsoft Sentinel. We believe this would help guide some of the extended threat research generated from the simulation exercise.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

simuland's People

Contributors

cyb3rward0g avatar fryguy04 avatar jorlamd avatar keithmccammon avatar leegengyu avatar manuelhauch avatar microsoft-github-operations[bot] avatar microsoftopensource avatar swiftsolves-msft avatar syfanx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simuland's Issues

Order of steps

Please provide some guidance about the sequential order for the preparation steps. This will help to simplify the deployment by ensuring that dependencies are addressed.

ARM Template Deployment

Howdy folks,

I'm trying to deploy in Azure this template and I'm getting this error message:

Any guidance would be welcomed.

Many thanks!

{"code": "MultipleErrorsOccurred", "message": "Multiple error occurred: BadRequest,BadRequest. Please see details."}

Inner Errors:
{"code": "InvalidTemplate", "target": "/subscriptions/fXXXXXXXXXXXX/resourceGroups/rsg-adfslab/providers/Microsoft.Resources/deployments/CreateADForest", "message": "Deployment template validation failed: 'The value for the template parameter 'domainNetbiosName' at line '14' and column '30' is not provided. Please see https://aka.ms/arm-create-parameter-file for usage details.'.", "additionalInfo": [{"type": "TemplateViolation", "info": {"lineNumber": 14, "linePosition": 30, "path": "parameters.domainNetbiosName"}}]}

Inner Errors:
{"code": "InvalidTemplate", "target": "/subscriptions/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/resourceGroups/rsg-adfslab/providers/Microsoft.Resources/deployments/JoinADFSServer", "message": "Deployment template validation failed: 'The value for the template parameter 'domainNetbiosName' at line '17' and column '30' is not provided. Please see https://aka.ms/arm-create-parameter-file for usage details.'.", "additionalInfo": [{"type": "TemplateViolation", "info": {"lineNumber": 17, "linePosition": 30, "path": "parameters.domainNetbiosName"}}]}

Exiting. Error Message: invalid uri https://STORAGE ACCOUNT.blob.core.windows.net/pfx_blob

Hello, I am getting the below errors when deploying the lab.
Any insights or workaround on how I can go about the deployment in CLI.

"VM has reported a failure when processing extension 'SetUpADFS'. Error message: "Failed to download all specified files. Exiting. Error Message: invalid uri https://STORAGE ACCOUNT.blob.core.windows.net/pfx_blob/ADFS.PFX?[REDACTED]"

See below the JSON output from the deployment status.

{
"id": "/subscriptions/10f7ae7a-8e1f-4243-a7c8-a9cad049be4e/resourceGroups/azhybrid/providers/Microsoft.Resources/deployments/deployWinADFS/operations/84336BFFBEA14038",
"operationId": "84336BFFBEA14038",
"properties": {
"duration": "PT1M50.7129958S",
"provisioningOperation": "Create",
"provisioningState": "Failed",
"request": null,
"response": null,
"serviceRequestId": null,
"statusCode": "Conflict",
"statusMessage": {
"error": {
"additionalInfo": null,
"code": "VMExtensionProvisioningError",
"details": null,
"message": "VM has reported a failure when processing extension 'SetUpADFS'. Error message: "Failed to download all specified files. Exiting. Error Message: invalid uri https://STORAGE ACCOUNT.blob.core.windows.net/pfx_blob/ADFS.PFX?[REDACTED]\r\n"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot ",
"target": null
},
"status": "Failed"

	 "resourceGroup": "azhybrid"

},
{
"id": "/subscriptions/10f7ae7a-8e1f-4243-a7c8-a9cad049be4e/resourceGroups/azhybrid/providers/Microsoft.Resources/deployments/deployWinADFS/operations/FBD2AF13D8CFDC7A",
"operationId": "FBD2AF13D8CFDC7A",
"properties": {
"duration": "PT1M56.9860345S",
"provisioningOperation": "Create",
"provisioningState": "Failed",
"request": null,
"response": null,
"serviceRequestId": null,
"statusCode": "Conflict",
"statusMessage": {
"error": {
"additionalInfo": null,
"code": "VMExtensionProvisioningError",
"details": null,
"message": "VM has reported a failure when processing extension 'SetUpDC'. Error message: "Failed to download all specified files. Exiting. Error Message: invalid uri https://STORAGE ACCOUNT.blob.core.windows.net/pfx_blob/ADFS.PFX?[REDACTED]\r\n"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot ",
"target": null
},
"status": "Failed"
},
"targetResource": {
"id": "/subscriptions/10f7ae7a-8e1f-4243-a7c8-a9cad049be4e/resourceGroups/azhybrid/providers/Microsoft.Compute/virtualMachines/DC01/extensions/SetUpDC",
"resourceGroup": "azhybrid",

Update Windows Events Data Collection to Data Collection Rules (DCR) and XPath Queries

A New Version of the Windows Security Events Connector?

According to Microsoft docs, the new Windows Security Events connector lets you stream security events from any Windows server (physical or virtual, on-premises or in any cloud) connected to your Azure Sentinel workspace. There are now two versions of this connector:

  • Security events (legacy version): Based on the Log Analytics Agent (Usually known as the Microsoft Monitoring Agent (MMA) or Operations Management Suite (OMS) agent).
  • Windows Security Events (new version): Based on the new Azure Monitor Agent (AMA).

Other Windows Event Providers

We also need to use DCRs to handle the collection of events from other Windows event providers besides Microsoft-Windows-Security-Auditing

References:

Issue on page /environments/aadHybridIdentityADFS/README.html

The command listed at the bottom of the "Elevate Account Access" section didn't work for me (I received an "argument --assignee-object-id: expected one argument" error). I think this is because the "az ad signed-in-user" command didn't return an "objectId", just an "Id". [I'm using azure CLI version 2.39.0]

I guess that replacing the following:

az role assignment create --scope '/' --role 'Owner' --assignee-object-id $(az ad signed-in-user show --query objectId) --assignee-principal-type User

with:

az role assignment create --scope '/' --role 'Owner' --assignee-object-id $(az ad signed-in-user show --query Id) --assignee-principal-type User

is the correct fix, but it would be good for someone more familiar with the lab to confirm.

Issue Enabling Audit Log Search in O365

Greetings,

Running into an issue when attempting to run the powershell command to enable Audit Log Search in O365:

Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true

Error message is:
The command you tried to run isn't currently allowed in your organization. To run this command, you first need to run
the command: Enable-OrganizationCustomization.
+ CategoryInfo : NotSpecified: (AdminAuditLogConfig:String) [Set-AdminAuditLogConfig], InvalidOperatio...
ontextException
+ FullyQualifiedErrorId : [Server=CY4PR16MB1782,RequestId=eaf15b8e-3f95-4ddf-b33f-740a5ea2a87c,TimeStamp=8/15/2021
2:16:58 AM] [FailureCategory=Cmdlet-InvalidOperationInDehydratedContextException] 5B0EC96F,Microsoft.Exchange.Man
agement.SystemConfigurationTasks.SetAdminAuditLogConfig
+ PSComputerName : outlook.office365.com

Ran the suggested Enable-OrganizationCustomization command and it reported the command was not needed because customization already turned on.

Attempted to turn on Auditing in the O365 SCC GUI but receive an error there as well:
Sorry! We couldn't update your organization settings. Please try again.

I do see the following note in the Prereqs for this section:
You must be assigned the Audit Logs role in Exchange Online to turn audit log search on or off in your Microsoft 365 organization. By default, this role is assigned to the Compliance Management and Organization Management role groups on the Permissions page in the Exchange admin center. Global admins in Microsoft 365 are members of the Organization Management role group in Exchange Online.

Looking in Exchange Admin Center, the single global admin account that I created when setting up the environment is in the TenantAdmins role group, and that group is assigned the Organization Management role. I did attempt to add the Admin account directly to see if that would have any impact but still the same issue for me.

Any guidance would be appreciated!

Template Validation Error - "Microsoft.Network/networksecuritygroups/nsg-rdp-allow"

When attempting to deploy simuland, and completing all the required fields, we keep on getting "Template Validation Error". This seems to be an error from the downstream Win10-AD-ADFS template. Our desired configuration is to use AzureBastion. We selected AzureBastionHost and left the "Allowed IP Addresses" blank. Can't seem to figure out how to fix this in our deployment. Thanks.

image

image

No authorization to deploy

Getting permissions problems when trying to deploy the AD FS

Keep getting the error ''You don’t have authorization to perform action 'Microsoft.Resources/deployments/validate/action'.''
Tried with both global administrator and root account. Tried to toggle to yes in the AD properties Access management for Azure resources .
Has anyone encounter that problem before?
Capture

SetupADFS VM Extension Failing, SetupDC VM Extension failing with 403 Forbidden message

Overview

The installation of ADFS and DC's VM extension is failing. I've been trying to debug where exactly this is failing. I'm getting a 403 Forbidden, Failed to download all specified files. Exiting. Error Message: The remote server returned an error: (403) Forbidden. Is there something that can be looked into further on the 403 Forbidden error?

Verbose error JSON:

{
    "status": "Failed",
    "error": {
        "code": "VMExtensionProvisioningError",
        "message": "VM has reported a failure when processing extension 'SetUpADFS'. Error message: \"Failed to download all specified files. Exiting. Error Message: The remote server returned an error: (403) Forbidden.\"\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot "
    }
}

Images

Image showing provisioning failed

Screen Shot 2022-07-23 at 2 26 48 PM

Image showing status message

Screen Shot 2022-07-23 at 2 27 02 PM

Expected Result

The VM extensions return OK / Success for the DC and ADFS.

Failed deployWinADFS Deployment

I've gotten this specific deployment to work at least once (was able to validate endpoints registered in MDE, and workstation and ADFS were domain joined, and validated ADFS was working by signing in from the workstation with the ADFS user account, and Sentinel was connected.) I was not seeing MDI agents deployed, so restarted. But I have gotten this error at least 3 separate times where the deployment fails on ADFS01/SetUpADFS and DC01/SetUpDC. Any thoughts on troubleshooting or what I need to change? it's erroring on vm extensions for both. I see resources created -- but ADFS service is not running.

deployeerror

{
"status": "Failed",
"error": {
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'SetUpADFS'. Error message: "Failed to download all specified files. Exiting. Error Message: The remote server returned an error: (404) Not Found."\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot "
}
}

{
"status": "Failed",
"error": {
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'SetUpDC'. Error message: "Failed to download all specified files. Exiting. Error Message: The remote server returned an error: (404) Not Found."\r\n\r\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot "
}
}

Certificate thumbprint error in Install-ADFS

Getting certificate thumbprint error in Install-ADFS

image

Scenario :
Been trying to deploy this environment for weeks! We are trying to deploy the environment in our current Azure environment that already has a domain and AD within.
We tried first to deploy using that domain name as the FQDM but we would not able to AD connect in the DC because the federation existed already.
We then tried to redeploy using a subdomain as our FQDN (ex: simuland.example.com ) changed the ps1 template for the AD to match : (as previously mentioned in another issue. )

$DomainName1,$DomainName2,$DomainName3 = ($using:domainFQDN).split('.')
$ParentPath = "DC=$DomainName1,DC=$DomainName2,DC=$DomainName3 "

Everything deploys correctly up to Install-ADFS and this certificate thumbprint error. I am wondering if we have a wildcard certificate for our domain name ( *.example.com ) if that is enough or do we need an extra wildcard certificate for the subdomain as well ( *.simuland.example.com ) to satisfy the requirements of the newly create federation which will be adfs.simuland.example.com ? Trying to be as clear as possible here.
Running a little short on solutions here and would really appreciate to get this environment going for our team!
Thanks in advance.

CreateADForest Conflict Error

Hi,

I am getting a conflict error on the deployment script and work what the issue is, just wondering if theres something obvious I am missing:

I have uploaded the full error txt.

image

Should the CreateADForest Resource exist in both deployWinADFS and CreateADForest like this?

image

image

Error.txt

New AADInternals scripts running to avoid error

[Orginal document]
4. On the same elevated PowerShell session, run the following commands to install AADInternals if it is not installed yet:

Install-Module –Name AADInternals –RequiredVersion 0.4.8 -Force 
Import-Module –Name AADInternals 

I got errors when I run it but to get over the error by running the above scripts, I can use these instead

Install-Module -Name AADInternals -RequiredVersion 0.4.8
Import-Module AADInternals

API Call for oauth2PermissionGrants

In grantDelegatedPermissionsToApplication.md, the last step before the detections is a POST for the permissions grant against the service principals. As I work through this, I get a 409 conflict which upon additional research seems to indicate that the permissions already exist. It isn't clear to me that because we have done the permissions for mail.read in an earlier step if that is why it is throwing this message or what or if this needs to be a patch instead. Can that be clarified a bit? BTW, this is fantastic work.

Invalid content link

Hello, there seems to be an error for the link mentionned below in my picture.
I did go to the github repository and it seems like it has been changed 3 days ago.
The new links are : (Directory changed from ASimRegistery to ASimRegisteryEvent)

https://github.com/Azure/Azure-Sentinel/blob/master/Parsers/ASimRegistry**Event**/ARM/vimRegistryEventMicrosoftWindowsEvent/vimRegistryEventMicrosoftWindowsEvent.json

and

https://github.com/Azure/Azure-Sentinel/blob/master/Parsers/ASimRegistry**Event**/ARM/vimRegistryEventMicrosoftSysmon/vimRegistryEventMicrosoftSysmon.json

Is it possible to update the deployment json file to point to the correct link?

error

InvalidContentLink - https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Parsers/ASimFileEvent/ARM/vimFileEventMicrosoftSysmonCreated/vimFileEventMicrosoftSysmonCreated.json

Dependency error

az : ERROR: {"code": "MultipleErrorsOccurred", "message": "Multiple error occurred: BadRequest,BadRequest. Please see details."}
At line:1 char:1

  • az deployment tenant create `
  •   + CategoryInfo          : NotSpecified: (ERROR: {"code":... see details."}:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    

Inner Errors:
{"code": "InvalidContentLink", "message": "Unable to download deployment content from
'https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Parsers/ASimFileEvent/ARM/vimFileEventMicrosoftSysmonCreated/vimFileEventMicrosoftSysmonCreated.json'. The
tracking Id is '45248d57-7b06-44c0-8586-6782a58ae30b'. Please see https://aka.ms/arm-deploy-resources for usage details."}
Inner Errors:
{"code": "InvalidContentLink", "message": "Unable to download deployment content from
'https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Parsers/ASimFileEvent/ARM/vimFileEventMicrosoftSysmonDeleted/vimFileEventMicrosoftSysmonDeleted.json'. The
tracking Id is '45248d57-7b06-44c0-8586-6782a58ae30b'. Please see https://aka.ms/arm-deploy-resources for usage details."}

AAD diagnostic setting build failure

Hi!

Getting this error while trying to deploy the template, azureSentinel2Go succeeds and all else seems to build normally. Wondering if you had encountered it before and what I may be missing, google is not cooperating too much on this one!

AADConnector-7bolxxjg3amwg
microsoft.aadiam/diagnosticSettings
NotFound
Operation details


{
    "status": "Failed",
    "error": {
        "code": "OperationNotFound",
        "message": "Path: '/subscriptions/.../resourcegroups/azhybrid/providers/microsoft.aadiam/diagnosticSettings/AADConnector-7bolxxjg3amwg' is not supported"
    }
}

Enabling Data Connectors

Hello - on part two - deployment steps - I'm getting a conflict error on enabling data connectors. Any insights or how to fix this would be greatly appreciated. My connector for Office ATP and Microsoft Threat Protection states not support api version. This is in my commercial test tenant.

Conflict

{
"status": "Failed",
"error": {
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "BadRequest",
"message": "{\r\n "error": {\r\n "code": "BadRequest",\r\n "message": "Connector kind 'MicrosoftThreatProtection' is not supported in api-version: '2020-01-01'"\r\n }\r\n}"
},
{
"code": "BadRequest",
"message": "{\r\n "error": {\r\n "code": "BadRequest",\r\n "message": "Connector kind 'OfficeATP' is not supported in api-version: '2020-01-01'"\r\n }\r\n}"
},
{
"code": "Unauthorized",
"message": "{\r\n "error": {\r\n "code": "InvalidLicense",\r\n "message": "Missing consent"\r\n }\r\n}"
}
]
}
}

Cost Analysis Question

Hi,

I was wondering whether there is any optimum way to deploy this solution? Right now my predicted costs on this subscription seem to be sky rocketing.

image

Cheers

M365 Defender Connector - Missing Consent - Invalid License

Testing environment in a new environment with M365 E5 licenses enabled. I believe I might be missing either a license to enable the Azure Sentinel data connector or maybe just a few settings in MDE to enable the connection with the SIEM

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.