OMH4ck/Squirrel

What files need to be modified to support another database?

Closed this issue · 2 comments

Hey, I am trying to test databases with fuzzing. I have read your paper, the source code and the issues of the repo s3team/Squirrel. But there are still some questions frustrating me.

Q1: For example, the files under srcs/internal/sqlite/ are used to build the sqlite custom_mutator.so that used for AFL++?

Q2: If I want to support another database named XXX, should I create XXX folder at the same place like sqlite and then add the flies, such as bison_parser.cpp and flex_lexer.cpp, with the similar content to support database XXX?

Q3: Maybe these files are reusable? Then I can speed up my development by modifing the unreusable parts of those files.

Q4: At the last, the other files like Dockerfile and CMakeList should be also modified to support database XXX.

Looking forward to your reply!

Hi,

Q1: Yes.
Q2: It might be easier if you follow the same structure and then you can modify

foreach(dbms IN LISTS DBMS)
to build your custom mutator.
Q3: Yes you can modify based on the existing files, as most SQL grammar is similar. If your database share the same grammar with any of the supported DB, just use them.
Q4: CMakeLists.txt, yes. Dockerfile, no.

Thanks for your reply. I will try to follow the step to fuzz my database.