All Projects → jpleasu → ghidraal

jpleasu / ghidraal

Licence: other
A Ghidra extension for scripting with GraalVM languages, including Javascript, Python3, R, and Ruby.

Programming Languages

java
68154 projects - #9 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
r
7636 projects

Projects that are alternatives of or similar to ghidraal

quarkus-performance
Comparing the CPU/Memory utilisation - Quarkus via GraalVM Native Image vs. Quarkus via Java Runtime vs. Payara-Micro via Java Runtime.
Stars: ✭ 49 (+2.08%)
Mutual labels:  graalvm
ipolyglot
A polyglot kernel for Jupyter notebooks based on GraalVM.
Stars: ✭ 59 (+22.92%)
Mutual labels:  graalvm
Spring Fu
KoFu and JaFu configuration DSLs for Spring Boot
Stars: ✭ 1,567 (+3164.58%)
Mutual labels:  graalvm
ScriptableMC-Engine
Create TypeScript/JavaScript plugins for Minecraft 1.16 Bukkit/Spigot/Paper
Stars: ✭ 36 (-25%)
Mutual labels:  graalvm
kotlin-graalvm-custom-aws-lambda-runtime-talk
This is the demo code for a talk on improving cold startup times for JVM-based lambdas using GraalVM and Custom AWS Lambda Runtimes.
Stars: ✭ 24 (-50%)
Mutual labels:  graalvm
microprofile.training
home of http://microprofile.training sample app
Stars: ✭ 19 (-60.42%)
Mutual labels:  graalvm
harry-potter-quarkus
Showcases in a web application Quarkus and Infinispan
Stars: ✭ 16 (-66.67%)
Mutual labels:  graalvm
Truffleruby
A high performance implementation of the Ruby programming language. Built on the GraalVM by Oracle Labs.
Stars: ✭ 2,620 (+5358.33%)
Mutual labels:  graalvm
spring-cloud-stream-event-sourcing-testcontainers
Goal: create a Spring Boot application that handles users using Event Sourcing. So, whenever a user is created, updated, or deleted, an event informing this change is sent to Kafka. Also, we will implement another application that listens to those events and saves them in Cassandra. Finally, we will use Testcontainers for integration testing.
Stars: ✭ 16 (-66.67%)
Mutual labels:  graalvm
Spring Native
Spring Native provides beta support for compiling Spring applications to native executables using GraalVM native-image compiler.
Stars: ✭ 2,282 (+4654.17%)
Mutual labels:  graalvm
azure-native-spring-function
Tutorial on running Spring Boot + GraalVM native images on Azure Functions
Stars: ✭ 56 (+16.67%)
Mutual labels:  graalvm
http4s-graal
An experiment running http4s as native image with Graal (+ Substrate)
Stars: ✭ 27 (-43.75%)
Mutual labels:  graalvm
Picocli
Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
Stars: ✭ 3,286 (+6745.83%)
Mutual labels:  graalvm
yona
Yona is a modern take on a dynamic general-purpose programming language with advanced functional programming, minimalistic ML-like syntax, strict evaluation, for GraalVM polyglot virtual machine (VM).
Stars: ✭ 113 (+135.42%)
Mutual labels:  graalvm
Okhttp
Square’s meticulous HTTP client for the JVM, Android, and GraalVM.
Stars: ✭ 41,306 (+85954.17%)
Mutual labels:  graalvm
graalvm
A Cloud Native Buildpack that provides the GraalVM implementations of JREs and JDKs
Stars: ✭ 21 (-56.25%)
Mutual labels:  graalvm
kotlin-graalvm-custom-runtime-demo
Demo for a AWS Lambda functions written in Kotlin using GraalVM and custom runtimes
Stars: ✭ 23 (-52.08%)
Mutual labels:  graalvm
Google-Authenticator
Clojure program to compute your google authenticator OTP using TOTP
Stars: ✭ 23 (-52.08%)
Mutual labels:  graalvm
Babashka
Native, fast starting Clojure interpreter for scripting
Stars: ✭ 2,462 (+5029.17%)
Mutual labels:  graalvm
Enso
Hybrid visual and textual functional programming.
Stars: ✭ 5,238 (+10812.5%)
Mutual labels:  graalvm

Ghidraal

A Ghidra extension for scripting with GraalVM languages, including Javascript, Python3, R, and Ruby.

setup

GraalVM is a drop in replacement for OpenJDK with some extra powers.

Ghidraal will only work when Ghidra is run within a GraalVM!!!

  1. download GraalVM (20.1+) and set up set JAVA_HOME, PATH, etc. You can copy and source env.sh for a hopefully painless install, e.g.

    mkdir ~/graalvm
    cp env.sh ~/graalvm
    cd ~/graalvm
    . env.sh
  2. build or download the Ghidraal extension

    • to build, you'll need gradle 5+. Create a symlink to your Ghidra installation and run gradle. The extension will be generated in dist, e.g.
      # in the directory containing your checkout of this repo 
      ln -s ~/ghidra_9.*_PUBLIC ghidra
      . ~/graalvm/env.sh # build requires GraalVM
      gradle
      ls dist/
    • or download a release
  3. Run ghidra with GraalVM and install the extension

    . ~/graalvm/env.sh
    ~/ghidra_9.*_PUBLIC/ghidraRun

    From the main window, select File->Install Extensions..., click the +, and select the Ghidraal release zip file from the repo dist directory.

  4. Restart Ghidra

  5. Open a program. If not prompted to, select File->Configure..., under Experimental select Configure, and make sure GhidraalPlugin is checked.

usage

There are some extremely basic scripts for each supported language in the ghidra_scripts directory. When the extension is installed, they should become visible in the Script Manager under the Ghidraal category.

An interactive console for each language is available under the code browser "Window" menu option.

Python

Ghidraal hijacks the .py extension by removing the Jython script provider. Disable GhidraalPlugin to reenable Jython.

Ghidra's built in Python scripts are Python 2, so won't necessarily work with Ghidraal's Python 3. Some can be ported automatically with 2to3.

For more on Graal Python, see the README.md.

import magic

Jython provides some import magic so that Java packages and classes can be imported like Python modules. Ghidraal implements a similar magic to emulate this behavior (independent from the Graal Python --python.EmulateJython switch implementation). See import_demo.py.

To disable Ghidraal's import magic, set the (script/interpreter) global variable _ghidraal_use_jythonic_imports to False. See import_demo2.py.

packages

Ghidraal imports site automatically, so installed packages will be available.

# to see what's available
graalpython -m ginstall install --help
# install pandas
graalpython -m ginstall install pandas

# after an upgrade of GraalVM, it might be necessary to reinstall packages
graalpython -m ginstall uninstall numpy,pandas
graalpython -m ginstall install pandas

# although pip isn't 100% supported, some packages can be installed, e.g.
graalpython -m ginstall pypi pyelftools

Ghidraal changelog

  • ghidraal-0.0.5
    • fix npm directory handling for javascript/nodejs
    • python
      • demo workaround for multi-context accesses in askscript3.py
    • fix console locking on error
    • updates to build.gradle
      • add eclipse plugin
      • allow for "in tree" build
    • add "reinstall" and "clean" commands to env.sh
    • graalvm + ghidra version bump
  • ghidraal-0.0.4
    • don't run GhidraalScripts in swing thread
    • fix memory leak from unclosed polyglot contexts
    • console
      • don't print expression value if it's (equivalent of) null
      • add "busy" prompt indicator
    • python
      • fix Jython import emulation, update docs, add examples
      • use option "python.ForceImportSite" to automatically import site.py
  • ghidraal-0.0.3
    • added support for analyzeHeadless usage
    • move example scripts into Ghidraal category
  • ghidraal-0.0.2
    • added interactive consoles
    • made basic.py like the other basic scripts
  • ghidraal-0.0.1
    • initial
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].