DSH Frida Toolkit: Building a Frida Workbench in Harness

Introduction

When performing client-side dynamic analysis with Frida, the common practice is to open a separate terminal: enumerating devices, attaching or spawning, loading scripts, and then checking send() output. If you tweak the script, you have to unload and re-attach; the windows get fragmented when running multiple processes side-by-side. DeepSeek Harness (DSH) takes a plugin approach, aiming to complete analysis and conversation within the same interface; if you use Frida as a daily tool, what you lack is a “workbench that can maintain a session for a long time, edit JS while viewing messages,” rather than memorizing another set of scattered commands.

Below is an introduction to the community plugin dsh-frida-toolkit (repository wanan8396/dsh-frida-toolkit), maintained by wanan8396, categorized as a client in SkillHub. It provides a complete Frida page in the DSH sidebar and registers an Agent tool named frida, sharing the same JSON bridge with the page.

What is it

One sentence: A Frida toolkit for DSH — sidebar entry, full-page workbench, a Python bridge in the background maintains Device / Session / Script, so you don’t need to repeatedly disconnect when editing scripts.

Data flow (consistent with README):

page  ──POST /plugins/frida-toolkit/call──▶  host.js  ──stdin/stdout JSON──▶  bridge.py  ──▶  frida
      ◀──GET /plugins/frida-toolkit/events── (buffered)                     (one process)
  • bridge.py holds Frida objects; the page does not run Python directly.
  • Each call is associated with an ID, with a 120s timeout to prevent the page from freezing.
  • The bridge is started on first use and terminated when the plugin is unloaded.
  • Built-in scripts are provided via GET /plugins/frida-toolkit/script?id=....

License MIT; package.json version 1.0.0. GitHub stars: 0 (based on the directory page).

What the Page Can Do

Area Function
Environment Python version, frida version, whether the bridge is running
Processes Select device, searchable process list, Attach, Spawn & attach
Sessions List active attachments, can select, detach, resume, or kill processes
Script JS editor, three built-in scripts, Load, Unload, rpc.exports calls
Messages Log send(), detach reasons, bridge exits, etc., polling approximately every 1.2s

The currently selected session determines the target for the editor; you can attach to multiple apps and switch between sessions.

Built-in Scripts

Script Purpose
trace-exports.js rpc.exports.configure({module:"libfoo.so"}), list(), hook("ssl", 20): Hooks onEnter/onLeave for exported functions and prints arguments
ssl-unpin.js Hooks TrustManagerImpl.verifyChain, X509TrustManagerExtensions.checkServerTrusted, OkHostnameVerifier, X509_verify_cert, facilitating reading traffic via a proxy
finder.js rpc.exports.search("needle") / searchHex("48 65 6c"): Scans readable memory and returns addresses and context

Typical RPC flow in the page:

  1. Select a session;
  2. Select a built-in script;
  3. Click Load;
  4. Fill in a method name like configure in Method Name, with arguments like [{"module":"libc.so"}];
  5. Click Call.

Agent Tool frida

Besides the page, the plugin exposes a tool named frida to the model. It can be driven using natural language; see the README example:

Attach to com.example.app, load the certificate bypass script, and give me the messages.

The tool takes a single action and fields as arguments, returning JSON identical to the page. Main actions:

action Purpose
status / devices / applications Discover environment and running applications
processes (query) Find pid by conditions
attach (target) / spawn (target) Open a session
load (session, source or target is a built-in ID) Install a script
rpc (session, rpc, args) Call rpc.exports.<name>
messages (session, sinceSeq) Read content sent by scripts
sessions / detach / unload / resume / kill Session lifecycle
script (target) Pull built-in script source code for editing

See the repository TOOL.md for full conventions, examples, and failure modes.

Environment and Dependencies

README requirements:

  • DSH’s Python must be able to import frida; you can verify this first:
python3 -c "import frida"
  • Install the Frida Python package:
python3 -m pip install --user frida

When deploying on a phone, the wrapper path is $DSH_DEPENDENCY_ROOT/python.

  • Android USB: Run frida-server on the device, select the device reported by frida.enumerate_devices() in the page (local or remote is fine).
  • No npm dependencies, no build steps.

Installation and Enablement

SkillHub directory: wanan8396/dsh-frida-toolkit. README and package.json have been scraped, and the original dsh plugin add ... command is not provided, so please follow the instructions on the directory page for installation steps; do not concatenate commands based on the repository name.

The plugin injects the sidebar and layout on the DSH client side (dsh.client.platform in package.json is web, immediately: true). Before installation, it is recommended to read the repository source code and the MIT license; Frida operations are executed with the user and permissions of the current DSH process. When spawn fails, permission errors will appear as-is in the message logs.

Limitations (Know Before Using)

  • rpc.exports are called synchronously via exports_sync; scripts with only asynchronous exports should interact with the message area via send().
  • Spawn requires that the target application can be started by the user running Frida.
  • The bridge is single-process shared: a script crash usually only affects that script; if the bridge is killed, all attachments are severed (but can be re-attached).

Use Cases

  • Performing dynamic debugging, export function tracing, SSL-assisted analysis, and memory string searching for Android / local processes within DSH.
  • Wanting the Agent to complete “find process → attach → load → rpc → read messages” using a chain of frida tools, rather than relying solely on manual CLI.

Not suitable as a general-purpose Frida GUI detached from DSH; it also does not replace deploying frida-server and security auditing on the target device.

The community directory SkillHub has no official affiliation with DeepSeek / Hyperscience; the plugin source is based on the wanan8396 repository.

Links

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye