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::$_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::$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::$fonte 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::$_fonte 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::$fonte_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::$_fonte_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_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::$_yoast_wpseo_wordproof_timestamp 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::$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::$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
Rev.ng: diventa open source il software di reverse engineering

Rev.ng: diventa open source il software di reverse engineering

Il decompilatore Rev.ng diventa open source: cos'è e come funziona il programma per effettuare attività di reverse engineering.

Le finalità di Rev.ng sono racchiuse nel suo nome: il riferimento a reverse engineering è palese. Si tratta di una piattaforma progettata per analizzare e comprendere il funzionamento interno di qualunque software. Il termine reverse engineering si riferisce al processo di decompilazione, disassemblaggio e analisi di un programma al fine di comprendere il suo funzionamento o apportare modifiche.

Come funziona e a cosa serve Rev.ng

Uno strumento come Rev.ng consente agli utenti di decompilare e disassemblare il codice binario di un programma, consentendo loro di visualizzare il sorgente, o una rappresentazione ad esso molto vicina, dell’applicazione oggetto di studio.

In un altro articolo abbiamo visto la differenza tra disassembler e decompilatori: in breve, un disassembler traduce il codice macchina, ovvero il linguaggio binario direttamente eseguibile dalla CPU, in un linguaggio Assembly leggibile dall’uomo.

Un discompilatore, d’altra parte, è uno strumento che tenta di tradurre il codice macchina o bytecode di un programma compilato in un linguaggio di programmazione ad alto livello, come C, C++, Java o altri.

A differenza del disassemblaggio, che genera codice Assembly, il discompilatore cerca di produrre un’astrazione più alta del codice, il che rende più facile la comprensione e la modifica del programma.

Analisi del codice con Rev.ng

Soluzioni come Rev.ng aiutano ad analizzare il funzionamento di ciascun programma. Ad esempio per identificare eventuali vulnerabilità di sicurezza, comprendere gli algoritmi utilizzati o la ricercare comportamenti dannosi.

Rev.ng può essere utilizzato per modificare il software, aggiungere funzionalità o correggere difetti, senza avere accesso al codice sorgente originale. Questo è utile per adattare il software alle proprie esigenze o per sistemare degli errori senza dover ricreare l’intero programma da zero.

Quali sono i vantaggi di poter disporre di uno strumento come Rev.ng open source

Il motore di decompilazione di Rev.ng, revng-c, è adesso diventato open source. Ciò significa che il componente è disponibile per essere esaminato, utilizzato e migliorato dalla comunità.

Per utilizzare Rev.ng non è necessario disporre di privilegi di root e l’installazione si riduce a un’unica directory che può essere eliminata in qualsiasi momento.

La piattaforma supporta una vasta gamma di architetture, tra cui x86, x86-64, ARM, AArch64, MIPS e s390x, consentendo quindi lo studio di qualunque tipo di applicazione.

Di base, Rev.ng offre una versione open source del framework accessibile attraverso la riga di comando (CLI, command line interface). Attraverso l’eventuale adesione al programma beta, è possibile provare anche l’interfaccia utente in formato grafico.

Contemporaneamente, gli sviluppatori hanno a disposizione Rev.ng Hub, uno strumento che funge da punto di accesso per l’utilizzo della versione cloud della piattaforma. Gli utenti possono in questo caso creare progetti, eseguire l’interfaccia utente di Rev.ng direttamente nel browser e collaborare con altri utenti senza la necessità di installare nulla.

Come provare lo strumento di reverse engineering Rev.ng

Per installare e provare Rev.ng su Linux, è sufficiente digitare i seguenti comandi:

curl -L -s https://rev.ng/downloads/revng-distributable/master/install.sh | bash
cd revng
source ./environment

Nella presentazione da poco pubblicata, si spiega come decompilare un programma molto semplice. Si parte con la scrittura di due righe di codice C (example.c):

int main(int argc, char *argv[]) {
return argc * 3;
}

Si chiede quindi la compilazione con gcc e la successiva decompilazione con Rev.ng:

gcc example.c -o example -O2

revng artifact \
--analyze \
--progress \
decompile-to-single-file \
example \
| revng ptml --color \
| grep -A2 -B1 '[^_]main\b' \
> decompiled.c

La spiegazione dei comandi utilizzati nell’esempio

Il primo comando utilizza il compilatore gcc per compilare il sorgente di example.c con ottimizzazioni di livello 2 (flag “-O2”). Il risultato dell’operazione di compilazione è un file eseguibile denominato example. In generale, abilitando l’ottimizzazione di livello 2, ci si aspetta un miglioramento significativo delle prestazioni rispetto allo scenario in cui non si indica alcunché.

Successivamente, l’applicazione di reverse engineering Rev.ng è invocata per analizzare l’eseguibile example, estrarre il codice sorgente equivalente e salvarlo in un file chiamato decompiled.c.

La sintassi usata per invocare il comando revng indica che si vuole analizzare un file eseguibile per comprenderne la struttura e il suo comportamento. L’opzione --progress indica a Rev.ng di visualizzare informazioni sul progresso durante l’analisi e la fase di decompilazione; con decompile-to-single-file si chiede di decompilare l’eseguibile in un unico file sorgente anziché in più file separati.

La decompilazione tramite revng ptml --color converte il codice macchina dell’eseguibile in codice sorgente C e lo formatta in HTML, con la colorazione della sintassi per una migliore leggibilità.

Il risultato che si ottiene, nel caso specifico, è il seguente. Come si vede il decompilatore ha “ricostruito” il sorgente con una sintassi di alto livello che si avvicina al codice originale:

_ABI(SystemV_x86_64)
generic64_t main(generic64_t _argument0) {
return _argument0 * 3 & 0xFFFFFFFF;
}

In sintesi, Rev.ng è uno strumento potente per esperti di sicurezza informatica, sviluppatori software e ingegneri che lavorano con software  per il quale non è disponibile il sorgente. Consentendo l’analisi e la modifica dei programmi binari, Reg.ng aiuta a comprendere il funzionamento dei programmi compilati effettuando modifiche secondo necessità.

Ti consigliamo anche

Link copiato negli appunti