GithubHelp home page GithubHelp logo

pombredanne / ghidra_scripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kohnakagawa/ghidra_scripts

0.0 1.0 0.0 3.67 MB

Some Ghidra scripts to automate my reverse-engineering tasks

License: MIT License

Python 100.00%

ghidra_scripts's Introduction

Ghidra scripts

This repository contains some Ghidra scripts to automate my reverse-engineering tasks.

About scripts in this repo

CalcCyclomaticForAllFunctions.py

This script calculates the Cyclomatic complexities for all functions of the current program. It can be used for finding the complex functions.

FindFrequentlyUsedFunctions.py

This script shows the frequently-called functions.

SearchFunctionCallPattern.py

This script searches the function call passing a specific value.

For example, consider the case where you want to look for the function call of RtlpImageDirectoryEntryToDataEx() whose third argument is IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT (0xd).

By using this script, you can search such a call site by typing RtlpImageDirectoryEntryToDataEx(_, _, 0xd, _, _)

Input for searching

input

Search results

result

TestSymbolicPropagator.py

This script is for testing Ghidra SymbolicPropagator. Note that it only works for the analysis of KernelBase.dll

SearchVulnSscanf.py

This scripts finds the potential vulnerable sscanf function call patterns via a P-Code analysis. Insipred by this ZDI blog post.

IDE setup

Python scripting

I think the best way to develop a Ghidra Python script is to use PyCharm because all type completions work fine. Please follow here for more details.

Since the ghidra-pyi-generator does not provide the .pyi type stubs for Ghidra 9.2, I have newly created the .pyi type stubs for Ghidra 9.2. If you are using the Ghidra 9.2, please use these stubs.

Java scripting

I think it is better to use Eclipse with GhidraDev plugin when using Java. Please follow the Ghidra official documentation.

Author

Koh M. Nakagawa

License

MIT License

ghidra_scripts's People

Contributors

kohnakagawa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.