Giter Site home page Giter Site logo

adaudit's Introduction

adaudit

PowerShell Script to perform a quick AD audit

_____ ____     _____       _ _ _
|  _  |    \   |  _  |_ _ _| |_| |_
|     |  |  |  |     | | | . | |  _|
|__|__|____/   |__|__|___|___|_|_|
                 by phillips321

If you have any decent powershell one liners that could be used in the script please let me know. I'm trying to keep this script as a single file with no requirements on external tools (other than ntdsutil and cmd.exe)

Run directly on a DC using a DA. If you don't trust the code I suggest reading it first and you'll see it's all harmless! (But shouldn't you be doing that anyway with code you download off the net and then run as DA??)

What this does

  • Device Information
    • Get-HostDetails
  • Domain Audit
    • Get-LastWUDate
    • Get-DCEval
    • Get-TimeSource
    • Get-PrivilegedGroupMembership
    • Get-MachineAccountQuota
    • Get-DefaultDomainControllersPolicy
    • Get-SMB1Support
    • Get-FunctionalLevel
    • Get-DCsNotOwnedByDA
    • Get-ReplicationType
    • Get-RecycleBinState
    • Get-CriticalServicesStatus
    • Get-RODC
  • Domain Trust Audit
    • Get-DomainTrusts
  • User Accounts Audit
    • Get-InactiveAccounts
    • Get-DisabledAccounts
    • Get-LockedAccounts
    • Get-AdminAccountChecks
    • Get-NULLSessions
    • Get-PrivilegedGroupAccounts
    • Get-ProtectedUsers
  • Password Information Audit
    • Get-AccountPassDontExpire
    • Get-UserPasswordNotChangedRecently
    • Get-PasswordPolicy
    • Get-PasswordQuality
  • Dumps NTDS.dit
    • Get-NTDSdit
  • Computer Objects Audit
    • Get-OldBoxes
  • GPO audit (and checking SYSVOL for passwords)
    • Get-GPOtoFile
    • Get-GPOsPerOU
    • Get-SYSVOLXMLS
    • Get-GPOEnum
  • Check Generic Group AD Permissions
    • Get-OUPerms
  • Check For Existence of LAPS in domain
    • Get-LAPSStatus
  • Check For Existence of Authentication Polices and Silos
    • Get-AuthenticationPoliciesAndSilos
  • Check for insecure DNS zones
    • Get-DNSZoneInsecure
  • Check for newly created users and groups
    • Get-RecentChanges
  • Check for ADCS vulnerabiltiies, ESC1,2,3,4 and 8.
  • Check for high value kerberoastable accounts
  • Check for ASREPRoastable accounts
  • Check for dangerous ACL permissions on Users, Groups and Computers.

Runtime Args

The following switches can be used in combination

  • -installdeps installs optionnal features (DSInternals)
  • -hostdetails retrieves hostname and other useful audit info
  • -domainaudit retrieves information about the AD such as functional level
  • -trusts retrieves information about any doman trusts
  • -accounts identifies account issues such as expired, disabled, etc...
  • -passwordpolicy retrieves password policy information
  • -ntds dumps the NTDS.dit file using ntdsutil
  • -oldboxes identified outdated OSs like XP/2003 joined to the domain
  • -gpo dumps the GPOs in XML and HTML for later analysis
  • -ouperms checks generic OU permission issues
  • -laps checks if LAPS is installed
  • -authpolsilos checks for existence of authentication policies and silos
  • -insecurednszone checks for insecure DNS zones
  • -recentchanges checks for newly created users and groups (last 30 days)
  • -adcs checks for ADCS vulnerabiltiies, ESC1,2,3,4 and 8.
  • -acl checks for dangerous ACL permissions on Users, Groups and Computers.
  • -spn checks for high value kerberoastable accounts
  • -asrep checks for ASREPRoastable accounts
  • -all runs all checks, e.g. AdAudit.ps1 -all

adaudit's People

Contributors

phillips321 avatar cool34000 avatar danti1988 avatar fuggles-5555 avatar kennymaccormik avatar thehodown avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.