Evolving Assembly Code in an Adversarial Environment

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Maliukov, Irina, Weiss, Gera, Margalit, Oded, Elyasaf, Achiya
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866916280994365440
author Maliukov, Irina
Weiss, Gera
Margalit, Oded
Elyasaf, Achiya
author_facet Maliukov, Irina
Weiss, Gera
Margalit, Oded
Elyasaf, Achiya
contents In this work, we evolve Assembly code for the CodeGuru competition. The goal is to create a survivor -- an Assembly program that runs the longest in shared memory, by resisting attacks from adversary survivors and finding their weaknesses. For evolving top-notch solvers, we specify a Backus Normal Form (BNF) for the Assembly language and synthesize the code from scratch using Genetic Programming (GP). We evaluate the survivors by running CodeGuru games against human-written winning survivors. Our evolved programs found weaknesses in the programs they were trained against and utilized them. To push evolution further, we implemented memetic operators that utilize machine learning to explore the solution space effectively. This work has important applications for cyber-security as we utilize evolution to detect weaknesses in survivors. The Assembly BNF is domain-independent; thus, by modifying the fitness function, it can detect code weaknesses and help fix them. Finally, the CodeGuru competition offers a novel platform for analyzing GP and code evolution in adversarial environments. To support further research in this direction, we provide a thorough qualitative analysis of the evolved survivors and the weaknesses found.
format Preprint
id arxiv_https___arxiv_org_abs_2403_19489
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Evolving Assembly Code in an Adversarial Environment
Maliukov, Irina
Weiss, Gera
Margalit, Oded
Elyasaf, Achiya
Neural and Evolutionary Computing
In this work, we evolve Assembly code for the CodeGuru competition. The goal is to create a survivor -- an Assembly program that runs the longest in shared memory, by resisting attacks from adversary survivors and finding their weaknesses. For evolving top-notch solvers, we specify a Backus Normal Form (BNF) for the Assembly language and synthesize the code from scratch using Genetic Programming (GP). We evaluate the survivors by running CodeGuru games against human-written winning survivors. Our evolved programs found weaknesses in the programs they were trained against and utilized them. To push evolution further, we implemented memetic operators that utilize machine learning to explore the solution space effectively. This work has important applications for cyber-security as we utilize evolution to detect weaknesses in survivors. The Assembly BNF is domain-independent; thus, by modifying the fitness function, it can detect code weaknesses and help fix them. Finally, the CodeGuru competition offers a novel platform for analyzing GP and code evolution in adversarial environments. To support further research in this direction, we provide a thorough qualitative analysis of the evolved survivors and the weaknesses found.
title Evolving Assembly Code in an Adversarial Environment
topic Neural and Evolutionary Computing
url https://arxiv.org/abs/2403.19489