FuzzCoder: Fuzzing-testen op byteniveau via een groot taalmodel
FuzzCoder: Byte-level Fuzzing Test via Large Language Model
September 3, 2024
Auteurs: Liqun Yang, Jian Yang, Chaoren Wei, Guanglin Niu, Ge Zhang, Yunli Wang, Linzheng ChaI, Wanxu Xia, Hongcheng Guo, Shun Zhang, Jiaheng Liu, Yuwei Yin, Junran Peng, Jiaxin Ma, Liang Sun, Zhoujun Li
cs.AI
Samenvatting
Fuzzing is een belangrijke dynamische programma-analysetechniek die is ontworpen om kwetsbaarheden in complexe software te vinden. Fuzzing houdt in dat een doelprogramma wordt voorzien van vervaardigde kwaadaardige invoer om crashes, bufferoverlopen, geheugenfouten en uitzonderingen te veroorzaken. Het efficiënt vervaardigen van kwaadaardige invoer is een moeilijk open probleem, en de beste aanpakken passen vaak uniforme willekeurige mutaties toe op reeds bestaande geldige invoer. In dit werk stellen we voor om fijn afgestelde grote taalmodellen (FuzzCoder) toe te passen om patronen in de invoerbestanden te leren van succesvolle aanvallen om toekomstige fuzzing-verkenningen te sturen. Specifiek ontwikkelen we een raamwerk om code-LLM's in te zetten om het mutatieproces van invoer bij fuzzing te sturen. Het mutatieproces wordt geformuleerd als sequence-to-sequence modellering, waarbij het LLM een reeks bytes ontvangt en vervolgens de gemuteerde bytereeks uitvoert. FuzzCoder wordt fijn afgesteld op de gecreëerde instructiedataset (Fuzz-Instruct), waarbij de succesvolle fuzzing-geschiedenis wordt verzameld vanuit een heuristisch fuzzing-programma. FuzzCoder kan mutatielocaties en strategielocaties in invoerbestanden voorspellen om afwijkend gedrag van het programma te triggeren. Experimentele resultaten tonen aan dat FuzzCoder, gebaseerd op AFL (American Fuzzy Lop), significante verbeteringen laat zien wat betreft het effectieve aandeel van mutaties (EPM) en het aantal crashes (NC) voor diverse invoerformaten, waaronder ELF, JPG, MP3 en XML.
English
Fuzzing is an important dynamic program analysis technique designed for
finding vulnerabilities in complex software. Fuzzing involves presenting a
target program with crafted malicious input to cause crashes, buffer overflows,
memory errors, and exceptions. Crafting malicious inputs in an efficient manner
is a difficult open problem and the best approaches often apply uniform random
mutations to pre-existing valid inputs. In this work, we propose to adopt
fine-tuned large language models (FuzzCoder) to learn patterns in the input
files from successful attacks to guide future fuzzing explorations.
Specifically, we develop a framework to leverage the code LLMs to guide the
mutation process of inputs in fuzzing. The mutation process is formulated as
the sequence-to-sequence modeling, where LLM receives a sequence of bytes and
then outputs the mutated byte sequence. FuzzCoder is fine-tuned on the created
instruction dataset (Fuzz-Instruct), where the successful fuzzing history is
collected from the heuristic fuzzing tool. FuzzCoder can predict mutation
locations and strategies locations in input files to trigger abnormal behaviors
of the program. Experimental results show that FuzzCoder based on AFL (American
Fuzzy Lop) gain significant improvements in terms of effective proportion of
mutation (EPM) and number of crashes (NC) for various input formats including
ELF, JPG, MP3, and XML.