{"id":17196925,"url":"https://github.com/dmaroo/ghidrust","last_synced_at":"2025-07-20T09:04:08.514Z","repository":{"id":155306180,"uuid":"631034636","full_name":"DMaroo/GhidRust","owner":"DMaroo","description":"GhidRust: Rust decompiler plugin for Ghidra","archived":false,"fork":false,"pushed_at":"2024-05-18T20:18:09.000Z","size":1470,"stargazers_count":285,"open_issues_count":1,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-19T21:07:31.688Z","etag":null,"topics":["decompiler","ghidra","reverse-engineering","rust"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DMaroo.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":"2023-04-21T18:52:45.000Z","updated_at":"2025-05-19T02:03:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1d6d995-e7a8-4659-897b-01bf4c24c66f","html_url":"https://github.com/DMaroo/GhidRust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DMaroo/GhidRust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMaroo%2FGhidRust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMaroo%2FGhidRust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMaroo%2FGhidRust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMaroo%2FGhidRust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DMaroo","download_url":"https://codeload.github.com/DMaroo/GhidRust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DMaroo%2FGhidRust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266094019,"owners_count":23875560,"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":["decompiler","ghidra","reverse-engineering","rust"],"created_at":"2024-10-15T01:54:50.340Z","updated_at":"2025-07-20T09:04:08.471Z","avatar_url":"https://github.com/DMaroo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"180\" src=\"./media/ghidrust.png\" alt=\"GhidRust\"\u003e\n  \u003ch1 align=\"center\"\u003eGhidRust\u003c/h1\u003e\n  \u003cp align=\"center\"\u003eGhidRust: Rust binary analysis extension for Ghidra\u003c/p\u003e\n\u003c/p\u003e\n\n**Status:** Development has been paused permanently. This plugin is in a partially usable condition. Few Rust binary analysis features have been upstreamed to Ghidra since the creation of this plugin.\n\n - [GP-2412: Improved support for Rust binaries](https://github.com/NationalSecurityAgency/ghidra/commit/921247f640c9a313bce80dc26e0f99939ddae4ad)\n - [GP-4158 adjust how DWARF handles Rust](https://github.com/NationalSecurityAgency/ghidra/commit/d9a900702e838ac639735fa783c342cc3b9ba76d)\n - [GP-4103: Fixing issue with loading Mach-O Rust binaries](https://github.com/NationalSecurityAgency/ghidra/commit/9dd1a3fb109578b059ec2c2d5e5ee62d1ec1e67a)\n\nGhidra's Rust binary identification is now superior to this plugin. The only other features which this plugin provides is that of FunctionID database integration and of transpiling the decompiled C code to Rust code. Both of these are quite flaky.\n\nI will still be happy to accept any patches or pull requests, but there won't be any active development. Feel free to fork this project or create a new one. Please let me know if you do so, I will be happy to add your project's link here as an alternative.\n\n![](./media/extension_entry.png)\n\nThis project was a part of one of my institute courses. For a detailed overview, please have a look at the [report](./media/report.pdf) created for the course submission. The following README is fairly sparse.\n\n## Features\n\n### Rust binary detection\n\nThe plugin can detect Rust binaries. To use the feature, click on `GhidRust -\u003e Check if Rust binary`. It will show a popup indicating whether it's a Rust binary or not.\n\nMay not be a Rust binary   |  May be a Rust binary\n:-------------------------:|:-------------------------:\n![](./media/not_rust_bin.png)   |  ![](./media/rust_bin.png)\n\n### Function ID\n\nThe plugin also consists of `RustStdAnalyzer` which analyzes Rust binaries and applies function signatures to the library functions (Rust's `std`) found in the binary. This is done using `.fidb` function ID database. A default database for x86-64 and Rust version 1.58.1 has been provided at [`libstd.fidb`](./data/libstd-4c74cbab78ec4891.fidb). This is useful when analyzing stripped Rust binaries.\n\nWithout Function ID        |  With Function ID\n:-------------------------:|:-------------------------:\n![](./media/without_fid.png)   |  ![](./media/with_fid.png)\n\nThe analyzer is enabled by default for Rust binaries, and it's name in analyzer window is _\"Detect Rust libstd functions\"_.\n\n![](./media/analyzer_entry.png)\n\n### Decompilation\n\nThis is a work-in-progress feature as of now. It requires parsing the decompiled C code and then emitting the corresponding Rust code. Once that is done, Rust macro support will also be added in the future.\n\nThe decompiler panel can be accessed by clicking `GhidRust -\u003e Open decompiler`. It looks as follows.\n\n![](./media/decomp_muladd.png)\n\n## Building\n\nThere is a build script provided (`build.sh`) which can build and install the extension.\n\n```\n$ ./build.sh -h\nGhidRust install script\nUsage: build.sh [-i | --install] -g GHIDRA_PATH\n\n        -i | --install           Install the extension\n        -g | --ghidra            Path to Ghidra installation (usually /opt/ghidra)\n        -h | --help              Show usage/help\n```\n\nYou can build the extension using the following command.\n\n```\n$ ./build.sh -g \u003cGHIDRA_INSTALL_DIR\u003e\n```\n\nYou can install it using the install flag as follows.\n\n```\n./build.sh -ig \u003cGHIDRA_INSTALL_DIR\u003e\n```\n\n## Adding it to Ghidra\n\nTo add it to Ghidra, just click on `File -\u003e Install Extensions...` and choose GhidRust there. Once installed, you will have a `GhidRust` entry in the Ghidra toolbar which can be used to invoke the plugin.\n\nYou might need to activate it from the `File -\u003e Configure...` menu. Choose the `Miscellaneous` section, and click the checkbox beside _RustDecPlugin_.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmaroo%2Fghidrust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmaroo%2Fghidrust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmaroo%2Fghidrust/lists"}