|
1 | 1 | --- |
2 | 2 | name: e8cr-appcontrol |
3 | | -description: Essential Eight Application Control Bot — autonomous policy engineer for WDAC/AppLocker, Office macro restrictions, and user application hardening. Connects to Microsoft Graph (Intune) for policy deployment and compliance monitoring. Use when operating as the Application Control bot, managing WDAC policies, auditing macro settings, enforcing browser/Office hardening, or generating ML2 evidence reports. |
| 3 | +description: > |
| 4 | + Essential Eight Application Control Bot — autonomous Intune policy engineer for |
| 5 | + WDAC/AppLocker, Office macro restrictions, and user application hardening. |
| 6 | + Covers Application Control, Configure MS Office Macros, and User App Hardening at ML2. |
| 7 | + Generates audit-ready evidence and weekly compliance reports. |
4 | 8 | --- |
5 | 9 |
|
6 | 10 | # E8CR Application Control Bot |
7 | 11 |
|
8 | | -Autonomous policy engineer covering three Essential Eight controls at ML2: |
9 | | -1. **Application Control** — WDAC/AppLocker policy management |
10 | | -2. **Configure MS Office Macro Settings** — Macro restriction enforcement |
11 | | -3. **User Application Hardening** — Browser, PDF reader, Office hardening |
| 12 | +## Read order before operation |
| 13 | +1. `SOUL.md` |
| 14 | +2. `AGENTS.md` |
| 15 | +3. `MEMORY.md` |
| 16 | +4. `TOOLS.md` |
| 17 | +5. `HEARTBEAT.md` |
| 18 | +6. `references/ml2-appcontrol-requirements.md` |
12 | 19 |
|
13 | | -## Setup |
| 20 | +## Controls You Own |
| 21 | +- Application Control |
| 22 | +- Configure Microsoft Office macro settings |
| 23 | +- User application hardening |
14 | 24 |
|
15 | | -Required environment variables: |
16 | | -``` |
17 | | -AZURE_TENANT_ID=<customer tenant id> |
18 | | -AZURE_CLIENT_ID=<app registration client id> |
19 | | -AZURE_CLIENT_SECRET=<app registration client secret> |
| 25 | +## Environment |
| 26 | +```bash |
| 27 | +AZURE_TENANT_ID= |
| 28 | +AZURE_CLIENT_ID= |
| 29 | +AZURE_CLIENT_SECRET= |
| 30 | +E8CR_ENABLE_CHANGES=false |
20 | 31 | ``` |
21 | 32 |
|
22 | | -## Microsoft Graph Integration |
23 | | - |
24 | | -### Authentication |
25 | | -Uses shared `graph_auth.py` (same as VM+PM and Identity bots). Client credentials flow. |
| 33 | +## Graph Permissions (Application) |
| 34 | +- `DeviceManagementConfiguration.Read.All` |
| 35 | +- `DeviceManagementManagedDevices.Read.All` |
26 | 36 |
|
27 | | -Required Azure AD App Registration permissions (Application type): |
28 | | -- `DeviceManagementConfiguration.Read.All` — Read Intune configuration profiles |
29 | | -- `DeviceManagementConfiguration.ReadWrite.All` — Deploy/update configuration profiles |
30 | | -- `DeviceManagementManagedDevices.Read.All` — Read device compliance status |
| 37 | +(Write perms should only be added if/when you actually implement policy deployment. Keep read-only by default.) |
31 | 38 |
|
32 | | -### Application Control Audit |
33 | | -`scripts/intune_appcontrol.py` — Pull WDAC/AppLocker policy status from Intune. |
34 | | -```bash |
35 | | -python3 scripts/intune_appcontrol.py --mode audit # Current policy status |
36 | | -python3 scripts/intune_appcontrol.py --mode events # Blocked execution events |
37 | | -python3 scripts/intune_appcontrol.py --mode compliance # Per-device compliance |
38 | | -``` |
| 39 | +## Common operations |
39 | 40 |
|
40 | | -### Macro Settings Audit |
41 | | -`scripts/intune_macros.py` — Audit Office macro configuration profiles. |
| 41 | +### Audit current posture |
42 | 42 | ```bash |
43 | | -python3 scripts/intune_macros.py --mode audit # Current macro policies |
44 | | -python3 scripts/intune_macros.py --mode compliance # Per-device macro compliance |
| 43 | +python3 scripts/intune_appcontrol.py --mode audit |
| 44 | +python3 scripts/intune_macros.py --mode audit |
| 45 | +python3 scripts/intune_hardening.py --mode audit |
45 | 46 | ``` |
46 | 47 |
|
47 | | -### User Application Hardening Audit |
48 | | -`scripts/intune_hardening.py` — Audit browser, PDF, Office hardening profiles. |
| 48 | +### Compliance snapshot |
49 | 49 | ```bash |
50 | | -python3 scripts/intune_hardening.py --mode audit # Current hardening policies |
51 | | -python3 scripts/intune_hardening.py --mode compliance # Per-device compliance |
| 50 | +python3 scripts/intune_appcontrol.py --mode compliance |
| 51 | +python3 scripts/intune_macros.py --mode compliance |
| 52 | +python3 scripts/intune_hardening.py --mode compliance |
52 | 53 | ``` |
53 | 54 |
|
54 | | -### Evidence Report |
55 | | -`scripts/generate_report.py` — Generate ML2 compliance evidence report. |
| 55 | +### Block events (if available) |
56 | 56 | ```bash |
57 | | -python3 scripts/generate_report.py --input /tmp/e8cr-demo/appcontrol/ --output report.html |
58 | | -python3 scripts/generate_report.py --input /tmp/e8cr-demo/appcontrol/ --output report.html --type executive |
| 57 | +python3 scripts/intune_appcontrol.py --mode events |
59 | 58 | ``` |
60 | 59 |
|
61 | | -### Demo Data |
62 | | -`scripts/demo_generate.py` — Generate realistic synthetic data for sales demos. |
| 60 | +### Report generation |
63 | 61 | ```bash |
64 | | -python3 scripts/demo_generate.py --output /tmp/e8cr-demo/appcontrol/ |
65 | | -python3 scripts/demo_generate.py --output /tmp/e8cr-demo/appcontrol/ --full-pipeline |
| 62 | +python3 scripts/generate_report.py --input ./evidence/ --output ./reports/appcontrol-report.html |
66 | 63 | ``` |
67 | 64 |
|
68 | | -## Safe Mode |
69 | | - |
70 | | -Write actions are **disabled by default**. To enable: |
| 65 | +### Demo mode |
71 | 66 | ```bash |
72 | | -export E8CR_ENABLE_CHANGES=true |
| 67 | +python3 scripts/demo_generate.py --output ./demo --full-pipeline |
73 | 68 | ``` |
74 | | -Run in audit mode first. Review outputs. Then enable changes intentionally. |
75 | | - |
76 | | -## Operational Cadence |
77 | | - |
78 | | -- **Continuous:** Monitor WDAC block events, exception requests |
79 | | -- **Daily:** Review blocked executions, check for software needing policy updates |
80 | | -- **Weekly:** Policy compliance report, exception review |
81 | | -- **Monthly:** Full policy audit, stale exception cleanup, ML2 evidence snapshot |
82 | | - |
83 | | -## ML2 Requirements Covered |
84 | | - |
85 | | -### Application Control (ML2) |
86 | | -- Application control implemented on workstations |
87 | | -- Restricts execution to approved set (publisher rules + path rules + hash rules) |
88 | | -- Microsoft's recommended block rules implemented |
89 | | -- Rulesets validated annually or more frequently |
90 | | - |
91 | | -### Configure MS Office Macro Settings (ML2) |
92 | | -- Macros from internet are blocked (Mark of the Web) |
93 | | -- Macros only allowed in trusted locations with trusted publishers |
94 | | -- Win32 API access from macros is blocked |
95 | 69 |
|
96 | | -### User Application Hardening (ML2) |
97 | | -- Web browsers don't process Java from internet |
98 | | -- Web browsers don't process web advertisements |
99 | | -- IE11 disabled or removed |
100 | | -- .NET Framework 3.5 disabled or removed (if not needed) |
101 | | -- PowerShell 2.0 disabled or removed |
| 70 | +## Operating rules |
| 71 | +- Audit-first (collect telemetry before enforcement) |
| 72 | +- Exceptions must be documented and scoped |
| 73 | +- Enforcing app control is high-blast-radius — escalate before broad rollout |
0 commit comments