Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServerCertificateValidationCallback hook not working #6

Open
achmstein opened this issue Sep 13, 2020 · 3 comments
Open

ServerCertificateValidationCallback hook not working #6

achmstein opened this issue Sep 13, 2020 · 3 comments

Comments

@achmstein
Copy link

achmstein commented Sep 13, 2020

Hello,
I tried to test ServicePointManager hooking but it never worked.

I'm trying to set ServerCertificateValidationCallback to NULL but I cannot do that. How can I achieve that?

    _fridaMonoApi.MonoApiHelper.RuntimeInvoke(setter,
    /*instance=*/
    NULL,
    /*pArgs=*/
    _fridaMonoApi.MonoApiHelper.ObjectNew(kCb)); // TODO: pArgs?

always fail

@alxbl
Copy link
Contributor

alxbl commented Sep 14, 2020

Do you have a mono app that uses ServicePoint.ServerCerttificateValidationCallback? AFAIK this class is no longer exposed or used in more recent Mono versions (since the switch to .NET Core)

I also had trouble finding a working APK to debug/test this use case, so it's likely that the code has some bugs. If you have an APK that you know uses ServicePoint and are willing to share, I might be able to troubleshoot this once I have access to my lab again.

@achmstein
Copy link
Author

Hi,
Thank you for your response. Please download the apk from the following link:

Download APK

Here is a screenshot of the class responsible for certificate pinning. It uses ServicePoint.ServerCerttificateValidationCallback
Screenshot 2020-09-15 014855

Here is a screenshot of the CertificatePinner's Pin invocation
Screenshot 2020-09-15 015415

@achmstein
Copy link
Author

any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants