All Projects → joshua-d-miller → Macoslaps

joshua-d-miller / Macoslaps

Licence: mit
Swift binary that will change a local administrator password to a random generated password. Similar behavior to LAPS for Windows

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Macoslaps

Automatedlab
AutomatedLab is a provisioning solution and framework that lets you deploy complex labs on HyperV and Azure with simple PowerShell scripts. It supports all Windows operating systems from 2008 R2 to 2019, some Linux distributions and various products like AD, Exchange, PKI, IIS, etc.
Stars: ✭ 1,194 (+556.04%)
Mutual labels:  active-directory
Actionpacks
Public PowerShell script gallery for ScriptRunner.
Stars: ✭ 118 (-35.16%)
Mutual labels:  active-directory
Password pwncheck
Kerberos / Windows AD / Linux PAM password change check against breached lists (HIBP), and other rules
Stars: ✭ 152 (-16.48%)
Mutual labels:  active-directory
Mssqli Duet
SQL injection script for MSSQL that extracts domain users from an Active Directory environment based on RID bruteforcing
Stars: ✭ 82 (-54.95%)
Mutual labels:  active-directory
Psadhealth
A toolkit of AD specific health checks that you can run in your environment to ensure your Active Directory is running optimally.
Stars: ✭ 114 (-37.36%)
Mutual labels:  active-directory
Minimalistic Offensive Security Tools
A repository of tools for pentesting of restricted and isolated environments.
Stars: ✭ 135 (-25.82%)
Mutual labels:  active-directory
Terraform Provider Ad
Active Directory provider for HashiCorp Terraform (experimental)
Stars: ✭ 65 (-64.29%)
Mutual labels:  active-directory
Multiotp
multiOTP open source strong two factor authentication PHP library, OATH certified, with TOTP, HOTP, Mobile-OTP, YubiKey, SMS, QRcode provisioning, etc.
Stars: ✭ 173 (-4.95%)
Mutual labels:  active-directory
Adfs2
Multi Vagrant environment with Active Directory
Stars: ✭ 117 (-35.71%)
Mutual labels:  active-directory
Ldap Passwd Webui
Very simple web interface for changing password stored in LDAP or Active Directory (Samba 4 AD).
Stars: ✭ 150 (-17.58%)
Mutual labels:  active-directory
Powershell
PowerShell functions and scripts (Azure, Active Directory, SCCM, SCSM, Exchange, O365, ...)
Stars: ✭ 1,302 (+615.38%)
Mutual labels:  active-directory
Dllpasswordfilterimplant
DLL Password Filter Implant with Exfiltration Capabilities
Stars: ✭ 107 (-41.21%)
Mutual labels:  active-directory
Adsearch
A tool to help query AD via the LDAP protocol
Stars: ✭ 137 (-24.73%)
Mutual labels:  active-directory
Deathstar
Uses Empire's (https://github.com/BC-SECURITY/Empire) RESTful API to automate gaining Domain and/or Enterprise Admin rights in Active Directory environments using some of the most common offensive TTPs.
Stars: ✭ 1,221 (+570.88%)
Mutual labels:  active-directory
Adessentials
PowerShell Active Directory helper functions to manage healthy Active Directory
Stars: ✭ 153 (-15.93%)
Mutual labels:  active-directory
Aspnetcoreactivedirectorystarterkit
Starter kit to quickly create ASP.NET Core with On-Premises Active Directory Authentication.
Stars: ✭ 71 (-60.99%)
Mutual labels:  active-directory
Bonobo Git Server
Bonobo Git Server for Windows is a web application you can install on your IIS and easily manage and connect to your git repositories. Go to homepage for release and more info.
Stars: ✭ 1,693 (+830.22%)
Mutual labels:  active-directory
Cypheroth
Automated, extensible toolset that runs cypher queries against Bloodhound's Neo4j backend and saves output to spreadsheets.
Stars: ✭ 179 (-1.65%)
Mutual labels:  active-directory
Adsips
PowerShell module to interact with Active Directory using ADSI and the System.DirectoryServices namespace (.NET Framework)
Stars: ✭ 160 (-12.09%)
Mutual labels:  active-directory
Logontracer
Investigate malicious Windows logon by visualizing and analyzing Windows event log
Stars: ✭ 1,914 (+951.65%)
Mutual labels:  active-directory

macOS LAPS (Local Administrator Password Solution)

Swift binary that utilizes Open Directory to determine if the local administrator password has expired as specified by the Active Directory attribute dsAttrTypeNative:ms-Mcs-AdmPwdExpirationTime. If this is the case then a new randomly generated password will be set for the local admin account and a new expiration date will be set. The LAPS password is stored in the Active Directory attribute dsAttrTypeNative:ms-Mcs-AdmPwd. This attribute can only be read by those designated to view the attribute. The computer record can write to this attribute but it cannot read.

Requirements

The following preference keys must be set or the application will use the defaults:

LocalAdminAccount - Local Administrator Account. Default is 'admin'. (In String format)
DaysTillExpiration - Expiration date of random password. Default is 60 Days. (In Integer format)
PasswordLength - Length of randomly generated password. Default is 12. (In Integer format)
RemoveKeyChain - Remove the local admin keychains after password change. (In Boolean format, recommended)   RemovePassChars - Exclude any characters you'd like from the randomly generated password (In String format)
ExclusionSets - Exclude any character set you'd like by specifying a string in an array. Options are 'symbols', 'letters', and/or 'numbers'.
PreferredDC - Set your preferred Domain Controller to connect to [Useful when you have RODCs] (In String format) FirstPass - Use this key if you are LAPS Admin is a FileVault user. The script will read this key in if there isn't a keychain entry in System keychain for macOSLAPS. Once this has been completed, the keychain entry will then be used.

Method - The method to use with macOSLAPS. Default is AD for Active Directory. The other option is Local which will allow local rotation and no need to talk to Active Directory.

NOTE about FirstPass: macOSLAPS must know at least one password via config profile before we can start the keychain process. Setting this key before running it for the first time when it is your temporary admin password is the best method.

These parameters are set in the location /Library/Preferences/edu.psu.macoslaps.plist or you can use your MDM's Custom Settings to set these values.

NOTE: The Swift binary will most likely only work on macOS 10.10+. If you need to run LAPS on older versions of macOS please use the legacy version of macOSLAPS written in Python here

Exclusions

As pointed out by one of my fellow colleagues, the ' key on macOS cannot be used on Windows without opening the character map to enter it. Since this is very detriment to using a LAPS password from a Windows client I have made this key excluded by default.

Installation Instructions

At this time you can clone the repo or download a zip of the repo or you can use the package created using Packages to install. The package includes a Launch Daemon to run macOSLAPS every 90 minutes.

Usage

macOSLAPS is designed to run in an automated fashion (e.g. triggered by a Launch Daemon or your management tool of choice). It can be invoked manually at the command line by running /usr/local/laps/macOSLAPS as root.

Optional Flags

-resetPassword - generates a new password and writes it to the Active Directory computer record.
-version - prints out the current verison of macOSLAPS.

Logging

The script will also perform logging so that you know when the password is changed and its new expiration date or when the current unchanged password will expire. This file is stored in /Library/Logs/macOSLAPS.log

Feedback

Since this is a binary, it can be signed which means that the code itself will not display when viewing the executable. Please test this new version and report back results.

Local Admin Keychain

By default, the local admin you choose has its keychain deleted since we wouldn't know the randomized password.

Credits

  • Rusty Myers - For helping to determine that Windows has its own time method vs Epoch time
  • Matt Hansen - For critiquing and assisting with generating the random password
  • Allen Clouser and Jody Harpster - For showing me that the ' key cannot be used from a Windows client without character map
  • John Pater - For advising me on the idea of generating 10 random passwords and picking one randomly to further randomize the password
  • Joel Rennich - For taking my questions about Swift and advising me on better ways to utilize Swift. Another special thanks to Joel for advising me on saving the password in the System keychain to deal with secureToken.
  • Peter Szul - For working with me to determine the initial date set by a newly bound computer is invalid and we need to test writing to the Domain Controller with another value for the first run.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].