panda-re / lava

LAVA: Large-scale Automated Vulnerability Addition
Other
371 stars 61 forks source link

Update Architecture- Generate Bugs on Demand #25

Open AndrewFasano opened 5 years ago

AndrewFasano commented 5 years ago

I think LAVA would be more usable if it worked as follows:

  1. Using a config file, lava identifies ATPs and DUAs in a target with a given input file and CLI argument string. We store these in a database, mapping ATPs and DUAs to input file(s) (with corresponding hashes) and CLI args that will lead to these DUAs and ATPs. Running subsequent runs of LAVA on the same input file will do nothing at this step (all DUAs/ATPs should already be found). Running on new input files will append to this database.
  2. When it's time to inject bugs, we combine ATPs and viable DUAs to generate potential bugs. Testing and pruning potential bugs would continue as normal. An option would ensure that, if desired, all injected bugs can be triggered by the same CLI arguments.

The benefits to this are:

This differs from the current architecture in the following ways:

The major work required here will be to update the database schema, and to split FBI's logic into a ATP/DUA generation phase and then, later, a phase where bugs are "built" out of DUAs and ATPs.