Scopri vari metodi per individuare quando e chi ha creato un account utente in Active Directory, insieme agli account recenti.
In molte organizzazioni, avere una panoramica completa su chi ha creato un account utente in Active Directory (AD) è cruciale per garantire la sicurezza e la conformità alle norme interne. Esistono diverse tecniche per determinare queste informazioni e monitorare gli account appena creati.
Metodi per trovare chi ha creato un account utente in AD
La creazione di un account utente in Active Directory può essere tracciata attraverso vari strumenti e tecniche. Questo processo è essenziale per mantenere un ambiente sicuro, specialmente in contesti aziendali di grandi dimensioni dove la gestione dei permessi e delle autenticazioni è fondamentale.
1. Utilizzare il Visualizzatore eventi di Windows
Uno dei metodi più diretti è utilizzare il Visualizzatore eventi di Windows. Ad esempio:
- Apri il Visualizzatore eventi tramite il comando eventvwr.msc o cercandolo nel menu Start.
- Naviga su Registri di Windows, poi Sicurezza.
- Cerca l’ID evento 4720, che indica la creazione di un nuovo account utente.
- Analizzando i dettagli dell’evento, troverai informazioni sull’account utente creato e l’utente che ha effettuato la creazione.
2. Utilizzare PowerShell
Un altro potente strumento per ottenere queste informazioni è PowerShell. Puoi usare uno script specifico per estrarre i dati desiderati. Ecco un esempio di script:
Get-EventLog -LogName Security -InstanceId 4720 | ForEach-Object { $_.Message -match "Account Name:s+(w+)" | Out-Null $account = $matches[1] $_.Message -match "Target Account Name:s+(w+)" | Out-Null $creator = $matches[1] [PSCustomObject]@{ 'DataCreazione' = $_.TimeGenerated; 'AccountCreato' = $creator; 'Creatore' = $account }}
Questo script cerca nei log di sicurezza gli eventi con ID 4720 e estrae il nome dell’account utente creato e il nome dell’utente che ha effettuato la creazione. Sarà così possibile ottenere una lista dettagliata con data di creazione, account creato e creatore.
3. Strumenti di terze parti
Sono disponibili vari strumenti di terze parti in grado di monitorare e registrare le operazioni su Active Directory in modo più dettagliato e con reportistica avanzata. Alcuni di questi strumenti includono SolarWinds, ManageEngine ADAudit Plus e Netwrix Auditor, che forniscono interfacce intuitive per le analisi di sicurezza su Active Directory.
4. Attivare la registrazione delle modifiche in AD
Attivare la registrazione dettagliata delle modifiche in Active Directory può semplificare il monitoraggio. Per farlo:
- Vai nelle policy di gruppo e accedi a Configuration => Policies => Windows Settings => Security Settings => Advanced Audit Policy Configuration => Audit Policies.
- Attiva l’audit per “Account Management”, includendo sia Successi che Fallimenti.
Con questa configurazione, ogni volta che viene creato un account utente, sarà generato un evento nei log di sicurezza contenente informazioni dettagliate sull’operazione.
Monitoraggio degli account creati di recente
Oltre a scoprire chi ha creato specifici account, potrebbe essere utile monitorare tutti gli account creati recentemente. Un semplice script PowerShell per questo scopo potrebbe essere:
Search-ADAccount -UsersOnly -AccountCreatedAfter (Get-Date).AddDays(-7) | Select-Object Name, AccountCreationDate
Questo comando restituisce tutti gli account utente creati negli ultimi sette giorni, permettendo un monitoraggio proattivo.
Implementare questi metodi e strumenti non solo migliora la sicurezza, ma facilita anche la conformità con le politiche aziendali di gestione degli accessi e delle identità.