LAPS
Informazioni di base
La Soluzione per la Password dell'Amministratore Locale (LAPS) è uno strumento utilizzato per gestire un sistema in cui le password degli amministratori, che sono uniche, casuali e frequentemente cambiate, vengono applicate ai computer uniti al dominio. Queste password sono memorizzate in modo sicuro all'interno di Active Directory e sono accessibili solo agli utenti a cui è stata concessa l'autorizzazione tramite le Liste di Controllo degli Accessi (ACL). La sicurezza delle trasmissioni delle password dal client al server è garantita dall'uso di Kerberos versione 5 e Standard di Crittografia Avanzata (AES).
Nagli oggetti computer del dominio, l'implementazione di LAPS comporta l'aggiunta di due nuovi attributi: ms-mcs-AdmPwd
e ms-mcs-AdmPwdExpirationTime
. Questi attributi memorizzano rispettivamente la password dell'amministratore in chiaro e il suo tempo di scadenza.
Controlla se attivato
Accesso alla Password LAPS
Puoi scaricare la policy LAPS grezza da \\dc\SysVol\domain\Policies\{4A8A4E8E-929F-401A-95BD-A7D40E0976C8}\Machine\Registry.pol
e poi utilizzare Parse-PolFile
dal pacchetto GPRegistryPolicyParser per convertire questo file in un formato leggibile dall'uomo.
Inoltre, i cmdlet PowerShell nativi di LAPS possono essere utilizzati se sono installati su una macchina a cui abbiamo accesso:
PowerView può essere utilizzato anche per scoprire chi può leggere la password e leggerla:
LAPSToolkit
Il LAPSToolkit facilita l'enumerazione di LAPS con diverse funzioni.
Una consiste nel parsing di ExtendedRights
per tutti i computer con LAPS abilitato. Questo mostrerà gruppi specificamente delegati a leggere le password LAPS, che sono spesso utenti in gruppi protetti.
Un account che ha unito un computer a un dominio riceve All Extended Rights
su quell'host, e questo diritto conferisce all'account la capacità di leggere le password. L'enumerazione può mostrare un account utente che può leggere la password LAPS su un host. Questo può aiutarci a mirare a utenti AD specifici che possono leggere le password LAPS.
Dumping LAPS Passwords With Crackmapexec
Se non c'è accesso a PowerShell, puoi abusare di questo privilegio da remoto tramite LDAP utilizzando
Questo estrarrà tutte le password che l'utente può leggere, permettendoti di ottenere una migliore posizione con un altro utente.
** Utilizzando la Password LAPS **
Persistenza LAPS
Data di Scadenza
Una volta diventati admin, è possibile ottenere le password e prevenire che una macchina aggiorni la sua password impostando la data di scadenza nel futuro.
La password verrà comunque reimpostata se un admin utilizza il Reset-AdmPwdPassword
cmdlet; o se Non consentire un tempo di scadenza della password più lungo di quanto richiesto dalla policy è abilitato nella GPO LAPS.
Backdoor
Il codice sorgente originale per LAPS può essere trovato qui, quindi è possibile inserire una backdoor nel codice (all'interno del metodo Get-AdmPwdPassword
in Main/AdmPwd.PS/Main.cs
, ad esempio) che in qualche modo esfiltra nuove password o le memorizza da qualche parte.
Poi, basta compilare il nuovo AdmPwd.PS.dll
e caricarlo sulla macchina in C:\Tools\admpwd\Main\AdmPwd.PS\bin\Debug\AdmPwd.PS.dll
(e cambiare l'ora di modifica).
Riferimenti
Last updated