Pentesting Tools

msuserstats : Streamlining Hybrid Microsoft Environments For Enhanced User Account Management

The msuserstats tool is a robust PowerShell-based solution designed to streamline user account management in hybrid Microsoft environments that use both Entra ID (formerly Azure AD) and Active Directory (AD).

It addresses common challenges such as reviewing user accounts, enforcing Multi-Factor Authentication (MFA), and identifying inactive accounts to enhance IT security.

Core Features

  1. Unified User View:
    msuserstats consolidates user accounts from Entra ID and AD into a single Excel file, avoiding duplicates by mapping accounts across platforms. This provides a comprehensive overview of member, guest, service, and admin accounts.
  2. Account Activity Monitoring:
    The tool determines the last sign-in activity for users in both Entra ID and AD, publishing the most recent sign-in date to help identify inactive accounts.
  3. MFA Reporting and Enforcement:
    Existing MFA methods are reported for all Entra ID users, including hardware tokens like OATH. Accounts without MFA enrollment can be blocked from accessing Office 365 services after a configurable grace period.
  4. Advanced Categorization:
    User accounts can be classified based on organizational units (OUs) in AD, such as country or entity structures. Special exception groups can be configured for service accounts or long-term inactive users, ensuring flexibility in account governance.
  5. Guest User Management:
    Guest accounts in Entra ID can be automatically deleted to maintain governance and security compliance.
  6. Security Enhancements:
    The tool supports integration with pentesting results (e.g., weak passwords identified via tools like Mimikatz) to flag vulnerable accounts.

Technical Details

  • Cross-Platform Support: While the tool supports PowerShell 7 for multi-platform use, certain features like AD user export require a Windows environment with RSAT tools installed.
  • Output Formats: Reports are generated in CSV and XLSX formats for easy sharing and review.
  • Configuration Options: Settings like tenant ID, inactive days threshold, and inclusion of AD can be customized in the config.ps1 file.

To begin using msuserstats:

  1. Clone the repository from GitHub.
  2. Install required PowerShell modules (ImportExcel, Microsoft.Graph.Users, etc.).
  3. Configure settings in config.ps1 as per your environment.
  4. Run the script using commands like ./msuserstats.ps1 to generate reports.

By automating routine account reviews and enforcing security policies, msuserstats simplifies user account management while enhancing organizational security.

Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

Limbo : The Modern Evolution Of SQLite

Limbo is an ambitious project aimed at reimagining SQLite, the widely-used embedded database, by rewriting…

21 minutes ago

Typst : Revolutionizing Typesetting With Markup And Speed

Typst is a modern, markup-based typesetting system designed to combine the power of LaTeX with…

21 minutes ago

Cube : The Semantic Layer For Data Applications

Cube is a powerful semantic layer designed to streamline the process of building data applications…

22 minutes ago

Iced : Unleashing The Power Of Rust For Cross-Platform GUI Development

Iced is a cross-platform GUI library for Rust, designed with a focus on simplicity and…

22 minutes ago

MEGR-APT : Harnessing Graph Neural Networks For Advanced Threat Detection

MEGR-APT is an advanced and scalable system designed for hunting Advanced Persistent Threats (APTs) by…

23 minutes ago

DarkCool : Unleashing Python’s Power In Cybersecurity

DarkCool is a comprehensive Python-based security tool designed to revolutionize the fields of penetration testing,…

2 hours ago