<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
---
name: analyzing-azure-activity-logs
description: >-
  Investigate Azure Activity and Azure AD sign-in logs for unauthorized access and config changes.
domain: cybersecurity
subdomain: cloud-forensics
tags:
  - azure
  - activity-logs
  - forensics
  - cloud-security
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1078.004"]
---

# Analyzing Azure Activity Logs

## Overview

Investigate Azure Activity and Azure AD sign-in logs for unauthorized access and config changes.

## Prerequisites

| Requirement | Install |
|---|---|
| Azure CLI | `pip install azure-cli` |
| KQL | Kusto Query Language |
| Python 3.10+ | For agent tooling |

## Key Concepts

Azure Activity Logs record control plane operations. Combined with
Azure AD sign-in logs for investigating unauthorized access.

## Quick Reference

```bash
az monitor activity-log list --start-time 2026-01-01
node agent.js query --resource-group prod --days 7
node agent.js signin --user attacker@org.com --days 30
node agent.js report --investigation AZ-2026-001
```

## Workflow

1. Define scope
2. Query activity logs
3. Analyze sign-ins
4. Identify policy changes
5. Trace modifications
6. Correlate tenants
7. Document

## Detection

```yaml
title: Azure Activity Logs Detection
id: 5b85a784-1130-42fc-aa45-9cac89200269
status: experimental
description: Detects suspicious activity related to analyzing azure activity logs techniques in cloud forensics context
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventName: "*Unauthorized*"
  condition: selection
level: high
tags:
  - attack.t1078.004
  - attack.collection
falsepositives:
  - Scheduled compliance scanning by authorized security tools
```

## Verification

- Verify queries
- Confirm sign-in analysis
- Validate policy detection
- Check correlation
- Verify evidence

## References

- OWASP Testing Guide — https://owasp.org/www-project-web-security-testing-guide/
- MITRE ATT&CK — https://attack.mitre.org/
- NIST SP 800-53 — https://csf.tools/reference/nist-sp-800-53/
