-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Description
On a current Kali linux the installation looks quite good but it does not work anymore with the latest Ghidra version.
Installation:
GHIDRA_VERS="11.4"
GHIDRA_REL_DATE="20250620"
curl -L https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_"${GHIDRA_VERS}"_build/ghidra_"${GHIDRA_VERS}"_PUBLIC_"${GHIDRA_REL_DATE}".zip -Sf -o external/ghidra.zip
mkdir external/ghidra
unzip -qo external/ghidra.zip -d external/ghidra
sudo apt-get install openjdk-21-jdk
curl https://sh.rustup.rs -sSf | sh -s -- -y
. "${HOME}"/.cargo/env
export PATH="${PATH}":"${HOME}"/.cargo/bin
echo '{"ghidra_path":"/home/kali/emba_m1k3/external/ghidra/ghidra_'"${GHIDRA_VERS}"'_PUBLIC"}' > "${HOME}"/.config/cwe_checker/ghidra.json
Testrun:
┌──(kali㉿kali)-[~/emba_m1k3/external/cwe_checker]
└─$ cwe_checker /bin/false
Execution of Ghidra plugin failed. Use the --verbose flag to print Ghidra output for troubleshooting.
┌──(kali㉿kali)-[~/emba_m1k3/external/cwe_checker]
└─$ cwe_checker /bin/false --verbose
INFO Using log config file: jar:file:/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Framework/Generic/lib/Generic.jar!/generic.log4j.xml (LoggingInitialization)
INFO Using log file: /home/kali/.config/ghidra/ghidra_11.4_PUBLIC/application.log (LoggingInitialization)
INFO Loading user preferences: /home/kali/.config/ghidra/ghidra_11.4_PUBLIC/preferences (Preferences)
INFO Searching for classes... (ClassSearcher)
INFO Class search complete (1596 ms) (ClassSearcher)
INFO Initializing SSL Context (SSLContextInitializer)
INFO Initializing Random Number Generator... (SecureRandomFactory)
INFO Random Number Generator initialization complete: NativePRNGNonBlocking (SecureRandomFactory)
INFO Trust manager disabled, cacerts have not been set (ApplicationTrustManagerFactory)
INFO Headless startup complete (3877 ms) (AnalyzeHeadless)
INFO Class searcher loaded 58 extension points (18 false positives) (ClassSearcher)
INFO HEADLESS Script Paths:
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Processors/Atmel/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/WildcardAssembler/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/SwiftDemangler/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/Base/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/BytePatterns/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Processors/JVM/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/GnuDemangler/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/FunctionID/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/SystemEmulation/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Debug/Debugger/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/FileFormats/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/DecompilerDependent/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/VersionTracking/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/Decompiler/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Processors/PIC/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Processors/8051/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/PDB/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/MicrosoftCodeAnalyzer/ghidra_scripts
/home/kali/.local/share/cwe_checker/ghidra/p_code_extractor
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Processors/DATA/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/BSim/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/PyGhidra/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Debug/Debugger-rmi-trace/ghidra_scripts
/home/kali/emba_m1k3/external/ghidra/ghidra_11.4_PUBLIC/Ghidra/Features/Jython/ghidra_scripts (HeadlessAnalyzer)
INFO HEADLESS: execution starts (HeadlessAnalyzer)
INFO Creating temporary project: /run/user/1000/cwe_checker/PcodeExtractor_false_1752649502428 (HeadlessAnalyzer)
INFO Creating project: /run/user/1000/cwe_checker/PcodeExtractor_false_1752649502428 (DefaultProject)
INFO REPORT: Processing input files: (HeadlessAnalyzer)
INFO project: /run/user/1000/cwe_checker/PcodeExtractor_false_1752649502428 (HeadlessAnalyzer)
INFO IMPORTING: file:///usr/bin/false (HeadlessAnalyzer)
INFO Using Loader: Executable and Linking Format (ELF) (AutoImporter)
INFO Using Language/Compiler: x86:LE:64:default:gcc (AutoImporter)
INFO Using Library Search Path: [., /bin, /lib, /lib64, /lib/x86_64-linux-gnu, /lib/aarch64-linux-gnu, /usr/bin, /usr/lib, /usr/X11R6/bin, /usr/X11R6/lib, /usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /usr/lib/x86_64-linux-gnu, /usr/lib/jni] (AutoImporter)
INFO Additional info:
Loading file:///usr/bin/false?MD5=3bb47a331f39280a02d244f96f761d52...
ELF Relocation Failure: R_X86_64_COPY (5, 0x5) at 0010a080 (Symbol = __progname) - Runtime copy not supported (8-bytes)
ELF Relocation Failure: R_X86_64_COPY (5, 0x5) at 0010a088 (Symbol = stdout) - Runtime copy not supported (8-bytes)
ELF Relocation Failure: R_X86_64_COPY (5, 0x5) at 0010a090 (Symbol = __progname_full) - Runtime copy not supported (8-bytes)
ELF Relocation Failure: R_X86_64_COPY (5, 0x5) at 0010a0a0 (Symbol = stderr) - Runtime copy not supported (8-bytes)
Setting block .init_array to read-only
Setting block .fini_array to read-only
Setting block .data.rel.ro to read-only
Setting block .dynamic to read-only
------------------------------------------------
Linking the External Programs of 'false' to imported libraries...
[libc.so.6] -> not found in project
------------------------------------------------
Resolving External Symbols of [/false] - 46 unresolved symbols, no external libraries configured - skipping
(AutoImporter)
INFO IMPORTING: Loaded 0 additional files (HeadlessAnalyzer)
INFO ANALYZING all memory and code: file:///usr/bin/false (HeadlessAnalyzer)
INFO DWARF external debug information found: ExternalDebugInfo [filename=d80869ea5ae85c6d44916982728302aa06fe8c.debug, crc=9d2547e2, hash=12d80869ea5ae85c6d44916982728302aa06fe8c] (ExternalDebugFileSectionProvider)
INFO Unable to find DWARF information, skipping DWARF analysis (DWARFAnalyzer)
INFO hit non-returning function, restarting decompiler switch analyzer later (DecompilerSwitchAnalyzer)
WARN Decompiling 001054e0, pcode error at 0010b150: Unable to disassemble EXTERNAL block location: 0010b150 (DecompileCallback)
WARN Decompiling 00102810, pcode error at 0010b030: Unable to disassemble EXTERNAL block location: 0010b030 (DecompileCallback)
WARN Decompiling 00102840, pcode error at 0010b158: Unable to disassemble EXTERNAL block location: 0010b158 (DecompileCallback)
WARN Decompiling 00102170, pcode error at 0010b0b0: Unable to disassemble EXTERNAL block location: 0010b0b0 (DecompileCallback)
WARN Decompiling 001022e0, pcode error at 0010b178: Unable to disassemble EXTERNAL block location: 0010b178 (DecompileCallback)
WARN Decompiling 001022d0, pcode error at 0010b170: Unable to disassemble EXTERNAL block location: 0010b170 (DecompileCallback)
INFO Packed database cache: /home/kali/.cache/ghidra/packed-db-cache (PackedDatabaseCache)
INFO Applied data type archive: generic_clib_64 (ApplyDataArchiveAnalyzer)
INFO -----------------------------------------------------
ASCII Strings 0.544 secs
Apply Data Archives 0.263 secs
Call Convention ID 0.005 secs
Call-Fixup Installer 0.023 secs
Create Address Tables 0.017 secs
Create Address Tables - One Time 0.004 secs
Create Function 0.041 secs
DWARF 0.017 secs
Data Reference 0.031 secs
Decompiler Switch Analysis 0.136 secs
Decompiler Switch Analysis - One Time 5.790 secs
Demangler GNU 0.058 secs
Disassemble Entry Points 0.554 secs
ELF Scalar Operand References 0.114 secs
Embedded Media 0.024 secs
External Entry References 0.001 secs
Function ID 0.111 secs
Function Start Search 0.037 secs
Function Start Search After Code 0.006 secs
Function Start Search After Data 0.004 secs
GCC Exception Handlers 0.350 secs
Non-Returning Functions - Discovered 0.559 secs
Non-Returning Functions - Known 0.007 secs
Reference 0.130 secs
Shared Return Calls 0.091 secs
Stack 0.551 secs
Subroutine References 0.042 secs
Subroutine References - One Time 0.000 secs
x86 Constant Reference Analyzer 0.634 secs
-----------------------------------------------------
Total Time 10 secs
-----------------------------------------------------
(AutoAnalysisManager)
INFO REPORT: Analysis succeeded for file: file:///usr/bin/false (HeadlessAnalyzer)
PcodeExtractor.java:50: error: constructor VarnodeContext in class ghidra.program.util.VarnodeContext cannot be applied to given types;
VarnodeContext context = new VarnodeContext(ghidraProgram, ghidraProgram.getProgramContext(),
^
required: ghidra.program.model.listing.Program,ghidra.program.model.listing.ProgramContext,ghidra.program.model.listing.ProgramContext,boolean
found: ghidra.program.model.listing.Program,ghidra.program.model.listing.ProgramContext,ghidra.program.model.listing.ProgramContext
reason: actual and formal argument lists differ in length
skipping /home/kali/.local/share/cwe_checker/ghidra/p_code_extractor/PcodeExtractor.java
ERROR REPORT SCRIPT ERROR: /home/kali/.local/share/cwe_checker/ghidra/p_code_extractor/PcodeExtractor.java : The class could not be found. It must be the public class of the .java file: PcodeExtractor not found by 8e051a36 [1] (HeadlessAnalyzer) ghidra.app.script.GhidraScriptLoadException: The class could not be found. It must be the public class of the .java file: PcodeExtractor not found by 8e051a36 [1]
at ghidra.app.script.JavaScriptProvider.getScriptInstance(JavaScriptProvider.java:110)
at ghidra.app.util.headless.HeadlessAnalyzer.runScriptsList(HeadlessAnalyzer.java:912)
at ghidra.app.util.headless.HeadlessAnalyzer.analyzeProgram(HeadlessAnalyzer.java:1074)
at ghidra.app.util.headless.HeadlessAnalyzer.processFileWithImport(HeadlessAnalyzer.java:1563)
at ghidra.app.util.headless.HeadlessAnalyzer.processWithLoader(HeadlessAnalyzer.java:1745)
at ghidra.app.util.headless.HeadlessAnalyzer.processWithImport(HeadlessAnalyzer.java:1686)
at ghidra.app.util.headless.HeadlessAnalyzer.processWithImport(HeadlessAnalyzer.java:1770)
at ghidra.app.util.headless.HeadlessAnalyzer.processLocal(HeadlessAnalyzer.java:457)
at ghidra.app.util.headless.AnalyzeHeadless.launch(AnalyzeHeadless.java:198)
at ghidra.GhidraLauncher.launch(GhidraLauncher.java:81)
at ghidra.Ghidra.main(Ghidra.java:54)
Caused by: java.lang.ClassNotFoundException: PcodeExtractor not found by 8e051a36 [1]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591)
at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:2116)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:986)
at ghidra.app.script.JavaScriptProvider.loadClass(JavaScriptProvider.java:161)
at ghidra.app.script.JavaScriptProvider.getScriptInstance(JavaScriptProvider.java:96)
... 10 more
INFO ANALYZING changes made by post scripts: file:///usr/bin/false (HeadlessAnalyzer)
INFO REPORT: Post-analysis succeeded for file: file:///usr/bin/false (HeadlessAnalyzer)
INFO REPORT: Save succeeded for: /false (PcodeExtractor_false_1752649502428:/false) (HeadlessAnalyzer)
INFO REPORT: Import succeeded (HeadlessAnalyzer)
openjdk version "21.0.7" 2025-04-15
OpenJDK Runtime Environment (build 21.0.7+6-Debian-1)
OpenJDK 64-Bit Server VM (build 21.0.7+6-Debian-1, mixed mode)
Ghidra plugin failed with exit code 0
Execution of Ghidra plugin failed.
Metadata
Metadata
Assignees
Labels
No labels