Skip to content

Repository files navigation

Dinkel Logo

The Powerful and Adaptable Cypher Fuzzer

License Badge Dinkel GoDoc

CI/CD Build Status Badge CI/CD Test Status Badge CI/CD Coverage Status Badge

Paper Badge

Table of Contents
Instructional Video on Using Dinkel

[TODO: insert mp4 here]


📖 Overview

Dinkel is a state of the art Cypher fuzzer.
It employs on-the-fly state manipulation and self-generating ASTs to generate complex and valid queries with countless data dependencies.

For more detailed information on how dinkel works and performs, please refer to its paper.

⚙ Installation

Requirements:

  • Go 1.22.0 or higher

Install dinkel:

$ go install github.com/CelineWuest/dinkel@latest

You should now be able to run dinkel from the command line using dinkel.
If you encounter an error, ensure that the GOBIN environment variable is set and in your path.


Alternatively, you may clone this repository and build dinkel locally

$ git clone git@github.com:CelineWuest/dinkel.git
$ cd dinkel
$ go build

You should now have a binary which you can run via ./dinkel.

🔎 Fuzzing with Dinkel

⚠ Never run dinkel against a database holding data you don't want to lose, as it will get deleted. ⚠ ️


If you need more info about a certain command, run

dinkel help [command]

Ensure you have a config in your present working directory.
If you cloned the repository, this config will already be in the project's root directory.
Otherwise, you can generate the config by running

dinkel config

Before you start fuzzing a target, spin up an instance of said target. For this, you may want to use the already provided dockerfiles contained in this project's dockerfiles directory. To then fuzz the target, run

dinkel fuzz target [strategy]

You can list available targets and strategies using dinkel help fuzz.


Once a bug was found and a bug report got generated, run

dinkel reduce path/to/bugreport.yml

to reduce the generated query. Note that the reduction is not perfect and you might still have to further reduce the query manually.


To make sure dinkel doesn't report the same bug again, add a regex matching the error message to the targets config.
The entry should be added to the list <the target>.reportedErrors in the config.

You can check that the regex correctly matches the error message by rerunning the bugreport and making sure dinkel now recognizes the query as a REPORTED_BUG.


If you found multiple bugs and thus have a lot of bugreports, you might find use in the command

dinkel bugreports

With this command you can easily rerun, regenerate, reduce, rename and delete your bug reports.


Prometheus Exporter

If you wish to run the fuzzer for a prolonged time you might want to monitor its performance.
You can do this by enabling the builtin prometheus exporter with the --prometheus-exporter port flag in the fuzz command.
Setting this flag exposes the /metrics HTTP endpoint on the specified port, exposing prometheus metrics. These metrics include:

  1. query counts
  2. statement counts
  3. generation latencies
  4. query latencies
  5. count of query result types

🌐 For GDBMS Developers

If you are a developer of a graph database management system and would like specific features in Dinkel or want to extensively test a new language feature before it becomes open source, feel free to contact us under inquiry@dinkel-fuzz.ch.

💻 Contributing

Please don't hesitate to create issues if you find a bug in dinkel or wish to share an idea to improve the tool.
Feel free to open a pull request if you have made any improvements to dinkel!

Please refer to the contributing guidelines for more information about how to contribute.

You might have an easier time getting started with developing dinkel after reading its paper.

🐛 Bugs found by Dinkel

If you find a bug using dinkel, remember to responsibly disclose it to the respective developers.
Once the bug is fixed, you may send an E-Mail to bugs@dinkel-fuzz.ch, containing a subject starting with "[Bug]".

So far, dinkel has found over 115 bugs in four GDBMSs:

Neo4j
  1. A
  2. B
  3. C
FalkorDB (Formerly known as RedisGraph)
  1. A
  2. B
  3. C
Apache AGE
  1. A
  2. B
  3. C
Memgraph
  1. A
  2. B
  3. C



Made with ❤️ at ETHZ

About

[VLDB'26] A Cypher Fuzzer

Topics

Resources

Contributing

Stars

3 stars

Watchers

1 watching

Forks

Sponsor this project

Used by

Contributors

Languages