Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI Patch Wizard #393

Open
wants to merge 35 commits into
base: master
Choose a base branch
from

Conversation

EdwardLarson
Copy link
Collaborator

One sentence summary of this PR (This should go in the CHANGELOG!)
Add a step-by-step interface to the GUI to interactively configure a source code patch to a binary using PatchMaker.

Link to Related Issue(s)
The PatchFromSourceModifier and FunctionReplaceModifier can be run through the GUI to accomplish source code patching, but require the user to have some understanding of the goal beforehand. If anything goes wrong during these Modifiers' execution, the user has to inspect the OFRAK logs and possible temp build dirs to understand what step went wrong and how to correct the problem.

Please describe the changes in your request.

  • Add an interface in the GUI providing separate steps to:
    • Upload patch source code files, select a toolchain, and change the toolchain config
    • Select which segments from each compiled patch file to inject, where to place them in memory, and different methods to create available free space to place these segments.
    • Define any symbols the patch requires and are not provided by analysis on the target binary.
  • Refactor some frontend code:
    • The "global" view, which App.svelte uses to determine the main view the user sees, is set up as a stack, rather than just the one stack view. This "global" view, the topLevelView, is right now either the StartView, the normal resource tri-pane, ProjectManagerView, or RootWizardView. This change is not strictly necessary.
    • The SerializerInputForm is split into multiple, more specific components, which cut down on the state that each type of serializer input requires reasoning about. Thanks to this, the serializer inputs now each all handle default inputs AND existing inputs - that is, if the serializer input is bound to variable X, and X already has a value, the serializer input is correctly prepopulated to reflect X.
  • Fully backwards-compatible small refactor to the backend. Rather than add another 1000 lines of code to server.py, I added a modules directory with a patch_wizard.py containing all the Patch Wizard functionality and routes, and a bit of code in the main server class constructor to add all the routes defined by a hardcoded list of modules (currently only the patch wizard).

Anyone you think should look at this, specifically?
@rbs-jacob

…f input, and to respect defaults and pre-existing bound values. Legacy SerializerInputForm.svelte left around, still used by non-patch-wizard components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants