talsec / Free-RASP-Flutter

Flutter library for improving app security and threat monitoring on Android and iOS mobile devices.
https://github.com/talsec/Free-RASP-Community
MIT License
194 stars 22 forks source link

FreeRASP not working in iOS in Debug/Release mode #19

Closed rakesh0689 closed 2 years ago

rakesh0689 commented 2 years ago

I am using M1 based MAC having Xcode version 13.4.1. FreeRASP version is 2.0.0 as well. In android Freerasp is detecting root/emulator etc. but in iOS the package is not detecting anything. If I remember correctly when I began developing the app, I installed free rasp first and checked whether its detecting emulator/jailbroken etc. that was on Intel based MAC. After that I continued with development on M1 based MAC and after the app is almost completed I once again checked whether FREERASP is working. But as I mentioned its not detecting anything in iOS. There is no error as well. I am occasionally getting an error while doing Hot restart like mentioned below:-

The following MissingPluginException was thrown while activating platform stream on channel plugins.aheaditec.com/events: MissingPluginException(No implementation found for method listen on channel plugins.aheaditec.com/events)

When the exception was thrown, this was the stack

0 MethodChannel._invokeMethod

package:flutter/…/services/platform_channel.dart:165

#1 EventChannel.receiveBroadcastStream. package:flutter/…/services/platform_channel.dart:506 I searched for the above mentioned error as did as mentioned in #6 and got information that it was solved in latest versions. But I am still getting this error. Is this connected to FreeRasp not detecting emulator/jailbroken/ any detection for that matter. I am currently on flutter version 3.0.5. Please help me solve this issue.
talsec-app commented 2 years ago

Hello @rakesh0689 , we will look at the issue promptly.

Kind regards, Talsec team

talsec-app commented 2 years ago

Hello @rakesh0689

We haven't noticed any issue regarding M1 processors on Mac. We use M1 Macs on daily basis - developing and testing.

Are you running debug version? If so, be aware that dev version of SDK (used in debug mode of app) doesn't detect simulator, debugger and signature threats - no matter if you run your app in simulator or real device.

After taking a closer look, we can confirm the issue with hot restart. Flutter has limitation when it comes to plugins and hot restart (see StackOverflow issue).

Currently, our recommendation is to always use flutter run command (i.e. always run app from scratch).

Readme will be updated accordingly to this recommendation.

We can take a deeper look - just mail us your app's bundleID to info@talsec.app.

Kind regards, Talsec Team

rakesh0689 commented 2 years ago

Yes if i run from scratch the error is not coming but was still not able to detect the emulator. May be some issue with my code. Will confirm once I get to the root of the problem. Thanks for your help team Talsec.

rakesh0689 commented 2 years ago

Now its working without any issues after doing flutter run every time. Thank you