-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'NationalSecurityAgency:master' into doubleclick-processor
- Loading branch information
Showing
621 changed files
with
14,449 additions
and
6,681 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# DMG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# DemanglerGnu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# GnuDisassembler | ||
|
||
The GnuDisassembler extension module must be built using gradle prior to its use within Ghidra. | ||
|
||
This module provides the ability to leverage the binutils disassembler capabilities | ||
for various processors as a means of verifying Sleigh disassembler output syntax. | ||
|
||
To build this extension for Linux or macOS: | ||
|
||
1. If building for an installation of Ghidra, copy the appropriate source distribution of binutils | ||
into this module's root directory. If building within a git clone of the full Ghidra source, copy | ||
binutils source distribution file into the `ghidra.bin/GPL/GnuDisassembler` directory. | ||
|
||
The supported version and archive format is identified within the build.gradle file. If a | ||
different binutils distribution is used the build.gradle and/or buildGdis.gradle may require | ||
modification. | ||
|
||
The build requires the following packages to be installed: | ||
* flex | ||
* bison | ||
* texinfo | ||
* zlib1g-dev | ||
|
||
2. Run gradle from the module's root directory (see top of `build.gradle` file for specific | ||
instructions). | ||
|
||
This resulting gdis executable will be located in `build/os/<platform>`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Public_Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Ghidra/Configurations/Public_Release/src/global/docs/UserAgreement.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<HTML> | ||
<HEAD> | ||
<TITLE>Ghidra User Agreement</TITLE> | ||
</HEAD> | ||
|
||
<FONT SIZE="5"> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# AnnotationValidator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
##VERSION: 2.0 | ||
Module.manifest||GHIDRA||||END| | ||
README.md||GHIDRA||||END| | ||
src/main/resources/META-INF/services/javax.annotation.processing.Processor||GHIDRA||||END| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Debugger-agent-dbgeng |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Debugger-agent-dbgmodel-traceloader |
1 change: 1 addition & 0 deletions
1
Ghidra/Debug/Debugger-agent-dbgmodel-traceloader/certification.manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
##VERSION: 2.0 | ||
##MODULE IP: Apache License 2.0 | ||
Module.manifest||GHIDRA||||END| | ||
README.md||GHIDRA||||END| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Debugger-agent-dbgmodel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
##VERSION: 2.0 | ||
Module.manifest||GHIDRA||||END| | ||
README.md||GHIDRA||||END| | ||
src/javaprovider/def/javaprovider.def||GHIDRA||||END| | ||
src/javaprovider/rc/javaprovider.rc||GHIDRA||||END| | ||
src/main/resources/agent/dbgmodel/model/impl/dbgmodel_schema.xml||GHIDRA||||END| |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Debugger-agent-frida | ||
|
||
## Random Notes on the Implementation of Debugger-agent-frida | ||
|
||
Building libfrida-core.so: | ||
* You can download libfrida-core.a for Frida by grabbing the latest frida-core-devkit for your OS | ||
from https://github.com/frida/frida/releases or by downloading the Frida source and running: | ||
`python3 devkit.py frida-core linux-x86_64 DEVKIT` from the `releng` directory. | ||
|
||
Ghidra needs a dynamically-loadable version of libfrida-core.a which you can generate by something like: | ||
```bash | ||
cp ghidra_wrapper.c into the directory with libfrida-core.a and frida-core.h (distro or DEVKIT) | ||
g++ -shared ghidra_wrapper.c ./libfrida-core.a -o libfrida-core.so | ||
``` | ||
|
||
Libfrida-core.so should then be added to the `j`na.library.path`or put someplace like | ||
`/usr/lib/x86_64-linux-gnu`, where it will get picked up by `Native.load()`. | ||
|
||
### Frida Functionality | ||
The most interesting bits of Frida are available as "methods" from the Objects Tree. For instance, | ||
if you select a function and hit `M`, you will get a dialog with available methods. Selecting, | ||
for example, `intercept` will bring up a second dialog with the relevant parameters. For many of | ||
these, you will want to provide your own Javascript `on` functions, e.g. `onEnter` for the | ||
Interceptor. Stalking is available on Threads and the individual thread entries. Scan, protect, and | ||
watch functions are available on Memory. You can also redirect the output to GhidraScript, although | ||
this relies on a bit of a hack. If your Javascript `Name` parameter is something like | ||
`interpreter`, prepend `interpreter<=` to the output from your Javascript, and the results will be | ||
passed to both the console and the script. | ||
|
||
### State in Frida | ||
Commands in Frida are, generally speaking, not state-dependent, i.e. they do not depend on whether | ||
the target is running or not, only on whether the frida-agent thread is running. Many of the | ||
gum-based commands do, however, depend on ptrace. If you have a ptrace-based debugger attached to | ||
the target, they will time out. You can attach a debugger after Frida, but you will have to detach | ||
it to regain the gum-based functionality. "Detach" in most debuggers includes "resume", so it is | ||
difficult to get state other than the "initial" state from the frida-agent injection point. It | ||
would be nice if "disconnect" worked, but "disconnect" (i.e. detach without resuming) also leaves | ||
Frida in a partially disabled state. | ||
|
||
### Errors in Frida | ||
The cloaking logic in Frida, e.g. in `gum_cloak_add_thread` and `gum_cloak_index_of_thread`, is | ||
broken as of the writing of this note. `gum_cloak_add_thread` is called for every thread, and | ||
`gum_cloak_index_of_thread` returns a non-negative result for every call but the first. As a | ||
result, every thread but one is cloaked, and `enumerateThreads`returns only a single thread. This is | ||
documented in `Issue #625` for the frida-gum project. A quick fix is to comment out the cloaking | ||
call in `frida-gum/gum/gumprocess.c::gum_emit_thread_if_not_cloaked`. Obviously, this may have | ||
other undesirable effects, but... | ||
|
||
The logic in the ordering of exception handlers also appears to be broken (`Issue #627`). New | ||
handlers are appended to the queue, in most cases after `gum_exceptor_handle_scope_exception` and | ||
`gum_quick_core_handle_crashed_js`. `gum_exceptor_handle_scope_exception` almost always returns | ||
`TRUE`, breaking out of the queue and causing any remaining handlers to be ignored. This means any | ||
handler added with `Process.setExceptionHandler` is likely to be ignored. A quick fix is to modify | ||
`gum_exceptor_add` to use `g_slist_prepend instead` of `g_slist_append`. | ||
|
||
Not really an error, but worth noting: building `libfrida-core.so` from the source may result in a | ||
library with glib2.0 dependencies that are incompatible with the current version of Eclipse. The | ||
not-so-simple solution is to build Eclipse on the machine that you used to build `libfrida-core`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Debugger-agent-gdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.