Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_meta_box_present is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_send_notification is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_modify_title_and_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_heading is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$response_body is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Privilegi SYSTEM su Windows: il potere assoluto è a portata di comando | IlSoftware.it

Privilegi SYSTEM su Windows: il potere assoluto è a portata di comando

In ambito Windows, il contesto NT AUTHORITY\SYSTEM rappresenta il livello più alto di privilegi, superiore anche a quello dell'amministratore. Vediamo come ottenere una shell SYSTEM locale in modo legittimo utilizzando PsExec, strumento della suite Sysinternals di Microsoft.

Parlando di amministrazione dei sistemi Windows, esiste un livello superiore a quello dell’utente amministratore. Si tratta del contesto NT AUTHORITY\SYSTEM, noto semplicemente come SYSTEM, che rappresenta il cuore operativo del sistema Microsoft: è il contesto in cui girano i servizi essenziali, i processi kernel-mode e le componenti critiche di Windows.

C’è un sistema, tutto sommato poco conosciuto, che permette di arrivare ad ottenere una shell SYSTEM utilizzando uno strumento ufficiale di Microsoft: PsExec, parte della suite Sysinternals.

Cos’è il contesto SYSTEM su Windows e quando è utile?

In ambiente Windows, SYSTEM è un account speciale utilizzato internamente da Windows per eseguire processi che devono avere accesso illimitato al sistema. È più potente persino dell’utente amministratore (ah, a proposito, Windows ha un account amministratore nascosto chiamato Administrator), poiché:

  • Può accedere a tutti i file, chiavi di registro e risorse, anche quelle protette.
  • Bypassa l’UAC (User Account Control).
  • Può interagire con altri processi privilegiati, anche quelli di sistema.
  • È isolato da altri account, inclusi gli utenti amministratori.

I privilegi SYSTEM sono utili in una serie di scenari. Ad esempio attività di debug e diagnostica avanzata, per l’analisi di malware o rootkit, ripristino di configurazioni di sistema critiche, testing di script e servizi come farebbe il sistema operativo, modifica di ACL (Access Control List) o chiavi di registro inaccessibili agli account amministrativi, accesso a profili utente bloccati.

Avviare una shell SYSTEM locale con PsExec

PsExec è uno strumento della suite Sysinternals, mantenuta da Microsoft. Permette di avviare processi in locale o in remoto in un contesto diverso da quello dell’utente corrente. È completamente portatile (nessuna installazione) e può essere utilizzato da riga di comando.

Per acquisire i privilegi SYSTEM in una qualunque installazione di Windows collegata alla rete Internet, basta digitare cmd nella casella di ricerca del sistema operativo, scegliere Esegui come amministratore quindi digitare quanto segue:

net use Z: \\live.sysinternals.com\tools

Z:\psexec -i -s cmd.exe

Il primo passaggio non fa altro che “montare” un’unità virtuale Z: con al suo interno tutte le utilità Sysinternals nelle versioni più aggiornate. Il comando seguente avvia PsExec con le opzioni che permettono l’interazione con la sessione utente (interfaccia grafica visibile), l’attivazione del profilo SYSTEM e l’esecuzione del processo cmd.exe.

Il riferimento a cmd.exe può essere eventualmente sostituito con powershell.exe, regedit.exe o qualsiasi altro. È comunque un’ottima base di partenza perché dal prompt dei comandi aperto con i privilegi SYSTEM si può avviare qualsiasi altra cosa, con gli stessi diritti.

Controllare l’acquisizione dei privilegi SYSTEM

Nell’esempio citato in precedenza, PsExec apre una nuova finestra del prompt dei comandi (cmd.exe), questa volta con i diritti SYSTEM.

Per verificarlo basta digitare il comando whoami e premere Invio: se compare, come risposta, quanto segue significa che l’acquisizione dei privilegi SYSTEM è avvenuta con successo:

nt authority\system

Acquisizione privilegi SYSTEM in Windows

Per chiudere la finestra con i privilegi SYSTEM, basta digitare exit (appare il messaggio cmd.exe exited on … with error code 0: è assolutamente normale) mentre con il comando seguente si può “smontare” l’unità virtuale Z con le utilità Sysinternals:

net use Z: /delete

Bella forza! Ma se devo disporre dei diritti di amministratore per acquisire i privilegi SYSTEM dov’è il vantaggio

Se per ottenere i privilegi SYSTEM serve di essere già amministratori, dove sta l’effettivo vantaggio?

Iniziamo col dire che esistono modi per acquisire privilegi SYSTEM anche senza essere amministratori ma non è certo lo scopo di questo articolo. Questo tipo di comportamento sfrutta vulnerabilità del sistema per acquisire i diritti più estesi in assoluto.

La soluzione che abbiamo proposto è assolutamente legittima e risulta molto comoda per tutti coloro che non riescono a risolvere alcuni problemi di Windows profondi. Il bonus consiste nel superare i limiti che anche un amministratore può incontrare. Il contesto SYSTEM è di gran lunga più potente consentendo un accesso senza limitazioni a risorse protette (cartelle e chiavi del registro di Windows), ai servizi e ai driver, senza l’intervento di UAC.

Quando SYSTEM serve davvero

I privilegi SYSTEM diventano indispensabili in scenari avanzati dove anche i diritti amministrativi non bastano. In ambito forense, ad esempio, solo SYSTEM consente l’accesso diretto alla chiave SAM per analizzare gli hash delle password o correggere configurazioni critiche nel registro.

Durante il debug di driver o servizi di sistema, è spesso necessario eseguire strumenti in un contesto con accesso illimitato alla memoria o ai processi kernel-space.

Come accennato in precedenza, SYSTEM è anche l’unico contesto in grado di superare restrizioni ACL su file e directory protetti, consentendo modifiche altrimenti impossibili. In ambito cybersecurity, permette di simulare bypass del controllo UAC e delle sandbox, fondamentali per testare la robustezza delle protezioni.

Infine, nella verifica di malware o rootkit, SYSTEM è essenziale per identificare minacce che si annidano nei livelli più profondi del sistema e che sfuggono al controllo degli amministratori convenzionali.

Note finali e considerazioni sulla sicurezza

L’utilizzo improprio dei privilegi SYSTEM può compromettere in modo irreparabile il sistema. Mai quindi eseguire app non fidate come SYSTEM e, importantissimo, evitare di mantenere shell aperte all’interno di sessioni PsExec.

Il comando net use Z: \\live.sysinternals.com\tools non è ovviamente necessario qualora si decidesse di scaricare l’utilità PsExec dalla pagina di download Microsoft.

Ti consigliamo anche

Link copiato negli appunti