GithubHelp home page GithubHelp logo

How to test features? about free-rasp-flutter HOT 3 CLOSED

talsec avatar talsec commented on July 20, 2024
How to test features?

from free-rasp-flutter.

Comments (3)

talsec-app avatar talsec-app commented on July 20, 2024

Debugging detection you've tried is disabled in debug mode to prevent false positives.

The easiest way to produce an incident (trigger local check and create a record in security report) is to install a release build on an emulator (i.e., Android Emulator, which comes with Android Studio). Both app and freeRASP must be in release mode. You can also use a rooted Android device/emulator, in which case you create an incident even in debug mode.

from free-rasp-flutter.

prajwal27 avatar prajwal27 commented on July 20, 2024
  1. How to make sure that freeRasp is in release mode?
  2. What's the usecase of onDebuggerDetected callback?

from free-rasp-flutter.

talsec-app avatar talsec-app commented on July 20, 2024

First question:
freeRASP copies mode of application:

  • application in debug mode = freeRASP in dev mode
  • application in release mode = freeRASP in release mode

You can override this behaviour - for example, to run release freeRASP in debug mode.

For Android (Android Studio):
In your Flutter app, navigate to External libraries -> Flutter plugins -> freerasp-1.0.0 -> android -> build.gradle
At the bottom of the file, you should see:

dependencies {
    
    ... some other imports ...
    
    // Talsec Release
    releaseImplementation 'com.aheaditec.talsec.security:TalsecSecurity-Community:2.6.0-release'

    // Talsec Debug
    debugImplementation 'com.aheaditec.talsec.security:TalsecSecurity-Community:2.6.0-dev'
}

You can edit this file (Android Studio might need confirmation, that you you are trying to override which does not belong to project) to import dev and/or release version as you need.
Keywords used to import libraries in gradle:

  • implementation - import for any development stage (debug and release)
  • debugImplementation - import for debug stage only
  • releaseImplementation - import for release stage only

Be aware that you are overriding package from pubdev cache, so any other application using freerasp is depending on this cache and will be affected as well (if you compile it at the same time).

For iOS (xCode):
You can edit script so that different version is imported - by changing condition or just swapping directories.
Example (chaning condition):

cd "${SRCROOT}/.symlinks/plugins/freerasp/ios"
if [ "${CONFIGURATION}" = "Debug" ]; then
    rm -rf ./TalsecRuntime.xcframework
    ln -s ./Release/TalsecRuntime.xcframework/ TalsecRuntime.xcframework
else
    rm -rf ./TalsecRuntime.xcframework
    ln -s ./Debug/TalsecRuntime.xcframework/ TalsecRuntime.xcframework
fi

Example (swapping directories):

cd "${SRCROOT}/.symlinks/plugins/freerasp/ios"
if [ "${CONFIGURATION}" = "Release" ]; then
    rm -rf ./TalsecRuntime.xcframework
    ln -s ./Debug/TalsecRuntime.xcframework/ TalsecRuntime.xcframework
else
    rm -rf ./TalsecRuntime.xcframework
    ln -s ./Release/TalsecRuntime.xcframework/ TalsecRuntime.xcframework
fi

Second question:
onDebuggerDetected is called when debugger is detected e.g. debugger is attached to process of application. Attached debugger by someone other than developer cloud mean possible attack.

from free-rasp-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.