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::$old_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::$_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::$ext-thumbnail_url 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::$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

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
Copia e incolla dai siti Web: attenzione alla trappola

Copia e incolla dai siti Web: attenzione alla trappola

Un ricercatore segnala che con una semplice riga di codice JavaScript è possibile indurre gli utenti a copiare negli appunti e a eseguire istruzioni potenzialmente dannose.
Copia e incolla dai siti Web: attenzione alla trappola

Il codice pubblicato sui siti Web viene spesso copiato e incollato per eseguire rapidamente istruzioni e comandi complessi. È il caso di Linux o in Windows, delle cmdlet PowerShell.

Gabriel Friedlander, ricercatore esperto di sicurezza informatica, ha voluto accendere un faro su un problema poco sentito ma che in realtà può fare danni.
Provate a visitare la pagina dimostrativa allestita da Friedlander: troverete il noto comando sudo apt update che in Ubuntu permette di richiedere l’aggiornamento dei pacchetti software installati.

Provate a selezionare il codice, a premere CTRL+C per copiarlo negli appunti, e a incollarlo in una finestra del terminale Linux. Noterete che verrà eseguito un comando completamente diverso: il codice incollato provoca il download da un sito remoto di uno script e ne causa l’immediata esecuzione, come se l’utente avesse premuto il tasto Invio.

Ovviamente la pagina allestita da Friedlander è del tutto innocua: l’indirizzo richiamato con il comando curl non solo è inesistente ma è scorretto quindi nulla verrà scaricato ed eseguito sul sistema Linux dell’utente.

Il ricercatore ha però voluto sottolineare come una sola semplice riga di codice JavaScript possa risultare davvero dannosa: il malcapitato copia il codice e convinto di incollarlo così come pubblicato nella pagina Web visitata manda inconsapevolmente in esecuzione un’istruzione del tutto diversa che può causare danni e costituire un problema per l’integrità e la riservatezza dei dati.
Aggiungendo semplicemente la sequenza di escape \n alla fine dell’istruzione JavaScript, Friedlander ha potuto disporre l’esecuzione automatica del comando in Linux simulando la pressione del tasto Invio da parte dell’utente.

E in Windows? È possibile tendere una trappola del genere anche agli utenti del sistema operativo Microsoft?
Abbiamo fatto un test modificando il codice JavaScript: ebbene, la medesima tattica può essere sfruttata anche in ambiente Windows sia a livello di prompt dei comandi che di finestra PowerShell.

Un giochetto del genere era stato presentato nel 2013 da un altro ricercatore: sono passati ormai quasi 10 anni ma il consiglio è sempre lo stesso. Non fidarsi del copia & incolla da siti Web dei quali non si ha fiducia perché qualche pagina potrebbe nascondere un’insidia.

Ti consigliamo anche

Link copiato negli appunti