MCPcopy Index your code
hub / github.com/NationalSecurityAgency/TraceAnalysis

github.com/NationalSecurityAgency/TraceAnalysis @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
2,237 symbols 5,786 edges 226 files 259 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TraceAnalysis

TraceAnalysis is a suite of tools for generating, manipulating, analyzing, and exploring program execution traces.

Quickstart

See this page for a walkthrough of a simple example.

Building

Currently, TraceAnalysis is only supported on Ubuntu 22.04. This does not mean that the tools won't build or work on other distributions/platforms, just that we only test on Ubuntu 22.04. A Dockerfile is provided that summarizes the build steps and dependencies. However, provided you have the appropriate toolchains and dependencies in place, you can build any individual tool using the recipes availble in the project's .justfile. Each tool has its own .justfile, but the types of recipes available are pretty much the same for each tool.

The top-level .justfile provides the following recipes:

  • build
  • test
  • install
  • clean
  • doc
  • package

For almost all of these recipes you can provide a target, and just will dispatch to the correct recipe for the target (e.g. just build ghidra-tracemadness will build ghidra-tracemadness). If you do not supply a target (or your target is "all"), the recipe will be run on all targets. As an exception, package will package everything in the specified build-dir. By default, this directory is build/ at the root of the project. To change this, simply set the BUILD_DIR environment variable. The package recipe does not actually build all of the targets, so make sure that you just just build to build all of the targets before running just package.

Documentation

Running just doc will build all of the documentation for the project. This includes a book-style guide on how to use each of the tools and a walkthrough of the provided examples. The output of this recipe is the build/docs folder by default. While this can be viewed locally, many of the links were not designed with that in mind and we recommend that you copy/symlink the output to a folder called "traceanalysis" and run a simple http server above that directory.

ln -s . build/docs/traceanalysis
python3 -m http.server --directory build/docs/
# Visit http://localhost:8000/traceanalysis/

Acknowledgements

Thank you to the following individuals who (among others) contributed to the initial research and development:

  • Luke Mains
  • Jean-Paul Miller
  • Tod Amon
  • Jon Bradley
  • Hamilton Link
  • Ricardo Alanis
  • Nasser Salim

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Extension points exported contracts — how you extend this code

Serializable (Interface)
Trait representing the ability to serialize and deserialize an object. [23 implementers]
dynamic-trace/src/index/mod.rs
RegsExt (Interface)
(no doc) [8 implementers]
tracer-panda/src/arch/mod.rs
Sealed (Interface)
(no doc) [9 implementers]
dynamic-dataflow/core/src/database/cache.rs
MadnessQueryResultListener (Interface)
(no doc) [22 implementers]
ghidra-tracemadness/src/main/java/tracemadness/MadnessQueryResultListener.java
OnVCpuInit (Interface)
(no doc) [1 implementers]
tracer-qemu-user/src/plugin.rs
Index (Interface)
A trait describing the ability to record an index over [SpacetimeBlock]s. [3 implementers]
dynamic-trace/src/index/mod.rs
GhidraArchitecture (Interface)
(no doc) [10 implementers]
dynamic-dataflow/core/src/lifter/ghidra.rs
SpacetimeTickField (Interface)
(no doc) [11 implementers]
ghidra-tracemadness/src/main/java/tracemadness/listingfield/SpacetimeTickField.java

Core symbols most depended-on inside this repo

name
called by 224
dynamic-trace/src/record.rs
get
called by 198
ghidra-lifter/src/lib.rs
push
called by 162
dynamic-dataflow/core/src/delta.rs
add
called by 149
dynamic-dataflow/core/src/value.rs
into
called by 146
dynamic-trace/src/index/string_index_old.rs
len
called by 134
dynamic-trace/src/lib.rs
map
called by 126
dynamic-trace/src/lib.rs
resolve_deps
called by 97
dynamic-dataflow/core/src/analysis.rs

Shape

Method 1,405
Class 434
Function 290
Enum 77
Interface 31

Languages

Rust51%
Java38%
Python7%
C++4%
C1%

Modules by API surface

ghidra-tracemadness/src/main/java/tracemadness/timelisting/TimeListingProvider.java121 symbols
dynamic-dataflow/core/src/value.rs99 symbols
dynamic-trace/src/record.rs69 symbols
ghidra-tracemadness/src/main/java/tracemadness/spacelisting/SpaceListingProvider.java57 symbols
ghidra-tracemadness/src/main/java/tracemadness/objectmanager/ObjectTimelineComponent.java51 symbols
container-tracemadness/entrypoint.py50 symbols
dynamic-dataflow/core/src/operation.rs47 symbols
ghidra-lifter/src/lifter.cc43 symbols
dynamic-trace/src/index/string_index_old.rs41 symbols
dynamic-trace/src/index/string_index.rs40 symbols
ghidra-tracemadness/src/main/java/tracemadness/objectmanager/ObjectManagerProvider.java39 symbols
tracer-unicorn/unicorn_trace/lib.py38 symbols

For agents

$ claude mcp add TraceAnalysis \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact