NationalSecurityAgency / ghidra

Ghidra is a software reverse engineering (SRE) framework
https://www.nsa.gov/ghidra
Apache License 2.0
51.15k stars 5.83k forks source link

BSimElasticPlugin: The lsh.zip archive does not contain the jar file #7051

Open jordanjohnson56 opened 1 day ago

jordanjohnson56 commented 1 day ago

Describe the bug After installing the BSimElasticPlugin extension, the lsh.zip archive does not contain the jar file lsh.jar that Elasticsearch needs. Installing this plugin in Elasticsearch will show up as successful, but rebooting Elasticsearch after the install leads to Elasticsearch crashing with the error:

Could not find plugin class [org.elasticsearch.plugin.analysis.lsh.AnalysisLSHPlugin]

Looking at the lsh.zip contents makes the error clear. The usual jar file is not present. It appears that the issue stems from the removal of libsDirName='ziplayout' from BSimElasticPlugin's build.gradle file in version 11.2. Adding this line back to the build file, building Ghidra, and installing the extension results in a normal looking lsh.zip file containing both files.

To Reproduce Steps to reproduce the behavior:

  1. Build Ghidra version 11.2 using gradle. I used the following commands:
gradle --init-script gradle/support/fetchDependencies.gradle init --overwrite
gradle buildNatives_linux64
gradle sleighCompile
gradle buildGhidra
  1. Install the Extension either through the GUI or by unzipping the ghidra_11.2_DEV_20241014_BSimElasticPlugin.zip file to Ghidra/Extensions (the latter is the method I used).
  2. Locate the lsh.zip file which should be in Ghidra/Extensions/BSimElasticPlugin/data/ and inspect the contents.
  3. The only file in the archive is the plugin-descriptor.properties

Expected behavior The archive should contain the lsh.jar file as well as the plugin-descriptor.properties file.

Screenshots N/A

Attachments N/A

Environment (please complete the following information):

Additional context N/A

jordanjohnson56 commented 18 hours ago

I checked this on my Windows installation of Ghidra and it is also missing the jar file. On Windows 10, I am running Ghidra version 11.2 with JDK 21.0.4. I installed Ghidra from the official GitHub release.