Custom agent with Java bridge
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java, javascript, python
調査の方向性
まず、frida-python の session.create_script と script.load の呼び出しを使い、frida_java_bridge.js と issue に示されている分離されたスクリプトソースを使用して、例を再現します。ソースを連結せずに bridge の読み込みで Java.perform の動作を維持できるか調査します。bridge を個別に読み込んだ状態でカスタムエージェントが動作し、ユーザースクリプトのエラーに有用な行番号が保持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi,
So with Frida 17, runtime bridges, such as the Java runtime bridge, must be added manually to a custom agent script.
This works for me when concatenating the bridge code with whatever other Frida script I want to load, and then calling script.load from python.
The problem is that it's harder to debug bugs in a Frida script, when the error message points to line ~13'000, because the buggy Frida script was appended to the bridge script. Is there a way to load the bridge script separately?
The following script shows the problem:
import frida
import os
import time
process = "SOME APP"
device = frida.get_usb_device()
pid = device.get_process(process).pid
session = device.attach(pid)
with open('/home/user/frida_java_bridge.js', 'r') as bridgefile:
bridge_source = bridgefile.read()
script1_source = """
console.log('hello form script1')
"""
script2_source = """
console.log('hello form script2a');
Java.perform(function() {console.log('inside Java runtime')});
console.log('hello form script2b');
"""
bridge= session.create_script(bridge_source)
script1 = session.create_script(script1_source)
script2 = session.create_script(script2_source)
print("one by one:")
bridge.load()
script1.load()
script2.load()
print("concatenated:")
script3 = session.create_script(bridge_source + script2_source)
script3.load()
output:
one by one:
hello form script1
hello form script2a
concatenated:
hello form script2a
inside Java runtime
hello form script2b
- 主要言語
- Python
- スター
- 873
- フォーク
- 173
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
frida/frida-python のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
frida/frida-python#262 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
frida/frida-python#247 · コメント 2 件 · リアクション 2 件 ·
-
After a long period of hooking applications on Ubuntu, Python and JavaScript are unable to interact. オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
frida/frida-python#246 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
frida/frida-python#243 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
frida/frida-python#242 · コメント 1 件 ·
frida/frida-python の issue をすべて見る
似ている issue
-
area: harness bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Human-Agent-Society/reef#625 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
learningequality/kolibri#15351 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·