Skip to content

Commit

Permalink
update to ghidra 10.3 support (#43)
Browse files Browse the repository at this point in the history
thank you to suggestions from @nstarke in #42
  • Loading branch information
sei-gwassermann authored May 19, 2023
1 parent 4e8224b commit 73a84a6
Show file tree
Hide file tree
Showing 35 changed files with 66 additions and 2,434 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_on_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
ghidra_version: [10.2.3, 10.2.2, 10.2.1, 10.2]
ghidra_version: [10.3]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests_on_push_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
ghidra_version: [10.2.3, 10.2.2, 10.2.1, 10.2]
ghidra_version: [10.3]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ dist/*
VSCODE.classpath

# ignore the gradle-generated help files, see originals in docs/ folder
src/main/help/help/topics/kaiju/*.html
src/main/help/help/topics/kaiju/images/*
src/main/help/help/topics/kaiju/*
!src/main/help/help/topics/kaiju/README.md
!3rdparty/
3rdparty/*
!3rdparty/README.md
Expand Down
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@

# Current Release

## 230518

- New Features:
* Updated to require Ghidra 10.3+ due to API changes


# Past Releases

## 230406

- Bugfixes:
* Includes a small patch to print better debugging information, to help address #38

## 230330

- New Features:
Expand All @@ -20,6 +33,3 @@
* Fix errors loading Z3 libraries (#6, #20, #30)
* Catch GhiHorn error from Ghidra HighVariable (#23)
* Catch an error with java time (#34)


# Past Releases
20 changes: 5 additions & 15 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,15 @@ Kaiju yourself.

## Build Dependencies

This release of CERT Kaiju supports Ghidra 10.1 and 10.2+,
which have different build requirements due to Ghidra dependencies.
This release of CERT Kaiju supports Ghidra 10.3,
and the following dependencies:

For Ghidra 10.2+:
- [Ghidra](https://ghidra-sre.org) 10.2+
- [gradle](https://gradle.org/install/) 7+
- [Ghidra](https://ghidra-sre.org) 10.3.x
- [gradle](https://gradle.org/install/) 7.6+
- [GSON](https://github.com/google/gson) 2.8.6 (handled automatically by gradle)
- [JOpt Simple](https://github.com/jopt-simple/jopt-simple) 5.0.4 (handled automatically by gradle)
- Java 17+ (we recommend [OpenJDK 17](https://openjdk.java.net/install/))
- cmake, ninja, for building [Z3](https://github.com/Z3Prover/z3) 4.8.11+ with the Java API

For Ghidra 10.1.x (which is considered deprecated and not likely supported
by future Kaiju releases):
- [Ghidra](https://ghidra-sre.org) 10.1+
- [gradle](https://gradle.org/install/) 6.9+ or 7+
- [GSON](https://github.com/google/gson) 2.8.6 (handled automatically by gradle)
- [JOpt Simple](https://github.com/jopt-simple/jopt-simple) 5.0.4 (handled automatically by gradle)
- Java 11+ (we recommend [OpenJDK 11](https://openjdk.java.net/install/))
- cmake, ninja, for building [Z3](https://github.com/Z3Prover/z3) 4.8.11+ with the Java API
- cmake, ninja, for building [Z3](https://github.com/Z3Prover/z3) 4.12.x with the Java API

**NOTE ABOUT GRADLE**: Please ensure that gradle is building against the same
JDK version in use by Ghidra on your system, or you may experience
Expand Down
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,13 @@ Ghidra's graphical interface, but it is also possible to manually
unzip into the appropriate directory to install.

CERT Kaiju requires the following runtime dependencies:
- [Ghidra](https://ghidra-sre.org) 10.1+
- Java 11+ (we recommend [OpenJDK 11](https://openjdk.java.net/install/))
- [Ghidra](https://ghidra-sre.org) 10.3.x
- Java 17+ (we recommend [OpenJDK 17](https://openjdk.java.net/install/))
- [Z3](https://github.com/Z3Prover/z3) including Z3 Java bindings .jar

Z3 is provided pre-compiled as part of the pre-built packages,
or you may build Z3 on your own or use your Linux distribution's package.

**NOTE**: We strongly recommend updating to Ghidra 10.1.2 or above
in order to address the log4j vulnerability that exists
in the library bundled with older versions of Ghidra.

### Graphical Installation

Start Ghidra, and from the opening window, select from the menu:
Expand Down Expand Up @@ -128,6 +124,7 @@ The GUI tools include:
- **GhiHorn** = a plugin to calculate paths and reachability in
control flow graphs, utilizing Z3.
- Select `Kaiju > GhiHorn` to access this tool from Ghidra's CodeBrowser.
You can also launch the plugin by pressing `CTRL-G`.
- **Function Hash Viewer** = a plugin that displays an interactive list
of functions in a program and several types of hashes. Analysts can use this
to export one or more functions from a program into YARA signatures.
Expand Down Expand Up @@ -155,13 +152,6 @@ Object Oriented Code with Ghidra][ooanalyzer-blog].
More extensive usage documentation can be found in
Ghidra's `Help > Contents` menu when using the tool.

### GhiHorn
A horn encoder for Ghidra version 10.1+.


You can launch the plugin by pressing `CTRL-G` or selecting GhiHorn from
the CERT menu.


### Command-line "Headless" Mode

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class GhidraHtmlNodeRenderer extends CoreHtmlNodeRenderer implements Node
HashMap<String,String> linkattrs = new HashMap<>();
linkattrs.put("rel","stylesheet");
linkattrs.put("type","text/css");
linkattrs.put("href","../../shared/Frontpage.css");
linkattrs.put("href","help/shared/DefaultStyle.css");
html.tag("link", linkattrs);
html.line();
html.tag("/head");
Expand Down
5 changes: 3 additions & 2 deletions docs/GhiHorn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# GhiHorn
A horn encoder for Ghidra version 10.1+ and above.
GhiHorn uses Z3 SMT library.
A horn encoder for Ghidra for using SMT solvers
to computer paths within control flow.
GhiHorn uses the Z3 SMT library.

## Old Z3 Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/KaijuOverview.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn2hash.
## Licensing

CERT Kaiju is released as open source software under terms of an
BSD-like license. See the full [License](./license.htm) for details.
BSD-like license. See the full [License](./license.html) for details.

The CERT Kaiju logo is based on [art][logo] created by Cameron Spahn,
originally released under terms of
Expand Down
2 changes: 1 addition & 1 deletion docs/license.htm → docs/license.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name=Originator content="Microsoft Word 15">

<TITLE>CERT Kaiju License</TITLE>
<LINK rel="stylesheet" type="text/css" href="../../shared/Frontpage.css">
<LINK rel="stylesheet" type="text/css" href="help/shared/DefaultStyle.css">

<style>
<!--
Expand Down
3 changes: 2 additions & 1 deletion src/main/help/help/TOC_Source.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
During the help build time, all TOC_Source.xml files will be parsed and validated to ensure
that all <tocref> tags point to valid <tocdef> tags. From these files will be generated
<module name>_TOC.xml files, which are table of contents files written in the format
desired by the JavaHelp system. Additionally, the genated files will be merged together
desired by the JavaHelp system. Additionally, the generated files will be merged together
as they are loaded by the JavaHelp system. In the end, when displaying help in the Ghidra
help GUI, there will be on table of contents that has been created from the definitions in
all of the modules' TOC_Source.xml files.
Expand Down Expand Up @@ -54,6 +54,7 @@
<tocdef id="Function Hashing" sortgroup="a" text="Function Hashing" target="help/topics/kaiju/FnHashing.html" />
<tocdef id="OOAnalyzer JSON Importer" sortgroup="b" text="OOAnalyzer JSON Importer" target="help/topics/kaiju/OOAnalyzerImporter.html" />
<tocdef id="Disassembly Improvements" sortgroup="c" text="Disassembly Improvements" target="help/topics/kaiju/DisAsmImprovements.html" />
<tocdef id="GhiHorn" sortgroup="d" text="GhiHorn" target="help/topics/kaiju/GhiHorn.html" />
</tocdef>
</tocref>
</tocroot>
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/main/help/help/topics/kaiju/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Gradle will autogenerate HTML files in this directory during the build process.
Gradle will autogenerate HTML files and images in this directory during the build process.

Please do not add any HTML files to this directory.
Please **DO NOT MANUALLY ADD OR EDIT** any files in this directory. Any changes won't be committed properly.

If you'd like to add documentation, please add it in markdown format to the `docs/` directory. Markdown in the `docs/` directory will be automatically translated to Ghidra HTML files during the gradle build process.
If you'd like to add or edit documentation, please add it in markdown format to the `docs/` directory. Markdown in the `docs/` directory will be automatically translated to Ghidra HTML files during the gradle build process. (The code that translates the markdown into Ghidra HTML is in `buildSrc/`).
145 changes: 0 additions & 145 deletions src/main/help/help/topics/kaiju/fnhashing/fn2hash.htm

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30 changes: 0 additions & 30 deletions src/main/help/help/topics/kaiju/improveddisasm/improveddisasm.htm

This file was deleted.

Loading

0 comments on commit 73a84a6

Please sign in to comment.