π«π· La documentation en franΓ§ais est disponible dans ReadmeFR.md.
SMAD-X (Simulate, Model and Audit Active Directory eXpert) is an expert Active Directory simulator built with Avalonia UI and .NET 10. It generates an AD structure faithful to a fresh Windows Server installation and lets you visualize, document and export it without any real infrastructure.
- Automatic generation of all containers and objects present in a freshly promoted AD domain:
- Builtin: Administrators, Users, Guests, Server Operators, Account Operators, Backup Operatorsβ¦
- Users: Administrator, Guest, krbtgt, DefaultAccount, WDAGUtilityAccount + 16 default domain groups (Domain Admins, Schema Admins, Enterprise Admins, Protected Users, Key Admins, Cloneable Domain Controllers, Denied/Allowed RODC Password Replication Groupβ¦)
- Computers: default container for domain-joined workstations
- Domain Controllers (OU): DC01 with all FSMO roles
- System: Password Settings Container, Policies (Default Domain Policy, Default Domain Controllers Policy)
- ForeignSecurityPrincipals
- Create a custom domain via
File > New Domain - Distinguished Names computed automatically
- Force-directed visualization of all relationships between objects
- Separate rendering of User β Group memberships and Group β Group nesting
- Filters by object type (User, Group, Computer, OU, GPO, PSOβ¦) and by tier
- Pan, zoom and node selection
- User β Group: dedicated tab to assign users to groups
- Group β Group: dedicated tab to manage group nesting (groups inside groups)
- GPO: Group Policy Object links to domains and OUs, with visual badge
π GPOin the tree - PSO: Password Settings Object assignment to users and groups
- GPOs are created under
System\Policiesto match the real AD structure
- Native JSON (
.smadx.json): full save and reload of the structure - PowerShell: ready-to-deploy scripts to create the structure in a real AD
- AD structure export (OUs, users, groups)
- Linked GPOs export
- PSOs export
- Tier 0: Domain controllers, critical accounts and systems
- Tier 1: Infrastructure and application servers
- Tier 2: Workstations and standard users
- Per-tier colors configurable through the UI
- Every object has a rich Markdown description with role and security notes
- Edit / Preview toggle
- Pre-filled and localized descriptions for all default objects including security posture
- Switch between Light and Dark themes at runtime β no restart required
- Native Avalonia FluentTheme β menus and popups always rendered in the correct theme
- Search bar above the TreeView: filter nodes by name, type or description
- Non-matching nodes are hidden; parent nodes are automatically expanded
- Clear button to reset the filter instantly
- Full interface available in French and English β language switch at runtime
- Dedicated window listing all AD delegation entries (trustee, right, target DN, category, tier, inheritance)
- Live filters by trustee, target DN, category (PasswordReset, ComputerManagement, AccountUnlock, AttributeWrite, FullControl, Other) and hide inherited toggle
- Statistics bar showing delegation counts by category
- Export to CSV for audit and reporting
- Load two
.smadx.jsonfiles (older vs. newer) and compute a structured diff - Highlights Added, Removed and Modified objects
- Filters by change type, object type and free-text search
- Summary statistics (added / removed / modified counts)
- Export diff to CSV
- Name validation following AD rules (forbidden characters, length, uniqueness)
- Container rules enforced (e.g. a Container can only hold CN objects, not OUs)
- Prerequisites: .NET 10 SDK β Windows, macOS or Linux
- Build:
dotnet build - Run:
dotnet run --project SMAD-X/SMAD-X.csproj
On launch, SMAD-X automatically loads a contoso.com domain with a complete AD structure faithful to a fresh Windows Server installation.
File > New Domain β enter the FQDN (e.g. corp.local) and choose whether tiering should be assigned automatically.
- Select a parent node in the tree
- Use the toolbar buttons: π OU, π€ User, π₯ Group, π» Computer, π GMSAβ¦
- The object is created as a child of the selected node, with its DN computed automatically
| Action | Shortcut |
|---|---|
| Copy an object (and its children) | Ctrl+C |
| Paste into the selected container | Ctrl+V |
| Delete | Del |
View > Graph View: force-directed visualization of all relationships.
Filter by object type or tier using the sidebar checkboxes.
Toggle Group nesting to display Group β Group edges separately.
View > Relations: dedicated window with four tabs:
| Tab | Purpose |
|---|---|
| π€ User β Group | Assign users to groups |
| π₯ Group β Group | Manage group nesting |
| π GPO Links β OU | Link Group Policy Objects to OUs/Domain |
| π PSO Subjects | Assign Password Settings Objects |
View > Delegations: lists all delegation entries with filters by trustee, target DN, category and inheritance.
Export the full list to CSV for audit purposes.
View > AD Timeline: compare two .smadx.json snapshots side-by-side.
Review added, removed and modified objects with export to CSV.
| Action | Menu |
|---|---|
| Save | File > Save⦠(.smadx.json) |
| Open | File > Open⦠|
| Export PowerShell (structure) | File > Export PowerShell > AD Structure |
| Export PowerShell (GPOs) | File > Export PowerShell > GPOs |
| Export PowerShell (PSOs) | File > Export PowerShell > PSOs |
Every default object includes an in-app Markdown description with role and security guidance.
| Object | Type | Role | Key Security Points |
|---|---|---|---|
| Administrator | Account | Full domain access | Rename it, disable when not needed, monitor PtH / Mimikatz (Event 4624 type 3) |
| krbtgt | Account | Signs all Kerberos TGTs | Never delete/enable β Golden Ticket risk β rotate every 180 days (double rotation) |
| Domain Admins | Group | Full domain control | Keep minimal, use PAW, monitor Event 4728/4729 |
| Enterprise Admins | Group | Full forest control | Keep empty β add members only for forest-wide operations |
| Schema Admins | Group | Modify AD schema | Keep empty β schema changes are irreversible |
| Domain Controllers | Group | All domain controllers | A compromised DC = compromised domain |
| Read-Only Domain Controllers | Group | Contains RODCs | Manage Password Replication Policy carefully |
| DnsAdmins | Group | DNS administration | Privilege escalation via DLL injection (Shay Ber 2017 β Event 4662) |
| Key Admins | Group | Manage msDS-KeyCredentialLink | Shadow Credentials attack (Whisker / pyWhisker) |
| Enterprise Key Admins | Group | Key Admins, forest-wide scope | Shadow Credentials β forest scope β keep empty |
| Cloneable Domain Controllers | Group | DC cloning | Cloned DC inherits source DC secrets β control membership |
| Object | Key Risk |
|---|---|
| Group Policy Creator Owners | Malicious GPO deployment β monitor Event 5136/5137 |
| Cert Publishers | PKI escalation ESC1βESC8 (Certify / Certipy) |
| RAS and IAS Servers | VPN/RADIUS interception if compromised |
| DnsUpdateProxy | DNS hijacking via ownerless DNS records |
| Allowed RODC Replication | Never place Tier 0 accounts here |
| Object | Note |
|---|---|
| Protected Users | Add all Tier 0/1 accounts β blocks PtH, PtT, OverPtH, RC4, DES |
| Denied RODC Replication | Keep up-to-date with all critical accounts |
| Domain Users | Default group for all domain accounts β audit memberships |
| Domain Computers | All domain-joined machines β monitor unauthorized joins |
| Object | Note |
|---|---|
| Guest | Disabled by default since Server 2008 β do not enable |
| DefaultAccount | System account β do not modify |
| WDAGUtilityAccount | Windows Defender Application Guard β do not modify |
| Tier | Color | Scope |
|---|---|---|
| Tier 0 | π΄ Red | Domain controllers, critical accounts and systems |
| Tier 1 | π Orange | Infrastructure and application servers |
| Tier 2 | π’ Green | Workstations and standard users |
Colors are configurable via Settings > Tier Configuration.
SMAD-X/
βββ Models/
β βββ ADObject.cs # Core data model (DN, GPO, PSO, MemberOfβ¦)
β βββ ADObjectType.cs # AD object type enumeration
β βββ ADTreeNode.cs # TreeView display node (GPO badge, tier color)
β βββ TierConfiguration.cs # Tier color configuration
βββ Services/
β βββ ADDataService.cs # Default structure, JSON save/load
β βββ ADImportPowerShellService.cs # Import from PowerShell scripts
β βββ ADPowerShellExportService.cs # Export to PowerShell scripts
β βββ ADValidationService.cs # Name validation and container rules
β βββ LocalizationService.cs # FR/EN multilingual support + security descriptions
β βββ ThemeService.cs # Light/Dark theme management
βββ ViewModels/
β βββ MainWindowViewModel.cs # Main ViewModel (MVVM)
β βββ GraphViewModel.cs # Graph view ViewModel
β βββ RelationsViewModel.cs # Relations ViewModel (UserβGroup, GroupβGroup, GPO, PSO)
β βββ DelegationsViewModel.cs # Delegations ViewModel (filter, stats, CSV export)
β βββ DomainTimelineViewModel.cs # Timeline ViewModel (diff, filters, CSV export)
β βββ TierConfigurationViewModel.cs
βββ Views/
β βββ MainWindow.axaml # Main interface with GPO badge in tree
β βββ GraphWindow.axaml # Force-directed graph view
β βββ RelationsWindow.axaml # Relations window (4 tabs)
β βββ DelegationsWindow.axaml # Delegations viewer with filters and CSV export
β βββ DomainTimelineWindow.axaml # AD Timeline diff viewer
β βββ NewDomainDialog.axaml # New domain dialog
β βββ TierConfigurationWindow.axaml
β βββ AboutDialog.axaml
βββ Graph/
β βββ GraphBuilder.cs # Build graph from AD tree
β βββ GraphCanvas.cs # Avalonia graph renderer (zoom/pan/hit-test)
β βββ GraphNode.cs / GraphEdge.cs # Graph model
β βββ GraphFilter.cs # Type/tier/nesting filters
β βββ ForceSimulation.cs # Force-directed algorithm
βββ Converters/
βββ BoolToStringConverter.cs
βββ LocalizeConverter.cs
βββ MarkdownConverter.cs
| Component | Version | Role |
|---|---|---|
| .NET | 10 | Cross-platform runtime |
| Avalonia UI | 12.0.3 | Cross-platform UI framework |
| CommunityToolkit.Mvvm | latest | MVVM implementation |
| Markdig | latest | Markdown rendering |
| System.Text.Json | built-in | JSON serialization |
| Profile | Use Case |
|---|---|
| Trainer / Student | Learn and teach AD concepts without real infrastructure |
| Administrator | Document and audit an existing AD architecture |
| Architect | Design and validate a new AD structure before deployment |
| Pentester / Red Team | Visualize attack paths via group relations, tiers and default account security notes |
| Integrator | Generate ready-to-deploy PowerShell scripts |
- Complete default AD structure faithful to a fresh domain
- Force-directed relationship graph view
- GPO / PSO / MemberOf management
- PowerShell export (structure, GPOs, PSOs)
- Multilingual support FR/EN
- Rich Markdown descriptions with security notes for all default accounts/groups
- Import from a real Active Directory (via PowerShell)
- Group nesting (Group β Group) in graph and relations
- GPO visual badge in TreeView
- Split Relations window: User β Group and Group β Group tabs
- Avalonia upgrade to 12.0.3 (FluentTheme, performance improvements)
- Light / Dark theme (native Avalonia FluentTheme)
- Search and filtering in the tree (live search by name / type / description)
- Delegations viewer (filter by trustee / target DN / category / inheritance, CSV export)
- AD Timeline β diff between two snapshots (added / removed / modified, CSV export)
- Multi-domain / forest support
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0).
- Share β copy and redistribute the material in any medium or format
- Adapt β remix, transform, and build upon the material
- Attribution β You must give appropriate credit, provide a link to this repository, and indicate if changes were made.
Based on SMAD-X β Expert Active Directory Simulator Original work: https://github.com/JM2K69/SMAD-X Copyright (c) 2025-2026 SMAD-X Project Licensed under CC BY-NC 4.0 - NonCommercial β You may not use this project for commercial purposes without explicit prior written permission.
See the full LICENSE file for details.
Inspired by MockAD-Release by shokkadev.
Contributions are welcome! Feel free to open issues or pull requests.
JM2K69


