Compare commits

..

5 Commits

Author SHA1 Message Date
Ylarod
aab2817ca2 Update build.yml 2023-12-25 10:02:27 +08:00
Ylarod
dae5b01520 update patches for 16.1.10 2023-12-25 09:53:53 +08:00
Ylarod
c1ea5de9bf Update build.yml 2023-11-20 19:45:05 +08:00
Ylarod
0cbd6a9d92 Update build.yml 2023-11-20 19:38:30 +08:00
Ylarod
1a61c79dbb update patches for 16.1.7 2023-11-20 18:47:19 +08:00
12 changed files with 63 additions and 98 deletions

View File

@@ -334,4 +334,4 @@ jobs:
asset_path: '${{ github.workspace }}/frida/build/frida-android-x86_64/lib/frida/64/frida-gadget.so.gz' asset_path: '${{ github.workspace }}/frida/build/frida-android-x86_64/lib/frida/64/frida-gadget.so.gz'
asset_name: 'florida-gadget-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86_64.so.gz' asset_name: 'florida-gadget-${{ needs.check_version.outputs.FRIDA_VERSION }}-android-x86_64.so.gz'
asset_content_type: application/octet-stream asset_content_type: application/octet-stream

View File

@@ -1,7 +1,7 @@
From 2ee45f8d8bd12ae7bb58bc9d792241dd10e52c9d Mon Sep 17 00:00:00 2001 From db22f5d7065cef473fe4fd7771583ddf9d2771dd Mon Sep 17 00:00:00 2001
From: Ylarod <me@ylarod.cn> From: Ylarod <me@ylarod.cn>
Date: Tue, 18 Jul 2023 15:51:29 +0800 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 ++++++++++++--- lib/base/rpc.vala | 15 ++++++++++++---
@@ -54,5 +54,5 @@ index 3695ba8c..664bd19c 100644
var request_id_value = rpc_message.get_element (1); var request_id_value = rpc_message.get_element (1);
-- --
2.34.1 2.39.3 (Apple Git-145)

View File

@@ -1,7 +1,7 @@
From c809d93142d30299ab33aa3b125fc8096e280d6c Mon Sep 17 00:00:00 2001 From 87052a5bb1abe2788ac1775d20154187081da390 Mon Sep 17 00:00:00 2001
From: Ylarod <me@ylarod.cn> From: Ylarod <me@ylarod.cn>
Date: Tue, 18 Jul 2023 15:57:19 +0800 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 ++++--- src/linux/linux-host-session.vala | 7 ++++---
@@ -29,5 +29,5 @@ index 50470ac8..64245792 100644
AgentMode.INSTANCED, AgentMode.INSTANCED,
tempdir); tempdir);
-- --
2.34.1 2.39.3 (Apple Git-145)

View File

@@ -1,33 +0,0 @@
From 9c54a36d6cf608cbe24c9771b4a4f2b3774bebd0 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 f96c7ca5..dc6ff452 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.34.1

View File

@@ -1,20 +1,20 @@
From 1099700c48f5cf48f76792b929d5916be4a98e04 Mon Sep 17 00:00:00 2001 From 32ec17a186c957fb4c5a3198655767a2bd442fc4 Mon Sep 17 00:00:00 2001
From: Ylarod <me@ylarod.cn> From: Ylarod <me@ylarod.cn>
Date: Tue, 18 Jul 2023 16:02:50 +0800 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/agent-container.vala | 2 +-
src/anti-anti-frida.py | 27 +++++++++++++++++++++++++++ src/anti-anti-frida.py | 27 +++++++++++++++++++++++++++
src/darwin/darwin-host-session.vala | 2 +- src/darwin/darwin-host-session.vala | 2 +-
src/embed-agent.sh | 10 ++++++++++ src/embed-agent.sh | 8 ++++++++
src/freebsd/freebsd-host-session.vala | 2 +- src/freebsd/freebsd-host-session.vala | 2 +-
src/linux/linux-host-session.vala | 2 +- src/linux/linux-host-session.vala | 2 +-
src/qnx/qnx-host-session.vala | 2 +- src/qnx/qnx-host-session.vala | 2 +-
src/windows/windows-host-session.vala | 2 +- src/windows/windows-host-session.vala | 2 +-
tests/test-agent.vala | 2 +- tests/test-agent.vala | 2 +-
tests/test-injector.vala | 2 +- tests/test-injector.vala | 2 +-
10 files changed, 45 insertions(+), 8 deletions(-) 10 files changed, 43 insertions(+), 8 deletions(-)
create mode 100644 src/anti-anti-frida.py create mode 100644 src/anti-anti-frida.py
diff --git a/src/agent-container.vala b/src/agent-container.vala diff --git a/src/agent-container.vala b/src/agent-container.vala
@@ -65,10 +65,10 @@ index 00000000..a203189f
+ binary.write(input_file) + binary.write(input_file)
\ No newline at end of file \ No newline at end of file
diff --git a/src/darwin/darwin-host-session.vala b/src/darwin/darwin-host-session.vala diff --git a/src/darwin/darwin-host-session.vala b/src/darwin/darwin-host-session.vala
index 06e7065b..d215b75a 100644 index ab9b2900..4369922d 100644
--- a/src/darwin/darwin-host-session.vala --- a/src/darwin/darwin-host-session.vala
+++ b/src/darwin/darwin-host-session.vala +++ b/src/darwin/darwin-host-session.vala
@@ -354,7 +354,7 @@ namespace Frida { @@ -381,7 +381,7 @@ namespace Frida {
private async uint inject_agent (uint pid, string agent_parameters, Cancellable? cancellable) throws Error, IOError { private async uint inject_agent (uint pid, string agent_parameters, Cancellable? cancellable) throws Error, IOError {
uint id; uint id;
@@ -78,30 +78,28 @@ index 06e7065b..d215b75a 100644
id = yield fruitjector.inject_library_resource (pid, agent, entrypoint, agent_parameters, cancellable); id = yield fruitjector.inject_library_resource (pid, agent, entrypoint, agent_parameters, cancellable);
#else #else
diff --git a/src/embed-agent.sh b/src/embed-agent.sh diff --git a/src/embed-agent.sh b/src/embed-agent.sh
index 6119b5e1..7eede250 100755 index 6a3bf9ed..e6a69e41 100755
--- a/src/embed-agent.sh --- a/src/embed-agent.sh
+++ b/src/embed-agent.sh +++ b/src/embed-agent.sh
@@ -10,6 +10,7 @@ resource_compiler=$7 @@ -12,6 +12,7 @@ lipo=$9
resource_config=$8 agent_dbghelp_prefix=${10}
lipo=$9 agent_symsrv_prefix=${11}
+custom_script="$output_dir/../../../../frida-core/src/anti-anti-frida.py" +custom_script="$output_dir/../../../../frida-core/src/anti-anti-frida.py"
priv_dir="$output_dir/frida-agent@emb" priv_dir="$output_dir/frida-agent@emb"
mkdir -p "$priv_dir" mkdir -p "$priv_dir"
@@ -22,6 +23,11 @@ collect_generic_agent () @@ -41,6 +42,9 @@ collect_unix_agent ()
else else
touch "$embedded_agent" touch "$embedded_agent"
fi fi
+
+ if [ -f "$custom_script" ]; then + if [ -f "$custom_script" ]; then
+ python3 "$custom_script" "$embedded_agent" + python3 "$custom_script" "$embedded_agent"
+ fi + fi
+ embedded_assets+=("$embedded_agent")
embedded_agents+=("$embedded_agent")
} }
@@ -54,6 +60,10 @@ case $host_os in @@ -81,6 +85,10 @@ case $host_os in
exit 1 exit 1
fi fi
@@ -191,5 +189,5 @@ index f4a321c4..448bddf3 100644
printerr ("\nFAIL: %s\n\n", e.message); printerr ("\nFAIL: %s\n\n", e.message);
assert_not_reached (); assert_not_reached ();
-- --
2.34.1 2.39.3 (Apple Git-145)

View File

@@ -1,7 +1,7 @@
From 90702fd82b7adbed8f712cf7b9dcb4f7d7f89b30 Mon Sep 17 00:00:00 2001 From 240274823e8b56765b4fb29928e11e19a6807c26 Mon Sep 17 00:00:00 2001
From: Ylarod <me@ylarod.cn> From: Ylarod <me@ylarod.cn>
Date: Tue, 18 Jul 2023 16:03:47 +0800 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 ++++++- 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}") + os.system(f"sed -b -i s/gum-js-loop/{random_name}/g {input_file}")
\ No newline at end of file \ No newline at end of file
-- --
2.34.1 2.39.3 (Apple Git-145)

View File

@@ -1,7 +1,7 @@
From 93a07e8014d3c4971239ad6831aa5d526042a106 Mon Sep 17 00:00:00 2001 From eac56e85a60b250805d83c47acb2d7eff1d46802 Mon Sep 17 00:00:00 2001
From: Ylarod <me@ylarod.cn> From: Ylarod <me@ylarod.cn>
Date: Tue, 18 Jul 2023 16:04:15 +0800 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 ++++++- 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}") + os.system(f"sed -b -i s/gmain/{random_name}/g {input_file}")
\ No newline at end of file \ No newline at end of file
-- --
2.34.1 2.39.3 (Apple Git-145)

View File

@@ -1,7 +1,7 @@
From 217f97faabba058b53b6abb0827b74b0787beaa7 Mon Sep 17 00:00:00 2001 From 6d24d91ee0bbba3cbd288e1c37c1c6b5f87f1af8 Mon Sep 17 00:00:00 2001
From: Ylarod <me@ylarod.cn> From: Ylarod <me@ylarod.cn>
Date: Tue, 18 Jul 2023 16:04:55 +0800 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 +- src/droidy/droidy-client.vala | 2 +-
@@ -21,5 +21,5 @@ index 0ed2edeb..9de04b54 100644
default: default:
var length = parse_length (command_or_length); var length = parse_length (command_or_length);
-- --
2.34.1 2.39.3 (Apple Git-145)

View File

@@ -1,7 +1,7 @@
From 3f427a1ee93de50ca0dcdf825cbeeefd61f14ccc Mon Sep 17 00:00:00 2001 From cface25f4bfff96704bd35678593286536b0ffff Mon Sep 17 00:00:00 2001
From: Ylarod <me@ylarod.cn> From: Ylarod <me@ylarod.cn>
Date: Tue, 18 Jul 2023 19:55:59 +0800 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 +++++++++++++++++++++++++++++------------- src/anti-anti-frida.py | 59 +++++++++++++++++++++++++++++-------------
@@ -92,5 +92,5 @@ index b4b8dca6..d1ce5f62 100644
+ log_color(f"[*] Patch Finish") + log_color(f"[*] Patch Finish")
\ No newline at end of file \ No newline at end of file
-- --
2.34.1 2.39.3 (Apple Git-145)

View File

@@ -0,0 +1,25 @@
From c209740d0a3afb95444f49dc542088a81b55d042 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.39.3 (Apple Git-145)

View File

@@ -1,17 +1,17 @@
From 149e9c7bfde38629f43874395c21ec6dac6320fd Mon Sep 17 00:00:00 2001 From d5417438834ed1c2c7a7992d6bbfd38b8ce6b7fc Mon Sep 17 00:00:00 2001
From: Ylarod <me@ylarod.cn> From: Ylarod <me@ylarod.cn>
Date: Fri, 1 Sep 2023 12:51:06 +0800 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 +- src/linux/frida-helper-backend.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/linux/frida-helper-backend.vala b/src/linux/frida-helper-backend.vala diff --git a/src/linux/frida-helper-backend.vala b/src/linux/frida-helper-backend.vala
index 57a27dcd..5951da92 100644 index 9e6308b6..b6934e70 100644
--- a/src/linux/frida-helper-backend.vala --- a/src/linux/frida-helper-backend.vala
+++ b/src/linux/frida-helper-backend.vala +++ b/src/linux/frida-helper-backend.vala
@@ -3180,7 +3180,7 @@ namespace Frida { @@ -3202,7 +3202,7 @@ namespace Frida {
} }
private int memfd_create (string name, uint flags) { private int memfd_create (string name, uint flags) {
@@ -21,5 +21,5 @@ index 57a27dcd..5951da92 100644
} }
-- --
2.34.1 2.39.3 (Apple Git-145)

View File

@@ -1,25 +0,0 @@
From f7e11d47f9f3060733ac3dd418718366631c5bcb 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.34.1