Reputation: 793
I'm trying to bypass Frida (Android) local port scanning detection, so I followed this guide. The sequence of commands I used are : (magic_man is alias for frida_server)
adb root
adb push magic_man /data/local/tmp/
adb shell "chmod 755 /data/local/tmp/magic_man"
adb shell "/data/local/tmp/magic_man --listen=unix:/data/local/tmp/magic_socket &"
adb forward tcp:27042 localabstract:/data/local/tmp/magic_socket
Now I'm using a Custom ROM (close to AOSP), it isn't rooted but I can enable root access for ADB only.
So, what I noticed after running these commands the checking ls -l
inside /data/local/tmp
that magic_socket
is not created. and if I run simple trace commands like frida-trace -U -i open YouTube
, it shows me :
Failed to attach: unable to connect to remote frida-server: closed
If I just use the below command, frida-trace
is working correctly. But then the app is able to detect frida.
adb shell "/data/local/tmp/magic_man &"
What am I doing wrong here? Or is there any other way to do the same? the docs of frida look incomplete and outdated.
Update :
I installed another ROM (A13 - FireDroid) with KernelSU
enabled, this time unix port was created and I was able to connect to it, but the problem appeared was that it was launching apps when using -f
command, unlike before but I was getting error that spawn is failed while the app was being launched.
Is there any way to debug/figure out what exactly is going on?
Upvotes: 0
Views: 871