Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7c2dc6e25 | ||
|
|
153bbb75b6 | ||
|
|
fbfa3e3781 | ||
|
|
9172e84ad3 | ||
|
|
fd82ee2abb | ||
|
|
5d28ba0a25 | ||
|
|
54e22b6163 | ||
|
|
4803ab5231 | ||
|
|
7829b5ef40 | ||
|
|
dd77d7f6c2 | ||
|
|
06c9764ec5 | ||
|
|
f8fc2b2b3d | ||
|
|
c6f745cb65 | ||
|
|
39b73f40b4 | ||
|
|
fcc6e1546e | ||
|
|
283d4c2952 |
138
.github/workflows/build.yml
vendored
138
.github/workflows/build.yml
vendored
@@ -90,14 +90,14 @@ jobs:
|
||||
if: needs.check_version.outputs.ALREADY_RELEASE != '1'
|
||||
|
||||
steps:
|
||||
- uses: actions/create-release@master
|
||||
- uses: softprops/action-gh-release@v2.1.0
|
||||
id: createRelease
|
||||
name: Create Runner Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: "${{ needs.check_version.outputs.FRIDA_VERSION }}"
|
||||
release_name: "${{ needs.check_version.outputs.FRIDA_VERSION }}"
|
||||
name: "${{ needs.check_version.outputs.FRIDA_VERSION }}"
|
||||
prerelease: false
|
||||
|
||||
android_build:
|
||||
@@ -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
|
||||
@@ -122,41 +122,52 @@ jobs:
|
||||
uses: nttld/setup-ndk@v1
|
||||
with:
|
||||
ndk-version: r25c
|
||||
local-cache: true
|
||||
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 }}
|
||||
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
|
||||
@@ -193,27 +204,27 @@ 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-android-arm/subprojects/frida-gum/bindings/gumjs/libfrida-gumjs-1.0.a
|
||||
gzip build-android-arm64/subprojects/frida-gum/bindings/gumjs/libfrida-gumjs-1.0.a
|
||||
gzip build-android-x86/subprojects/frida-gum/bindings/gumjs/libfrida-gumjs-1.0.a
|
||||
gzip build-android-x86_64/subprojects/frida-gum/bindings/gumjs/libfrida-gumjs-1.0.a
|
||||
|
||||
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
|
||||
@@ -221,7 +232,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
|
||||
|
||||
@@ -231,7 +242,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
|
||||
|
||||
@@ -241,7 +252,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
|
||||
|
||||
@@ -251,7 +262,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
|
||||
|
||||
@@ -261,7 +272,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
|
||||
|
||||
@@ -271,7 +282,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
|
||||
|
||||
@@ -281,7 +292,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
|
||||
|
||||
@@ -291,7 +302,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
|
||||
|
||||
@@ -301,7 +312,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
|
||||
|
||||
@@ -311,7 +322,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
|
||||
|
||||
@@ -321,7 +332,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
|
||||
|
||||
@@ -331,7 +342,46 @@ 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
|
||||
|
||||
- name: Upload android arm frida-gumjs for Florida
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/build-android-arm/subprojects/frida-gum/bindings/gumjs/libfrida-gumjs-1.0.a.gz'
|
||||
asset_name: 'florida-gumjs-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm.a.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload android arm64 frida-gumjs for Florida
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/build-android-arm64/subprojects/frida-gum/bindings/gumjs/libfrida-gumjs-1.0.a.gz'
|
||||
asset_name: 'florida-gumjs-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-arm64.a.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload android x86 frida-gumjs for Florida
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/build-android-x86/subprojects/frida-gum/bindings/gumjs/libfrida-gumjs-1.0.a.gz'
|
||||
asset_name: 'florida-gumjs-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86.a.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- name: Upload android x86_64 frida-gumjs for Florida
|
||||
uses: actions/upload-release-asset@v1.0.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: '${{ steps.checkReleaseVersion.outputs.upload_url }}'
|
||||
asset_path: '${{ github.workspace }}/build-android-x86_64/subprojects/frida-gum/bindings/gumjs/libfrida-gumjs-1.0.a.gz'
|
||||
asset_name: 'florida-gumjs-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86_64.a.gz'
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From db22f5d7065cef473fe4fd7771583ddf9d2771dd Mon Sep 17 00:00:00 2001
|
||||
From 9ff24d5b1b81bf5a2fc8ff517bc0caba0e3288e9 Mon Sep 17 00:00:00 2001
|
||||
From: Ylarod <me@ylarod.cn>
|
||||
Date: Tue, 18 Jul 2023 15:51:29 +0800
|
||||
Subject: [PATCH 1/9] Florida: string_frida_rpc
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH 1/9] Florida: string_frida_rpc
|
||||
1 file changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lib/base/rpc.vala b/lib/base/rpc.vala
|
||||
index 3695ba8c..664bd19c 100644
|
||||
index 8990b70e..d5acfebd 100644
|
||||
--- a/lib/base/rpc.vala
|
||||
+++ b/lib/base/rpc.vala
|
||||
@@ -11,13 +11,22 @@ namespace Frida {
|
||||
@@ -24,7 +24,7 @@ index 3695ba8c..664bd19c 100644
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
public async Json.Node call (string method, Json.Node[] args, Cancellable? cancellable) throws Error, IOError {
|
||||
public async Json.Node call (string method, Json.Node[] args, Bytes? data, Cancellable? cancellable) throws Error, IOError {
|
||||
string request_id = Uuid.string_random ();
|
||||
|
||||
var request = new Json.Builder ();
|
||||
@@ -54,5 +54,5 @@ index 3695ba8c..664bd19c 100644
|
||||
|
||||
var request_id_value = rpc_message.get_element (1);
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.47.1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 87052a5bb1abe2788ac1775d20154187081da390 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 2/9] Florida: frida_agent_so
|
||||
@@ -29,5 +29,5 @@ index 50470ac8..64245792 100644
|
||||
AgentMode.INSTANCED,
|
||||
tempdir);
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 32ec17a186c957fb4c5a3198655767a2bd442fc4 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 3/9] Florida: symbol_frida_agent_main
|
||||
@@ -7,22 +7,21 @@ 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);
|
||||
@@ -77,39 +76,6 @@ index ab9b2900..4369922d 100644
|
||||
#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
|
||||
@@ -163,11 +129,11 @@ index 67f1f3ef..518cd256 100644
|
||||
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);
|
||||
@@ -176,7 +142,7 @@ index 62fb8260..6e5eba51 100644
|
||||
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 {
|
||||
@@ -189,5 +155,5 @@ index f4a321c4..448bddf3 100644
|
||||
printerr ("\nFAIL: %s\n\n", e.message);
|
||||
assert_not_reached ();
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 240274823e8b56765b4fb29928e11e19a6807c26 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 4/9] Florida: thread_gum_js_loop
|
||||
@@ -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,4 +1,4 @@
|
||||
From eac56e85a60b250805d83c47acb2d7eff1d46802 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 5/9] Florida: thread_gmain
|
||||
@@ -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,4 +1,4 @@
|
||||
From 6d24d91ee0bbba3cbd288e1c37c1c6b5f87f1af8 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 6/9] Florida: protocol_unexpected_command
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH 6/9] Florida: protocol_unexpected_command
|
||||
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,4 +1,4 @@
|
||||
From cface25f4bfff96704bd35678593286536b0ffff 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 7/9] Florida: update python script
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From c209740d0a3afb95444f49dc542088a81b55d042 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
@@ -21,5 +21,5 @@ index ee8f0737..43cc8167 100644
|
||||
{
|
||||
main_context = g_main_context_ref (g_main_context_default ());
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From d5417438834ed1c2c7a7992d6bbfd38b8ce6b7fc 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 9/9] Florida: memfd-name-jit-cache
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH 9/9] Florida: memfd-name-jit-cache
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/linux/frida-helper-backend.vala b/src/linux/frida-helper-backend.vala
|
||||
index 9e6308b6..b6934e70 100644
|
||||
index 9da2152c..b133bd37 100644
|
||||
--- a/src/linux/frida-helper-backend.vala
|
||||
+++ b/src/linux/frida-helper-backend.vala
|
||||
@@ -3202,7 +3202,7 @@ namespace Frida {
|
||||
@@ -3233,7 +3233,7 @@ namespace Frida {
|
||||
}
|
||||
|
||||
private int memfd_create (string name, uint flags) {
|
||||
@@ -21,5 +21,5 @@ index 9e6308b6..b6934e70 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.3 (Apple Git-145)
|
||||
2.42.0
|
||||
|
||||
|
||||
31
patches/frida-core/0010-exec-anti-anti-frida.py.patch
Normal file
31
patches/frida-core/0010-exec-anti-anti-frida.py.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
From 09c74884dda5e9a5d452a7d5b78eb1c3e8a717c9 Mon Sep 17 00:00:00 2001
|
||||
From: Thiasap <you@example.com>
|
||||
Date: Mon, 9 Dec 2024 16:28:59 +0800
|
||||
Subject: [PATCH] exec anti-anti-frida.py
|
||||
|
||||
---
|
||||
src/embed-agent.py | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/embed-agent.py b/src/embed-agent.py
|
||||
index 1cdd46da..4459b9c1 100644
|
||||
--- a/src/embed-agent.py
|
||||
+++ b/src/embed-agent.py
|
||||
@@ -78,6 +78,14 @@ def main(argv):
|
||||
shutil.copy(agent, embedded_agent)
|
||||
else:
|
||||
embedded_agent.write_bytes(b"")
|
||||
+ import os
|
||||
+ custom_script=str(output_dir)+"/../../../../frida/subprojects/frida-core/src/anti-anti-frida.py"
|
||||
+ return_code = os.system("python3 "+custom_script+" "+str(priv_dir / f"frida-agent-{flavor}.so"))
|
||||
+ if return_code == 0:
|
||||
+ print("anti-anti-frida finished")
|
||||
+ else:
|
||||
+ print("anti-anti-frida error. Code:", return_code)
|
||||
+
|
||||
embedded_assets += [embedded_agent]
|
||||
elif host_os in {"freebsd", "qnx"}:
|
||||
embedded_agent = priv_dir / "frida-agent.so"
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user