Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9172e84ad3 | ||
|
|
fd82ee2abb | ||
|
|
5d28ba0a25 | ||
|
|
54e22b6163 | ||
|
|
4803ab5231 | ||
|
|
7829b5ef40 | ||
|
|
dd77d7f6c2 | ||
|
|
06c9764ec5 | ||
|
|
f8fc2b2b3d | ||
|
|
c6f745cb65 | ||
|
|
39b73f40b4 | ||
|
|
fcc6e1546e | ||
|
|
283d4c2952 | ||
|
|
aab2817ca2 | ||
|
|
dae5b01520 |
93
.github/workflows/build.yml
vendored
93
.github/workflows/build.yml
vendored
@@ -109,7 +109,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
@@ -121,43 +121,53 @@ jobs:
|
||||
id: setup-ndk
|
||||
uses: nttld/setup-ndk@v1
|
||||
with:
|
||||
ndk-version: r25c
|
||||
local-cache: true
|
||||
ndk-version: r25b
|
||||
local-cache: false
|
||||
link-to-sdk: true
|
||||
|
||||
- name: Set up Python 3.8
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.8
|
||||
python-version: 3.9
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential tree ninja-build gcc-multilib g++-multilib lib32stdc++-9-dev flex bison ruby ruby-dev python3-requests python3-setuptools python3-dev python3-pip libc6-dev libc6-dev-i386 -y
|
||||
sudo gem install fpm -v 1.11.0 --no-document
|
||||
python3 -m pip install lief
|
||||
python3 -m pip install lief graphlib
|
||||
|
||||
- name: build frida for Android
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global user.name "GitHub Actions"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
export ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }}
|
||||
tree $ANDROID_NDK_ROOT
|
||||
echo "ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT"
|
||||
|
||||
git clone --recurse-submodules https://github.com/frida/frida
|
||||
cd frida
|
||||
for path in ../patches/*
|
||||
do
|
||||
name=$(basename $path)
|
||||
real=$(realpath $path)
|
||||
echo "Apply patches in $real to frida/$name"
|
||||
cd $name
|
||||
git am ../../patches/$name/*.patch
|
||||
cd ..
|
||||
echo "Apply patches in $real to frida/subprojects/$name"
|
||||
cd subprojects/$name
|
||||
git am ../../../patches/$name/*.patch
|
||||
cd ../..
|
||||
echo $i
|
||||
done
|
||||
make core-android-arm
|
||||
make core-android-arm64
|
||||
make core-android-x86
|
||||
make core-android-x86_64
|
||||
cd ..
|
||||
|
||||
ARCHES="android-arm android-arm64 android-x86 android-x86_64"
|
||||
for ARCH in $ARCHES
|
||||
do
|
||||
mkdir build-$ARCH
|
||||
cd build-$ARCH
|
||||
../frida/configure --host=$ARCH
|
||||
make
|
||||
cd ..
|
||||
done
|
||||
|
||||
- name: Split Repository Name
|
||||
id: split_name
|
||||
@@ -194,27 +204,22 @@ jobs:
|
||||
- name: package build result for Android
|
||||
shell: bash
|
||||
run: |
|
||||
pushd frida
|
||||
|
||||
gzip build/frida-android-arm/bin/frida-server
|
||||
gzip build/frida-android-arm64/bin/frida-server
|
||||
gzip build-android-arm/subprojects/frida-core/server/frida-server
|
||||
gzip build-android-arm64/subprojects/frida-core/server/frida-server
|
||||
gzip build-android-x86/subprojects/frida-core/server/frida-server
|
||||
gzip build-android-x86_64/subprojects/frida-core/server/frida-server
|
||||
|
||||
gzip build/frida-android-x86/bin/frida-server
|
||||
gzip build/frida-android-x86_64/bin/frida-server
|
||||
gzip build-android-arm/subprojects/frida-core/inject/frida-inject
|
||||
gzip build-android-arm64/subprojects/frida-core/inject/frida-inject
|
||||
gzip build-android-x86/subprojects/frida-core/inject/frida-inject
|
||||
gzip build-android-x86_64/subprojects/frida-core/inject/frida-inject
|
||||
|
||||
gzip build/frida-android-arm/bin/frida-inject
|
||||
gzip build/frida-android-arm64/bin/frida-inject
|
||||
gzip build-android-arm/subprojects/frida-core/lib/gadget/frida-gadget.so
|
||||
gzip build-android-arm64/subprojects/frida-core/lib/gadget/frida-gadget.so
|
||||
gzip build-android-x86/subprojects/frida-core/lib/gadget/frida-gadget.so
|
||||
gzip build-android-x86_64/subprojects/frida-core/lib/gadget/frida-gadget.so
|
||||
|
||||
gzip build/frida-android-x86/bin/frida-inject
|
||||
gzip build/frida-android-x86_64/bin/frida-inject
|
||||
|
||||
gzip build/frida-android-arm/lib/frida/32/frida-gadget.so
|
||||
gzip build/frida-android-arm64/lib/frida/64/frida-gadget.so
|
||||
|
||||
gzip build/frida-android-x86/lib/frida/32/frida-gadget.so
|
||||
gzip build/frida-android-x86_64/lib/frida/64/frida-gadget.so
|
||||
|
||||
popd
|
||||
|
||||
- name: Upload android arm frida-server for Florida
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
@@ -222,7 +227,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-arm/bin/frida-server.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-arm/subprojects/frida-core/server/frida-server.gz'
|
||||
asset_name: 'florida-server-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -232,7 +237,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-arm64/bin/frida-server.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-arm64/subprojects/frida-core/server/frida-server.gz'
|
||||
asset_name: 'florida-server-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm64.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -242,7 +247,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-x86/bin/frida-server.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-x86/subprojects/frida-core/server/frida-server.gz'
|
||||
asset_name: 'florida-server-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -252,7 +257,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-x86_64/bin/frida-server.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-x86_64/subprojects/frida-core/server/frida-server.gz'
|
||||
asset_name: 'florida-server-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86_64.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -262,7 +267,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-arm/bin/frida-inject.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-arm/subprojects/frida-core/inject/frida-inject.gz'
|
||||
asset_name: 'florida-inject-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -272,7 +277,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-arm64/bin/frida-inject.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-arm64/subprojects/frida-core/inject/frida-inject.gz'
|
||||
asset_name: 'florida-inject-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm64.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -282,7 +287,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-x86/bin/frida-inject.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-x86/subprojects/frida-core/inject/frida-inject.gz'
|
||||
asset_name: 'florida-inject-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -292,7 +297,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-x86_64/bin/frida-inject.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-x86_64/subprojects/frida-core/inject/frida-inject.gz'
|
||||
asset_name: 'florida-inject-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm-x86_64.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -302,7 +307,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-arm/lib/frida/32/frida-gadget.so.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-arm/subprojects/frida-core/lib/gadget/frida-gadget.so.gz'
|
||||
asset_name: 'florida-gadget-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm.so.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -312,7 +317,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-arm64/lib/frida/64/frida-gadget.so.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-arm64/subprojects/frida-core/lib/gadget/frida-gadget.so.gz'
|
||||
asset_name: 'florida-gadget-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm64.so.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -322,7 +327,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-x86/lib/frida/32/frida-gadget.so.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-x86/subprojects/frida-core/lib/gadget/frida-gadget.so.gz'
|
||||
asset_name: 'florida-gadget-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86.so.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -332,7 +337,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/frida/build/frida-android-x86_64/lib/frida/64/frida-gadget.so.gz'
|
||||
asset_path: '${{ github.workspace }}/build-android-x86_64/subprojects/frida-core/lib/gadget/frida-gadget.so.gz'
|
||||
asset_name: 'florida-gadget-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86_64.so.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6819aa2d3f2a6bbde8d31566b3dff6dd085776fc Mon Sep 17 00:00:00 2001
|
||||
From d7201c32bd8cf347cacd7427a942e0e0188045a1 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 15:51:29 +0800
|
||||
Subject: [PATCH 01/10] Florida: string_frida_rpc
|
||||
Subject: [PATCH 1/9] Florida: string_frida_rpc
|
||||
|
||||
---
|
||||
lib/base/rpc.vala | 15 ++++++++++++---
|
||||
@@ -54,5 +54,5 @@ index 3695ba8c..664bd19c 100644
|
||||
|
||||
var request_id_value = rpc_message.get_element (1);
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1505aff0b6c01c5e0faa4a6b56bbb04a78068b89 Mon Sep 17 00:00:00 2001
|
||||
From 98034685d895e07aa0cf079eb7f73189f12c6d66 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 15:57:19 +0800
|
||||
Subject: [PATCH 03/10] Florida: frida_agent_so
|
||||
Subject: [PATCH 2/9] Florida: frida_agent_so
|
||||
|
||||
---
|
||||
src/linux/linux-host-session.vala | 7 ++++---
|
||||
@@ -29,5 +29,5 @@ index 50470ac8..64245792 100644
|
||||
AgentMode.INSTANCED,
|
||||
tempdir);
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
From 3abc151103db6b7ac3c971a5dfc5f90299d3932f Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 15:52:56 +0800
|
||||
Subject: [PATCH 02/10] Florida: re_frida_server
|
||||
|
||||
---
|
||||
server/server.vala | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/server.vala b/server/server.vala
|
||||
index 525c145e..f7547819 100644
|
||||
--- a/server/server.vala
|
||||
+++ b/server/server.vala
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Frida.Server {
|
||||
private static Application application;
|
||||
|
||||
- private const string DEFAULT_DIRECTORY = "re.frida.server";
|
||||
+ private static string DEFAULT_DIRECTORY = null;
|
||||
private static bool output_version = false;
|
||||
private static string? listen_address = null;
|
||||
private static string? certpath = null;
|
||||
@@ -50,6 +50,7 @@ namespace Frida.Server {
|
||||
};
|
||||
|
||||
private static int main (string[] args) {
|
||||
+ DEFAULT_DIRECTORY = GLib.Uuid.string_random();
|
||||
Environment.init ();
|
||||
|
||||
#if DARWIN
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
|
||||
@@ -1,32 +1,31 @@
|
||||
From 36f933383018c359a04d5772806d88ba686f4067 Mon Sep 17 00:00:00 2001
|
||||
From e108bdb7be0e5756a613fbe1162f07a8623da327 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 16:02:50 +0800
|
||||
Subject: [PATCH 04/10] Florida: symbol_frida_agent_main
|
||||
Subject: [PATCH 3/9] Florida: symbol_frida_agent_main
|
||||
|
||||
---
|
||||
src/agent-container.vala | 2 +-
|
||||
src/anti-anti-frida.py | 27 +++++++++++++++++++++++++++
|
||||
src/darwin/darwin-host-session.vala | 2 +-
|
||||
src/embed-agent.sh | 8 ++++++++
|
||||
src/freebsd/freebsd-host-session.vala | 2 +-
|
||||
src/linux/linux-host-session.vala | 2 +-
|
||||
src/qnx/qnx-host-session.vala | 2 +-
|
||||
src/windows/windows-host-session.vala | 2 +-
|
||||
tests/test-agent.vala | 2 +-
|
||||
tests/test-injector.vala | 2 +-
|
||||
10 files changed, 43 insertions(+), 8 deletions(-)
|
||||
9 files changed, 35 insertions(+), 8 deletions(-)
|
||||
create mode 100644 src/anti-anti-frida.py
|
||||
|
||||
diff --git a/src/agent-container.vala b/src/agent-container.vala
|
||||
index a8db6b29..afe514cb 100644
|
||||
index 73e0c017..a3db1112 100644
|
||||
--- a/src/agent-container.vala
|
||||
+++ b/src/agent-container.vala
|
||||
@@ -25,7 +25,7 @@ namespace Frida {
|
||||
assert (container.module != null);
|
||||
@@ -28,7 +28,7 @@ namespace Frida {
|
||||
}
|
||||
|
||||
void * main_func_symbol;
|
||||
- var main_func_found = container.module.symbol ("frida_agent_main", out main_func_symbol);
|
||||
+ var main_func_found = container.module.symbol ("main", out main_func_symbol);
|
||||
+ var main_func_found = container.module.symbol ("frida_agent_main", out main_func_symbol);
|
||||
assert (main_func_found);
|
||||
container.main_impl = (AgentMainFunc) main_func_symbol;
|
||||
|
||||
@@ -73,43 +72,10 @@ index ab9b2900..4369922d 100644
|
||||
uint id;
|
||||
|
||||
- unowned string entrypoint = "frida_agent_main";
|
||||
+ unowned string entrypoint = "main";
|
||||
+ unowned string entrypoint = "frida_agent_main";
|
||||
#if HAVE_EMBEDDED_ASSETS
|
||||
id = yield fruitjector.inject_library_resource (pid, agent, entrypoint, agent_parameters, cancellable);
|
||||
#else
|
||||
diff --git a/src/embed-agent.sh b/src/embed-agent.sh
|
||||
index 6a3bf9ed..e6a69e41 100755
|
||||
--- a/src/embed-agent.sh
|
||||
+++ b/src/embed-agent.sh
|
||||
@@ -12,6 +12,7 @@ lipo=$9
|
||||
agent_dbghelp_prefix=${10}
|
||||
agent_symsrv_prefix=${11}
|
||||
|
||||
+custom_script="$output_dir/../../../../frida-core/src/anti-anti-frida.py"
|
||||
priv_dir="$output_dir/frida-agent@emb"
|
||||
|
||||
mkdir -p "$priv_dir"
|
||||
@@ -41,6 +42,9 @@ collect_unix_agent ()
|
||||
else
|
||||
touch "$embedded_agent"
|
||||
fi
|
||||
+ if [ -f "$custom_script" ]; then
|
||||
+ python3 "$custom_script" "$embedded_agent"
|
||||
+ fi
|
||||
embedded_assets+=("$embedded_agent")
|
||||
}
|
||||
|
||||
@@ -81,6 +85,10 @@ case $host_os in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
+ if [ -f "$custom_script" ]; then
|
||||
+ python3 "$custom_script" "$embedded_agent"
|
||||
+ fi
|
||||
+
|
||||
exec "$resource_compiler" --toolchain=gnu -c "$resource_config" -o "$output_dir/frida-data-agent" "$embedded_agent"
|
||||
;;
|
||||
*)
|
||||
diff --git a/src/freebsd/freebsd-host-session.vala b/src/freebsd/freebsd-host-session.vala
|
||||
index a2204a4e..eac16116 100644
|
||||
--- a/src/freebsd/freebsd-host-session.vala
|
||||
@@ -119,7 +85,7 @@ index a2204a4e..eac16116 100644
|
||||
var stream_request = Pipe.open (t.local_address, cancellable);
|
||||
|
||||
- var id = yield binjector.inject_library_resource (pid, agent_desc, "frida_agent_main",
|
||||
+ var id = yield binjector.inject_library_resource (pid, agent_desc, "main",
|
||||
+ var id = yield binjector.inject_library_resource (pid, agent_desc, "frida_agent_main",
|
||||
make_agent_parameters (pid, t.remote_address, options), cancellable);
|
||||
injectee_by_pid[pid] = id;
|
||||
|
||||
@@ -132,7 +98,7 @@ index 64245792..086d0b96 100644
|
||||
Cancellable? cancellable, out Object? transport) throws Error, IOError {
|
||||
uint id;
|
||||
- string entrypoint = "frida_agent_main";
|
||||
+ string entrypoint = "main";
|
||||
+ string entrypoint = "frida_agent_main";
|
||||
string parameters = make_agent_parameters (pid, "", options);
|
||||
AgentFeatures features = CONTROL_CHANNEL;
|
||||
var linjector = (Linjector) injector;
|
||||
@@ -145,7 +111,7 @@ index 69f2995f..a4e59ab2 100644
|
||||
var stream_request = Pipe.open (t.local_address, cancellable);
|
||||
|
||||
- var id = yield qinjector.inject_library_resource (pid, agent_desc, "frida_agent_main",
|
||||
+ var id = yield qinjector.inject_library_resource (pid, agent_desc, "main",
|
||||
+ var id = yield qinjector.inject_library_resource (pid, agent_desc, "frida_agent_main",
|
||||
make_agent_parameters (pid, t.remote_address, options), cancellable);
|
||||
injectee_by_pid[pid] = id;
|
||||
|
||||
@@ -158,25 +124,25 @@ index 67f1f3ef..518cd256 100644
|
||||
|
||||
var winjector = injector as Winjector;
|
||||
- var id = yield winjector.inject_library_resource (pid, agent, "frida_agent_main",
|
||||
+ var id = yield winjector.inject_library_resource (pid, agent, "main",
|
||||
+ var id = yield winjector.inject_library_resource (pid, agent, "frida_agent_main",
|
||||
make_agent_parameters (pid, t.remote_address, options), cancellable);
|
||||
injectee_by_pid[pid] = id;
|
||||
|
||||
diff --git a/tests/test-agent.vala b/tests/test-agent.vala
|
||||
index 62fb8260..6e5eba51 100644
|
||||
index d28e67fd..bbdc29b3 100644
|
||||
--- a/tests/test-agent.vala
|
||||
+++ b/tests/test-agent.vala
|
||||
@@ -449,7 +449,7 @@ Interceptor.attach(Module.getExportByName('libsystem_kernel.dylib', 'open'), ()
|
||||
assert_nonnull (module);
|
||||
@@ -452,7 +452,7 @@ Interceptor.attach(Module.getExportByName('libsystem_kernel.dylib', 'open'), ()
|
||||
}
|
||||
|
||||
void * main_func_symbol;
|
||||
- var main_func_found = module.symbol ("frida_agent_main", out main_func_symbol);
|
||||
+ var main_func_found = module.symbol ("main", out main_func_symbol);
|
||||
+ var main_func_found = module.symbol ("frida_agent_main", out main_func_symbol);
|
||||
assert_true (main_func_found);
|
||||
main_impl = (AgentMainFunc) main_func_symbol;
|
||||
|
||||
diff --git a/tests/test-injector.vala b/tests/test-injector.vala
|
||||
index f4a321c4..448bddf3 100644
|
||||
index 03c219e6..a7720c3d 100644
|
||||
--- a/tests/test-injector.vala
|
||||
+++ b/tests/test-injector.vala
|
||||
@@ -258,7 +258,7 @@ namespace Frida.InjectorTest {
|
||||
@@ -184,10 +150,10 @@ index f4a321c4..448bddf3 100644
|
||||
assert_true (FileUtils.test (path, FileTest.EXISTS));
|
||||
|
||||
- yield injector.inject_library_file (process.id, path, "frida_agent_main", data);
|
||||
+ yield injector.inject_library_file (process.id, path, "main", data);
|
||||
+ yield injector.inject_library_file (process.id, path, "frida_agent_main", data);
|
||||
} catch (GLib.Error e) {
|
||||
printerr ("\nFAIL: %s\n\n", e.message);
|
||||
assert_not_reached ();
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a3a873849788a117c799d7901b907b458a4ff44f Mon Sep 17 00:00:00 2001
|
||||
From 951000ce3fddb965ffdf6e3d5e765e7f457683da Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 16:03:47 +0800
|
||||
Subject: [PATCH 05/10] Florida: thread_gum_js_loop
|
||||
Subject: [PATCH 4/9] Florida: thread_gum_js_loop
|
||||
|
||||
---
|
||||
src/anti-anti-frida.py | 7 ++++++-
|
||||
@@ -25,5 +25,5 @@ index a203189f..7a3f6474 100644
|
||||
+ os.system(f"sed -b -i s/gum-js-loop/{random_name}/g {input_file}")
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 2ab3dafa1d0fc152757427b6f4e923daf0bd169b Mon Sep 17 00:00:00 2001
|
||||
From 3505dbe62e65bdcbd28058d28390da1ac7c87e86 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 16:04:15 +0800
|
||||
Subject: [PATCH 06/10] Florida: thread_gmain
|
||||
Subject: [PATCH 5/9] Florida: thread_gmain
|
||||
|
||||
---
|
||||
src/anti-anti-frida.py | 7 ++++++-
|
||||
@@ -25,5 +25,5 @@ index 7a3f6474..b4b8dca6 100644
|
||||
+ os.system(f"sed -b -i s/gmain/{random_name}/g {input_file}")
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 0561228bc0dde4dd62af2feceff1a09e9d38f9cd Mon Sep 17 00:00:00 2001
|
||||
From e8d464a18de6e97d3e84c4c3cb5c73b807586798 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 16:04:55 +0800
|
||||
Subject: [PATCH 07/10] Florida: protocol_unexpected_command
|
||||
Subject: [PATCH 6/9] Florida: protocol_unexpected_command
|
||||
|
||||
---
|
||||
src/droidy/droidy-client.vala | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/droidy/droidy-client.vala b/src/droidy/droidy-client.vala
|
||||
index 0ed2edeb..9de04b54 100644
|
||||
index ddc56ccc..c3464e77 100644
|
||||
--- a/src/droidy/droidy-client.vala
|
||||
+++ b/src/droidy/droidy-client.vala
|
||||
@@ -1013,7 +1013,7 @@ namespace Frida.Droidy {
|
||||
@@ -1015,7 +1015,7 @@ namespace Frida.Droidy {
|
||||
case "OPEN":
|
||||
case "CLSE":
|
||||
case "WRTE":
|
||||
@@ -21,5 +21,5 @@ index 0ed2edeb..9de04b54 100644
|
||||
default:
|
||||
var length = parse_length (command_or_length);
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f0cea5f7ffac814fc1aed478247c1f8b8190c180 Mon Sep 17 00:00:00 2001
|
||||
From 19026255ad926b166e7ffb8759e896fd6b5bff94 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 19:55:59 +0800
|
||||
Subject: [PATCH 08/10] Florida: update python script
|
||||
Subject: [PATCH 7/9] Florida: update python script
|
||||
|
||||
---
|
||||
src/anti-anti-frida.py | 59 +++++++++++++++++++++++++++++-------------
|
||||
@@ -92,5 +92,5 @@ index b4b8dca6..d1ce5f62 100644
|
||||
+ log_color(f"[*] Patch Finish")
|
||||
\ No newline at end of file
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
25
patches/frida-core/0008-Florida-pool-frida.patch
Normal file
25
patches/frida-core/0008-Florida-pool-frida.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 0f3391327c044f6c2ab0ee3322185904b0afa2c5 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Thu, 20 Jul 2023 10:01:20 +0800
|
||||
Subject: [PATCH 8/9] Florida: pool-frida
|
||||
|
||||
---
|
||||
src/frida-glue.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/frida-glue.c b/src/frida-glue.c
|
||||
index ee8f0737..43cc8167 100644
|
||||
--- a/src/frida-glue.c
|
||||
+++ b/src/frida-glue.c
|
||||
@@ -40,6 +40,8 @@ frida_init_with_runtime (FridaRuntime rt)
|
||||
g_io_module_openssl_register ();
|
||||
#endif
|
||||
|
||||
+ g_set_prgname ("ggbond");
|
||||
+
|
||||
if (runtime == FRIDA_RUNTIME_OTHER)
|
||||
{
|
||||
main_context = g_main_context_ref (g_main_context_default ());
|
||||
--
|
||||
2.42.0
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
From 7758c68170a1294d8af09de6d50184195ffa0035 Mon Sep 17 00:00:00 2001
|
||||
From 5b1279a54e7fc5b9867332d16d5b30ea16bf6b7a Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Fri, 1 Sep 2023 12:51:06 +0800
|
||||
Subject: [PATCH 10/10] Florida: memfd-name-jit-cache
|
||||
Subject: [PATCH 9/9] Florida: memfd-name-jit-cache
|
||||
|
||||
---
|
||||
src/linux/frida-helper-backend.vala | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/linux/frida-helper-backend.vala b/src/linux/frida-helper-backend.vala
|
||||
index 61f8307b..0121b1b4 100644
|
||||
index 9da2152c..b133bd37 100644
|
||||
--- a/src/linux/frida-helper-backend.vala
|
||||
+++ b/src/linux/frida-helper-backend.vala
|
||||
@@ -3184,7 +3184,7 @@ namespace Frida {
|
||||
@@ -3233,7 +3233,7 @@ namespace Frida {
|
||||
}
|
||||
|
||||
private int memfd_create (string name, uint flags) {
|
||||
@@ -21,5 +21,5 @@ index 61f8307b..0121b1b4 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
From 4b88bae0ba2d67a8ac2b1ffbd2d2216e879c3813 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Thu, 20 Jul 2023 10:01:20 +0800
|
||||
Subject: [PATCH 09/10] Florida: pool-frida
|
||||
|
||||
---
|
||||
src/frida-glue.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/frida-glue.c b/src/frida-glue.c
|
||||
index 13429703..43cc8167 100644
|
||||
--- a/src/frida-glue.c
|
||||
+++ b/src/frida-glue.c
|
||||
@@ -40,7 +40,7 @@ frida_init_with_runtime (FridaRuntime rt)
|
||||
g_io_module_openssl_register ();
|
||||
#endif
|
||||
|
||||
- g_set_prgname ("frida");
|
||||
+ g_set_prgname ("ggbond");
|
||||
|
||||
if (runtime == FRIDA_RUNTIME_OTHER)
|
||||
{
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
|
||||
Reference in New Issue
Block a user