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

Rooted device is not detecting (Android - Flutter) #151

Open
gailindia opened this issue Dec 11, 2024 · 3 comments
Open

Rooted device is not detecting (Android - Flutter) #151

gailindia opened this issue Dec 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working stale This issue has been not active for long period of time waiting for response Response from reporter is needed

Comments

@gailindia
Copy link

I am working on flutter 3.16.5 Dart 3.2.3
Pubsec.yaml > freerasp: ^6.9.0
configuration in main.dart:
for signingCertHashes :

String base64Hash = hashConverter.fromSha256toBase64(sha256HashHex);

sha256HashHex is from >> Google Play Console > View App > Setup > App Signing > App Signing Key Certificate > SHA 256.

Future<void> _initializeTalsec(String base64Hash) async {
  final config = TalsecConfig(
    androidConfig: AndroidConfig(
      packageName: 'com.****.*****',
      signingCertHashes: [base64Hash],
      supportedStores: ['com.sec.android.app.samsungapps'],
      malwareConfig: MalwareConfig(
        blacklistedPackageNames: ['com.*****.****'],
        suspiciousPermissions: [
          ['android.permission.READ_SMS', 'android.permission.READ_CONTACTS'],
        ],
      ),
    ),
    iosConfig: IOSConfig(
      bundleIds: ['com.****.****'],
      teamId: '##########',
    ),
    watcherMail: '',
    isProd: true,
  );

  await Talsec.instance.start(config);
}

/// to check if device is rooted i am using 

 threatState.detectedThreats.contains(Threat.privilegedAccess)
          ? Container(
              child: Center(
                child: Text("You cannot access this app"),
              ),
            )
          : SplashScreen(),

but somehow app is working on Rooted device also attaching image
demo

@gailindia gailindia added the bug Something isn't working label Dec 11, 2024
@tompsota
Copy link
Member

Hi @gailindia,

Thanks for reporting the issue. We will look at it and provide an update here.

Regards,
Tomas from Talsec

@tompsota
Copy link
Member

tompsota commented Jan 2, 2025

Hi @gailindia ,

can you send us your package name and watcher mail to [email protected], so that we can see whether the callback is ever triggered?

I recommend using the ThreatCallback class to take appropriate actions when a rooted device is detected, rather than directly inspecting the detectedThreats object. Keep in mind that threat detection takes a brief amount of time after the app starts. As a result, the audit may not be completed by the time the splash screen is displayed, so no immediate reaction might be visible. However, a callback could be triggered shortly afterward.

Additionally, in the code snippet you sent, ensure that you listen to changes to the detectedThreats object to handle future callbacks effectively. This will allow your app to respond dynamically to any new threats that are detected.

Regards,
Tomas

@msikyna msikyna added the waiting for response Response from reporter is needed label Feb 20, 2025
Copy link

Hello!
This issue has been marked as inactive. If there is no further activity within the next 14 days, this issue will be automatically closed.
If you believe this issue is still relevant and requires attention, please comment or provide additional information.

@github-actions github-actions bot added the stale This issue has been not active for long period of time label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale This issue has been not active for long period of time waiting for response Response from reporter is needed
Projects
None yet
Development

No branches or pull requests

4 participants