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

Free-RASP-Flutter Security Delay Issue #90

Closed
jostney opened this issue Oct 5, 2023 · 8 comments
Closed

Free-RASP-Flutter Security Delay Issue #90

jostney opened this issue Oct 5, 2023 · 8 comments
Assignees
Labels
android This issue is related to Android only bug Something isn't working to be fixed This issue will be fixed in the future

Comments

@jostney
Copy link

jostney commented Oct 5, 2023

We have successfully set up the Free-RASP-Flutter library. In our testing, we observed that the onDebug callback is being triggered, which is expected behavior. However, we are facing an issue where this callback is not triggered immediately after the execution of await Talsec.instance.start(talsecConfig);. Instead, it takes almost 1 minute for this callback to be triggered. This 1-minute delay is concerning because it means that malicious users could potentially exploit this window of time to engage in unauthorized activities.

void main() async {
  WidgetsBinding widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
  FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
  SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);

  Talsec.instance.attachListener(talsecCallback);
  await Talsec.instance.start(talsecConfig);
  
  ...
  Other things
  ...
  runApp(OurApp());
}

And configurations

var talseciOS = IOSConfig(bundleIds: ["..."], teamId: '...');
var talsecAndroid = AndroidConfig(packageName: '...', signingCertHashes: ['...']);
var talsecConfig = TalsecConfig(watcherMail: '...', androidConfig: talsecAndroid, iosConfig: talseciOS, isProd: true);
final talsecCallback = ThreatCallback(
  onAppIntegrity: () => router.push(RoutePaths.securityThreat, extra: 'onAppIntegrity'),
  onDebug: () => router.push(RoutePaths.securityThreat, extra: 'onDebug'),
  onSimulator: () => router.push(RoutePaths.securityThreat, extra: 'onSimulator'),
  onUnofficialStore: () => router.push(RoutePaths.securityThreat, extra: 'onUnofficialStore'),
  onPrivilegedAccess: () => router.push(RoutePaths.securityThreat, extra: 'onPrivilegedAccess'),
  onHooks: () => router.push(RoutePaths.securityThreat, extra: 'onHooks'),
  onObfuscationIssues: () => {},
  onDeviceBinding: () {},
  onDeviceID: () => {},
  onPasscode: () => {},
  onSecureHardwareNotAvailable: () => {},
);
@jostney jostney added the bug Something isn't working label Oct 5, 2023
@xprikryl2
Copy link
Member

Hi @jostney,

This behavior is caused by the priorities of check groups in the freeRASP. The checks are being executed one by one in the background threat, so the debug check group waits for the check groups with higher priority to finish. We'll look at this issue and try to optimize the priorities of critical check groups (like debug) by the next release.

Best regards,
Talsec team

@yustanj
Copy link

yustanj commented Oct 18, 2023

Hi is there any updates on this, I think it can be critical when attacker have about 5 seconds to hooks. In my case the attacker hook the cipher class so all the credential that has been encrypted can be showed if I access it before runApp.

@SirionRazzer
Copy link
Member

Hi @yustanj,

We have prepared a fix that significantly speeds up the execution of checks. It should be included in the next freeRASP release.

Also, I would like to learn more about the attack you experienced. If you would like to share more information privately, please feel free to PM me at tsoukal@talsec.app.

Best Regards,
Tomas

@yardexx yardexx added to be fixed This issue will be fixed in the future android This issue is related to Android only labels Oct 31, 2023
@ribuemsyne
Copy link

@SirionRazzer can you confirm the version number for this fix?

@msikyna
Copy link
Member

msikyna commented Nov 23, 2023

Hello @ribuemsyne ,
it will be included in the next published freeRASP version.

Kind regards,
Talsec team

@ribuemsyne
Copy link

ribuemsyne commented Jan 17, 2024 via email

@SirionRazzer
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android This issue is related to Android only bug Something isn't working to be fixed This issue will be fixed in the future
Projects
None yet
Development

No branches or pull requests

8 participants