fkie-cad / friTap

The goal of this project is to help researchers to analyze traffic encapsulated in SSL or TLS.
GNU General Public License v3.0
253 stars 26 forks source link

Failed to install provider as highest priority provider #1

Closed daMatz closed 1 year ago

daMatz commented 2 years ago

Apps crash with error Failed to install provider as highest priority provider. Provider was installed at position 8.

Tested under Linux and Windows, with different python versions with: python friTap.py -m -s com.package. Output:

Start logging
spawning com.package
Press Ctrl+C to stop logging.
[*] Running Script
[*] libssl.so found & will be hooked on Linux!
Loader error:  Linux Dynamic loader not found!
[*] No dynamic loader present for hooking.

Thx for using friTap
Have a nice day

Mobile test setup:

Tested with different apps, same behavior for all. Logcat:

03-01 13:46:55.758 16788 16788 D AndroidRuntime: Shutting down VM
03-01 13:46:55.759 16788 16788 E AndroidRuntime: FATAL EXCEPTION: main
03-01 13:46:55.759 16788 16788 E AndroidRuntime: Process: com.package, PID: 16788
03-01 13:46:55.759 16788 16788 E AndroidRuntime: java.lang.RuntimeException: Failed to install provider as highest priority provider. Provider was installed at position 8
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at android.security.net.config.NetworkSecurityConfigProvider.install(NetworkSecurityConfigProvider.java:40)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5798)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(Native Method)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at android.app.ActivityThread.-wrap3(ActivityThread.java)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:154)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6682)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
03-01 13:46:55.759 16788 16788 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
monkeywave commented 2 years ago

Hi daMatz,

thx for reporting this issue - we will have a look into it. Did you encounter the same issue when working with a newer Android version?

daMatz commented 2 years ago

Thanks for the great tool :)

Just prepared an Android 10 emulator, no issues there 👍

python friTap.py -m --pcap package.pcap -k sslkeys.txt -s com.package
Start logging
spawning com.package
Press Ctrl+C to stop logging.
[*] Running Script
[*] libssl.so found & will be hooked on Linux!
[*] Android dynamic loader hooked.
[*] Logging pcap to package.pcap
[*] Logging keylog file to sslkeys.txt

Thx for using friTap
Have a nice day

So the issue is not that important, as it seems to be working with newer versions, still wanted to report it :) If I can assist with implementation or testing, let me know.

ChrisMcMStone commented 1 year ago

I am also experiencing exactly the same problem with Android 11 on OnePlus8T. Have struggled to make progress debugging the issue. Any tips? Thanks!

monkeywave commented 1 year ago

I am also experiencing exactly the same problem with Android 11 on OnePlus8T. Have struggled to make progress debugging the issue. Any tips? Thanks!

Hi Chris,

thx for reporting this issue, we didn't investigate this issue any further in the past because it work at least for us on newer versions.

Are you able to provide us with some further information?

monkeywave commented 1 year ago

Finally we were able reproduce the bug and could fixed in the latest version (1.0.7.3).
Feel free to reopen if the bug still remains.