How falconforceteam/parrotforce works
Project Type and Purpose
• Project Type: Infrastructure-as-Code (ARM template + CI/CD) for deploying a serverless Azure Logic App playbook.
• Purpose: Automatically collect forensic evidence (live response) from Windows endpoints by orchestrating calls to Azure Sentinel and Microsoft 365 Defender via a Logic App running on a Consumption plan.
File Structure
• azuredeploy.json – ARM template defining Azure resources (Logic App, Managed Identity, roles, connectors).
• .github/workflows/*.yml – CI/CD validations (ARM template linting, PSScriptAnalyzer rules).
• README.md – Describes prerequisites (API permissions), deployment steps, and external tools (trident.ps1, winpmem.exe).
Extract Key Architectural Insights from the README
• Components to deploy:
– Azure Logic App (Consumption)
– Managed Identity with API permissions: AdvancedQuery.Read.All, Alert.Read.All, File.Read.All, Machine.LiveResponse, Machine.CollectForensics
– Azure Sentinel workspace connector
– Microsoft 365 Defender REST API connector
• Runtime flow:
– Logic App triggers off Sentinel alerts or manual input
– Calls M365 Defender to start a live-response session
– Executes PowerShell (trident.ps1) or native tool (winpmem.exe) on the target Windows machine
– Collects artifacts and stores them in a storage location (e.g., Azure Storage or Log Analytics)
a. Azure Resource Group
b. Azure Logic App (Consumption)
c. Managed Identity (assigned to Logic App)
d. Azure Sentinel (Log Analytics workspace)
e. Microsoft 365 Defender API
f. Target Windows Endpoints (with MDE agents installed)
g. Artifact Storage (e.g., Storage Account or workspace)
h. CI/CD Pipeline (GitHub Actions for template validation)
Relationships & Data Flow
1) Logic App uses its Managed Identity to authenticate against Azure Sentinel and Defender APIs
2) Logic App listens for Sentinel alerts or is triggered manually/in CI
3) Logic App issues a REST call to Microsoft 365 Defender to initiate Live Response
4) MDE Agent on Windows VM establishes a session and runs forensic collection tools (trident.ps1, winpmem.exe)
5) Collected artifacts are uploaded back to Azure (Storage Account or Log Analytics)
6) GitHub Actions workflow checks azuredeploy.json and PowerShell modules before merge
Architectural Patterns & Principles
• Serverless, event-driven orchestration (Logic Apps on Consumption)
• Principle of least privilege: Managed Identity scoped to only needed Defender and Sentinel API permissions
• Separation of concerns:
– ARM template for infra
– CI/CD workflows for validation
– External repos for forensic tools