Skip to content

JM2K69/SMAD-X

Repository files navigation

SMAD-X β€” Expert Active Directory Simulator

Version .NET Avalonia Platform Language License Total Downloads

SMAD-X screenshot

SMAD-X screenshot

πŸ‡«πŸ‡· 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.


🎯 Features

πŸ—οΈ Complete and Faithful Default AD Structure

  • 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

🌐 Interactive Relationship Graph

  • 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

πŸ”— Relationship Management

  • 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 πŸ”— GPO in the tree
  • PSO: Password Settings Object assignment to users and groups
  • GPOs are created under System\Policies to match the real AD structure

πŸ“€ Export

  • 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

🎨 Microsoft Tiering Model

  • 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

πŸ“ Built-in Markdown Documentation

  • 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

πŸŒ™ Light / Dark Theme

  • Switch between Light and Dark themes at runtime β€” no restart required
  • Native Avalonia FluentTheme β€” menus and popups always rendered in the correct theme

πŸ” Live Search in Tree

  • 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

🌍 Multilingual Support

  • Full interface available in French and English β€” language switch at runtime

πŸ›‘οΈ Delegations Viewer

  • 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

⏱️ AD Timeline β€” Diff between two snapshots

  • Load two .smadx.json files (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

βœ… Active Directory Validation

  • Name validation following AD rules (forbidden characters, length, uniqueness)
  • Container rules enforced (e.g. a Container can only hold CN objects, not OUs)

πŸš€ Quick Start

  1. Prerequisites: .NET 10 SDK β€” Windows, macOS or Linux
  2. Build: dotnet build
  3. Run: dotnet run --project SMAD-X/SMAD-X.csproj

πŸ“– Usage

Default Structure on Startup

On launch, SMAD-X automatically loads a contoso.com domain with a complete AD structure faithful to a fresh Windows Server installation.

Create a New Domain

File > New Domain β†’ enter the FQDN (e.g. corp.local) and choose whether tiering should be assigned automatically.

Add Objects

  • 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

Copy / Paste

Action Shortcut
Copy an object (and its children) Ctrl+C
Paste into the selected container Ctrl+V
Delete Del

Graph View

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.

Relations Window

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

Delegations Window

View > Delegations: lists all delegation entries with filters by trustee, target DN, category and inheritance. Export the full list to CSV for audit purposes.

AD Timeline

View > AD Timeline: compare two .smadx.json snapshots side-by-side. Review added, removed and modified objects with export to CSV.

Save / Load

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

πŸ” Default Accounts & Groups β€” Security Reference

Every default object includes an in-app Markdown description with role and security guidance.

πŸ”΄ Tier 0 β€” Critical (Domain / Forest)

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

🟠 Tier 1 β€” Elevated Privileges

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

🟑 Tier 2 β€” Monitoring Required

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

🟒 System / Low Risk

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

🎨 Microsoft Tiering Model

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.


πŸ—οΈ Architecture

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

πŸ”§ Technologies

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

πŸ“ Use Cases

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

SMAD-X screenshot

🎯 Roadmap

  • 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

πŸ“„ License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0).

License: CC BY-NC 4.0

βœ… You are free to

  • Share β€” copy and redistribute the material in any medium or format
  • Adapt β€” remix, transform, and build upon the material

⚠️ Under the following terms

  • 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.

🀝 Contributing

Contributions are welcome! Feel free to open issues or pull requests.

πŸ‘¨β€πŸ’» Author

JM2K69

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages