{"id":24769546,"url":"https://github.com/slava0135/n3ondiff","last_synced_at":"2025-03-23T19:41:09.230Z","repository":{"id":258547565,"uuid":"860838275","full_name":"Slava0135/N3onDiff","owner":"Slava0135","description":"Differential fuzzing for Neo (N3) blockchain virtual machine based on LibAFL","archived":false,"fork":false,"pushed_at":"2024-12-06T09:16:47.000Z","size":231,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T02:59:53.746Z","etag":null,"topics":["differential-testing","fuzzing","libafl","neo","rust","smartcontracts","testing","vm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Slava0135.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-21T09:53:56.000Z","updated_at":"2024-12-06T09:16:50.000Z","dependencies_parsed_at":"2024-12-06T09:22:38.521Z","dependency_job_id":"32c09016-9d80-4431-8ba9-30415663f532","html_url":"https://github.com/Slava0135/N3onDiff","commit_stats":null,"previous_names":["slava0135/n3ondiff"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slava0135%2FN3onDiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slava0135%2FN3onDiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slava0135%2FN3onDiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slava0135%2FN3onDiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Slava0135","download_url":"https://codeload.github.com/Slava0135/N3onDiff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245161723,"owners_count":20570690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["differential-testing","fuzzing","libafl","neo","rust","smartcontracts","testing","vm"],"created_at":"2025-01-29T03:00:04.528Z","updated_at":"2025-03-23T19:41:09.204Z","avatar_url":"https://github.com/Slava0135.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# N3onDiff (NeonDiff)\n\nDifferential fuzzing for Neo (N3) blockchain virtual machine based on LibAFL\n\n## Install\n\nClone repository:\n\n```sh\ngit clone --recursive https://github.com/Slava0135/N3onDiff\n```\n\nInstall dependencies:\n\n- neo-go\n  - make\n  - go 1.22+\n- neo\n  - dotnet-sdk 8.0\n  - aspnet-runtime 8.0\n- N3onDiff\n  - make\n  - rust 1.80+ (__nightly__)\n\n## Usage\n\nTo compile harness:\n\n```sh\nmake\n```\n\nThis will put VM executables in `./harness`\n\nTo run fuzzer:\n\n```sh\ncargo run --release --cores 0,1,2... (or 0-12 and etc.)\n```\n\nYou can make a binary as well:\n\n```sh\ncargo build --release\n```\n\nFor more options use:\n\n```sh\n./target/release/n3on-diff --help\n```\n\nScripts with issues (different output) will be put into `./crashes`.\n\n## Getting script bytecode\n\nFile names are base64 encoded scripts (__NOTE: base64 here uses URL alphabet and can't be used in VM__).\n\n\u003eContents of these files are __NOT__ valid script bytes either (they are used internally by LibAFL for serialization), ignore them.\n\nInstead, look for `*.metadata` files, where:\n\n- Outputs for both VMs are saved\n- Encoded base64 script can be found that can be used in VM.\n\nScripts can be run manually:\n\n```sh\n./harness/neo-go \u003cBASE64\u003e\n```\n\nOr you can load scripts with original [neo-go](https://github.com/nspcc-dev/neo-go) CLI for extra debug info:\n\n```sh\n# neo-go\nmake\n./bin/neo-go vm # will launch interactive vm\n```\n\n```sh\nloadbase64 \u003cBASE64\u003e\nops # print opcodes\nrun\n```\n\n## Coverage\n\nCoverage for each client/runner is collected under `/tmp/N3onDiff/0/go-cover-merged/`, `/tmp/N3onDiff/1/go-cover-merged/`, etc...\n\n\u003e__NOTE: backup coverage data from /tmp BEFORE running fuzzing again OR reboot__.\n\nWhen fuzzing is finished, you would want to merge coverage directories from each client together.\n\nIn case you are not familiar with new Golang `covdata` tool:\n\nMerging:\n\n```sh\ngo tool covdata merge -i=fst_dir,snd_dir -o merged\n```\n\nProfile in old format:\n\n```sh\ngo tool covdata textfmt -i=merged -o profile.txt\n```\n\n## Issues Found\n\nIn case you find new VM bugs using this fuzzer, make an issue and add the link here!\n\n| Name                                                         | Description                          | Link                                                    |\n| ------------------------------------------------------------ | ------------------------------------ | ------------------------------------------------------- |\n| MODMUL operation returns wrong results for negative numbers | [Description](./bugs/neo-go-3598.md) | [Link](https://github.com/nspcc-dev/neo-go/issues/3598) |\n| MODPOW operation returns wrong results when base is negative | [Description](./bugs/neo-go-3612.md) | [Link](https://github.com/nspcc-dev/neo-go/issues/3612) |\n| PACKMAP operation keeps duplicate entries | [Description](./bugs/neo-go-3613.md) | [Link](https://github.com/nspcc-dev/neo-go/issues/3613) |\n\n## License\n\nLicensed under \"Mozilla Public License Version 2.0\"\n\nCopyright (c) 2024 Vyacheslav Kovalevsky\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslava0135%2Fn3ondiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslava0135%2Fn3ondiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslava0135%2Fn3ondiff/lists"}