capacitor-freerasp 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/aheaditec/freerasp/FreeraspPlugin.kt +39 -36
- package/android/src/main/java/com/aheaditec/freerasp/Threat.kt +44 -0
- package/android/src/main/java/com/aheaditec/freerasp/ThreatHandler.kt +47 -0
- package/dist/esm/definitions.d.ts +25 -1
- package/dist/esm/definitions.js +46 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js +69 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils.d.ts +2 -0
- package/dist/esm/utils.js +8 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/esm/web.d.ts +7 -0
- package/dist/esm/web.js +9 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +129 -6
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +129 -6
- package/dist/plugin.js.map +1 -1
- package/ios/Plugin/FreeraspPlugin.m +3 -1
- package/ios/Plugin/FreeraspPlugin.swift +76 -8
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +2 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +142 -160
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +3 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +3 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +4 -4
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +142 -160
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +142 -160
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +3 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -2
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +25 -25
- package/package.json +1 -1
- package/ios/Plugin/Freerasp.swift +0 -8
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
   
|
|
3
|
+
    [](https://42matters.com/sdks/android/freerasp)
|
|
4
4
|
|
|
5
5
|
# freeRASP for Capacitor
|
|
6
6
|
|
|
@@ -73,7 +73,7 @@ We will guide you step-by-step, but you can always check the expected result in
|
|
|
73
73
|
|
|
74
74
|
### Android
|
|
75
75
|
|
|
76
|
-
freeRASP for Android requires a
|
|
76
|
+
freeRASP for Android requires a **minSdkVersion** level of **>=23** and a **targetSdkVersion** level of **>=33**. Some Capacitor projects, by default, support even lower levels of minimum and target SDKs. This creates an inconsistency we must solve by updating the SDK levels of the application:
|
|
77
77
|
|
|
78
78
|
1. From the root of your project, go to **android > variables.gradle** (or equivalent).
|
|
79
79
|
1. In **ext**, update **minSdkVersion** to at least **23** (Android 6.0) or higher and **compileSdkVersion** to **33** (Android 13).
|
|
@@ -106,7 +106,7 @@ const config = {
|
|
|
106
106
|
androidConfig: {
|
|
107
107
|
packageName: 'com.capacitor.example',
|
|
108
108
|
certificateHashes: ['yourSigningCertificateHashBase64'],
|
|
109
|
-
supportedAlternativeStores: ['
|
|
109
|
+
supportedAlternativeStores: ['com.sec.android.app.samsungapps'],
|
|
110
110
|
},
|
|
111
111
|
iosConfig: {
|
|
112
112
|
appBundleId: 'com.capacitor.example',
|
|
@@ -123,7 +123,7 @@ const config = {
|
|
|
123
123
|
|
|
124
124
|
- `packageName` _: string_ - package name of your app you chose when you created it
|
|
125
125
|
- `certificateHashes` _: string[]_ - hash of the certificate of the key which was used to sign the application. **Hash which is passed here must be encoded in Base64 form.** If you are not sure how to get your certificate hash, you can check out the guide on our [Github wiki](https://github.com/talsec/Free-RASP-Community/wiki/Getting-your-signing-certificate-hash-of-app). Multiple hashes are supported, e.g. if you are using a different one for the Huawei App Gallery.
|
|
126
|
-
- `supportedAlternativeStores` _: string[] | undefined_ -
|
|
126
|
+
- `supportedAlternativeStores` _: string[] | undefined_ - Google Play Store and Huawei AppGallery are supported out of the box, you **don't have to assign anything**. You can add other stores like the Samsung Galaxy Store in the example code (`com.sec.android.app.samsungapps`). For more information, visit the [Detecting Unofficial Installation](https://github.com/talsec/Free-RASP-Community/wiki/Threat-detection#detecting-unofficial-installation) wiki page.
|
|
127
127
|
|
|
128
128
|
1. `iosConfig` _: object | undefined_ - required for iOS devices, has following keys:
|
|
129
129
|
- `appBundleId` _: string_ - Bundle ID of your app
|
package/android/build.gradle
CHANGED
|
@@ -71,5 +71,5 @@ dependencies {
|
|
|
71
71
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
72
72
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
73
73
|
|
|
74
|
-
implementation 'com.aheaditec.talsec.security:TalsecSecurity-Community-Capacitor:
|
|
74
|
+
implementation 'com.aheaditec.talsec.security:TalsecSecurity-Community-Capacitor:9.0.0'
|
|
75
75
|
}
|
|
@@ -8,16 +8,17 @@ import com.getcapacitor.Plugin
|
|
|
8
8
|
import com.getcapacitor.PluginCall
|
|
9
9
|
import com.getcapacitor.PluginMethod
|
|
10
10
|
import com.getcapacitor.annotation.CapacitorPlugin
|
|
11
|
+
import org.json.JSONArray
|
|
11
12
|
import java.lang.Exception
|
|
12
13
|
|
|
13
14
|
@CapacitorPlugin(name = "Freerasp")
|
|
14
|
-
class FreeraspPlugin : Plugin()
|
|
15
|
+
class FreeraspPlugin : Plugin() {
|
|
15
16
|
|
|
16
|
-
private val
|
|
17
|
+
private val threatHandler = TalsecThreatHandler(this)
|
|
18
|
+
private val listener = ThreatListener(threatHandler, threatHandler)
|
|
17
19
|
private var registered = true
|
|
18
|
-
private val emptyData = JSObject()
|
|
19
20
|
|
|
20
|
-
@PluginMethod
|
|
21
|
+
@PluginMethod
|
|
21
22
|
fun talsecStart(call: PluginCall) {
|
|
22
23
|
val config = call.getObject("config")
|
|
23
24
|
if (config == null) {
|
|
@@ -48,46 +49,41 @@ class FreeraspPlugin : Plugin(), ThreatListener.DeviceState, ThreatListener.Thre
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Method to get the random identifiers of callbacks
|
|
54
|
+
*/
|
|
55
|
+
@PluginMethod
|
|
56
|
+
fun getThreatIdentifiers(call: PluginCall) {
|
|
57
|
+
call.resolve(JSObject().put("ids", Threat.getThreatValues()))
|
|
53
58
|
}
|
|
54
59
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
override fun onUntrustedInstallationSourceDetected() {
|
|
68
|
-
notifyListeners("unofficialStore", emptyData, true)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
override fun onHookDetected() {
|
|
72
|
-
notifyListeners("hooks", emptyData, true)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
override fun onDeviceBindingDetected() {
|
|
76
|
-
notifyListeners("deviceBinding", emptyData, true)
|
|
60
|
+
/**
|
|
61
|
+
* Method to setup the message passing between native and React Native
|
|
62
|
+
* @return list of [THREAT_CHANNEL_NAME, THREAT_CHANNEL_KEY]
|
|
63
|
+
*/
|
|
64
|
+
@PluginMethod
|
|
65
|
+
fun getThreatChannelData(call: PluginCall) {
|
|
66
|
+
val channelData = JSONArray(
|
|
67
|
+
(listOf(
|
|
68
|
+
THREAT_CHANNEL_NAME, THREAT_CHANNEL_KEY
|
|
69
|
+
))
|
|
70
|
+
)
|
|
71
|
+
call.resolve(JSObject().put("ids", channelData))
|
|
77
72
|
}
|
|
78
73
|
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
/**
|
|
75
|
+
* We never send an invalid callback over our channel.
|
|
76
|
+
* Therefore, if this happens, we want to kill the app.
|
|
77
|
+
*/
|
|
78
|
+
@PluginMethod
|
|
79
|
+
fun onInvalidCallback() {
|
|
80
|
+
android.os.Process.killProcess(android.os.Process.myPid())
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
notifyListeners(
|
|
83
|
+
internal fun notifyListeners(threat: Threat) {
|
|
84
|
+
notifyListeners(THREAT_CHANNEL_NAME, JSObject().put(THREAT_CHANNEL_KEY, threat.value), true)
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
override fun onObfuscationIssuesDetected() {
|
|
88
|
-
notifyListeners("obfuscationIssues", emptyData, true)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
87
|
private fun parseTalsecConfigThrowing(configJson: JSObject): TalsecConfig {
|
|
92
88
|
val androidConfig = configJson.getJSONObject("androidConfig")
|
|
93
89
|
val packageName = androidConfig.getString("packageName")
|
|
@@ -117,4 +113,11 @@ class FreeraspPlugin : Plugin(), ThreatListener.DeviceState, ThreatListener.Thre
|
|
|
117
113
|
isProd
|
|
118
114
|
)
|
|
119
115
|
}
|
|
116
|
+
|
|
117
|
+
companion object {
|
|
118
|
+
private val THREAT_CHANNEL_NAME = (10000..999999999).random()
|
|
119
|
+
.toString() // name of the channel over which threat callbacks are sent
|
|
120
|
+
private val THREAT_CHANNEL_KEY = (10000..999999999).random()
|
|
121
|
+
.toString() // key of the argument map under which threats are expected
|
|
122
|
+
}
|
|
120
123
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
package com.aheaditec.freerasp
|
|
2
|
+
|
|
3
|
+
import org.json.JSONArray
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Sealed class to represent the error codes.
|
|
7
|
+
*
|
|
8
|
+
* Sealed classes are used because of obfuscation - enums classes are not obfuscated well enough.
|
|
9
|
+
*
|
|
10
|
+
* @property value integer value of the error code.
|
|
11
|
+
*/
|
|
12
|
+
internal sealed class Threat(val value: Int) {
|
|
13
|
+
object AppIntegrity : Threat((10000..999999999).random())
|
|
14
|
+
object PrivilegedAccess : Threat((10000..999999999).random())
|
|
15
|
+
object Debug : Threat((10000..999999999).random())
|
|
16
|
+
object Hooks : Threat((10000..999999999).random())
|
|
17
|
+
object Passcode : Threat((10000..999999999).random())
|
|
18
|
+
object Simulator : Threat((10000..999999999).random())
|
|
19
|
+
object SecureHardwareNotAvailable : Threat((10000..999999999).random())
|
|
20
|
+
object DeviceBinding : Threat((10000..999999999).random())
|
|
21
|
+
object UnofficialStore : Threat((10000..999999999).random())
|
|
22
|
+
object Overlay : Threat((10000..999999999).random())
|
|
23
|
+
object ObfuscationIssues : Threat((10000..999999999).random())
|
|
24
|
+
|
|
25
|
+
companion object {
|
|
26
|
+
internal fun getThreatValues(): JSONArray {
|
|
27
|
+
return JSONArray(
|
|
28
|
+
(listOf(
|
|
29
|
+
AppIntegrity.value,
|
|
30
|
+
PrivilegedAccess.value,
|
|
31
|
+
Debug.value,
|
|
32
|
+
Hooks.value,
|
|
33
|
+
Passcode.value,
|
|
34
|
+
Simulator.value,
|
|
35
|
+
SecureHardwareNotAvailable.value,
|
|
36
|
+
DeviceBinding.value,
|
|
37
|
+
UnofficialStore.value,
|
|
38
|
+
Overlay.value,
|
|
39
|
+
ObfuscationIssues.value
|
|
40
|
+
))
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
package com.aheaditec.freerasp
|
|
2
|
+
|
|
3
|
+
import com.aheaditec.talsec_security.security.api.ThreatListener
|
|
4
|
+
|
|
5
|
+
internal class TalsecThreatHandler(private val instance: FreeraspPlugin) :
|
|
6
|
+
ThreatListener.ThreatDetected, ThreatListener.DeviceState {
|
|
7
|
+
|
|
8
|
+
override fun onRootDetected() {
|
|
9
|
+
instance.notifyListeners(Threat.PrivilegedAccess)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
override fun onDebuggerDetected() {
|
|
13
|
+
instance.notifyListeners(Threat.Debug)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
override fun onEmulatorDetected() {
|
|
17
|
+
instance.notifyListeners(Threat.Simulator)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
override fun onTamperDetected() {
|
|
21
|
+
instance.notifyListeners(Threat.AppIntegrity)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
override fun onUntrustedInstallationSourceDetected() {
|
|
25
|
+
instance.notifyListeners(Threat.UnofficialStore)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
override fun onHookDetected() {
|
|
29
|
+
instance.notifyListeners(Threat.Hooks)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
override fun onDeviceBindingDetected() {
|
|
33
|
+
instance.notifyListeners(Threat.DeviceBinding)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
override fun onObfuscationIssuesDetected() {
|
|
37
|
+
instance.notifyListeners(Threat.ObfuscationIssues)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
override fun onUnlockedDeviceDetected() {
|
|
41
|
+
instance.notifyListeners(Threat.Passcode)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
override fun onHardwareBackedKeystoreNotAvailableDetected() {
|
|
45
|
+
instance.notifyListeners(Threat.SecureHardwareNotAvailable)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
export interface FreeraspPlugin {
|
|
2
|
-
addListener(listener: string, callback: () =>
|
|
2
|
+
addListener(listener: string, callback: (event: any) => void): any;
|
|
3
3
|
talsecStart(options: {
|
|
4
4
|
config: FreeraspConfig;
|
|
5
5
|
}): Promise<{
|
|
6
6
|
started: boolean;
|
|
7
7
|
}>;
|
|
8
|
+
onInvalidCallback(): void;
|
|
9
|
+
getThreatIdentifiers(): Promise<{
|
|
10
|
+
ids: number[];
|
|
11
|
+
}>;
|
|
12
|
+
getThreatChannelData(): Promise<{
|
|
13
|
+
ids: [string, string];
|
|
14
|
+
}>;
|
|
8
15
|
}
|
|
9
16
|
export declare type FreeraspConfig = {
|
|
10
17
|
androidConfig?: AndroidConfig;
|
|
@@ -34,3 +41,20 @@ export declare type NativeEventEmitterActions = {
|
|
|
34
41
|
secureHardwareNotAvailable?: () => any;
|
|
35
42
|
obfuscationIssues?: () => any;
|
|
36
43
|
};
|
|
44
|
+
export declare class Threat {
|
|
45
|
+
value: number;
|
|
46
|
+
static AppIntegrity: Threat;
|
|
47
|
+
static PrivilegedAccess: Threat;
|
|
48
|
+
static Debug: Threat;
|
|
49
|
+
static Hooks: Threat;
|
|
50
|
+
static Passcode: Threat;
|
|
51
|
+
static Simulator: Threat;
|
|
52
|
+
static SecureHardwareNotAvailable: Threat;
|
|
53
|
+
static DeviceBinding: Threat;
|
|
54
|
+
static DeviceID: Threat;
|
|
55
|
+
static UnofficialStore: Threat;
|
|
56
|
+
static Overlay: Threat;
|
|
57
|
+
static ObfuscationIssues: Threat;
|
|
58
|
+
constructor(value: number);
|
|
59
|
+
static getValues(): Threat[];
|
|
60
|
+
}
|
package/dist/esm/definitions.js
CHANGED
|
@@ -1,2 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
import { Capacitor } from "@capacitor/core";
|
|
2
|
+
export class Threat {
|
|
3
|
+
constructor(value) {
|
|
4
|
+
this.value = value;
|
|
5
|
+
}
|
|
6
|
+
static getValues() {
|
|
7
|
+
return Capacitor.getPlatform() === 'android'
|
|
8
|
+
? [
|
|
9
|
+
this.AppIntegrity,
|
|
10
|
+
this.PrivilegedAccess,
|
|
11
|
+
this.Debug,
|
|
12
|
+
this.Hooks,
|
|
13
|
+
this.Passcode,
|
|
14
|
+
this.Simulator,
|
|
15
|
+
this.SecureHardwareNotAvailable,
|
|
16
|
+
this.DeviceBinding,
|
|
17
|
+
this.UnofficialStore,
|
|
18
|
+
this.Overlay,
|
|
19
|
+
this.ObfuscationIssues,
|
|
20
|
+
]
|
|
21
|
+
: [
|
|
22
|
+
this.AppIntegrity,
|
|
23
|
+
this.PrivilegedAccess,
|
|
24
|
+
this.Debug,
|
|
25
|
+
this.Hooks,
|
|
26
|
+
this.Passcode,
|
|
27
|
+
this.Simulator,
|
|
28
|
+
this.SecureHardwareNotAvailable,
|
|
29
|
+
this.DeviceBinding,
|
|
30
|
+
this.DeviceID,
|
|
31
|
+
this.UnofficialStore,
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
Threat.AppIntegrity = new Threat(0);
|
|
36
|
+
Threat.PrivilegedAccess = new Threat(0);
|
|
37
|
+
Threat.Debug = new Threat(0);
|
|
38
|
+
Threat.Hooks = new Threat(0);
|
|
39
|
+
Threat.Passcode = new Threat(0);
|
|
40
|
+
Threat.Simulator = new Threat(0);
|
|
41
|
+
Threat.SecureHardwareNotAvailable = new Threat(0);
|
|
42
|
+
Threat.DeviceBinding = new Threat(0);
|
|
43
|
+
Threat.DeviceID = new Threat(0);
|
|
44
|
+
Threat.UnofficialStore = new Threat(0);
|
|
45
|
+
Threat.Overlay = new Threat(0);
|
|
46
|
+
Threat.ObfuscationIssues = new Threat(0);
|
|
2
47
|
//# sourceMappingURL=definitions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],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Aa,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAC9B,eAAQ,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACzB,sBAAe,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AAChC,cAAO,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;AACxB,wBAAiB,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC","sourcesContent":["import { Capacitor } from \"@capacitor/core\";\n\nexport interface FreeraspPlugin {\n addListener(listener: string, callback: (event: any) => void): any;\n talsecStart(options: { config: FreeraspConfig }): Promise<{ started: boolean }>;\n onInvalidCallback(): void;\n getThreatIdentifiers(): Promise<{ ids: number[] }>;\n getThreatChannelData(): Promise<{ ids: [string, string] }>;\n}\n\nexport type FreeraspConfig = {\n androidConfig?: AndroidConfig;\n iosConfig?: IOSConfig;\n watcherMail: string;\n isProd?: boolean;\n}\n\nexport type AndroidConfig = {\n packageName: string;\n certificateHashes: string[];\n supportedAlternativeStores?: string[];\n}\n\nexport type IOSConfig = {\n appBundleId: string;\n appTeamId: string;\n}\n\nexport type NativeEventEmitterActions = {\n privilegedAccess?: () => any;\n debug?: () => any;\n simulator?: () => any;\n appIntegrity?: () => any;\n unofficialStore?: () => any;\n hooks?: () => any;\n deviceBinding?: () => any;\n deviceID?: () => any;\n passcode?: () => any;\n secureHardwareNotAvailable?: () => any;\n obfuscationIssues?: () => any;\n};\n\nexport class Threat {\n value: number;\n\n static AppIntegrity = new Threat(0);\n static PrivilegedAccess = new Threat(0);\n static Debug = new Threat(0);\n static Hooks = new Threat(0);\n static Passcode = new Threat(0);\n static Simulator = new Threat(0);\n static SecureHardwareNotAvailable = new Threat(0);\n static DeviceBinding = new Threat(0);\n static DeviceID = new Threat(0);\n static UnofficialStore = new Threat(0);\n static Overlay = new Threat(0);\n static ObfuscationIssues = new Threat(0);\n\n constructor(value: number) {\n this.value = value;\n }\n\n static getValues(): Threat[] {\n return Capacitor.getPlatform() === 'android'\n ? [\n this.AppIntegrity,\n this.PrivilegedAccess,\n this.Debug,\n this.Hooks,\n this.Passcode,\n this.Simulator,\n this.SecureHardwareNotAvailable,\n this.DeviceBinding,\n this.UnofficialStore,\n this.Overlay,\n this.ObfuscationIssues,\n ]\n : [\n this.AppIntegrity,\n this.PrivilegedAccess,\n this.Debug,\n this.Hooks,\n this.Passcode,\n this.Simulator,\n this.SecureHardwareNotAvailable,\n this.DeviceBinding,\n this.DeviceID,\n this.UnofficialStore,\n ];\n }\n}\n"]}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,16 +1,78 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { registerPlugin } from '@capacitor/core';
|
|
2
|
+
import { Threat } from './definitions';
|
|
3
|
+
import { getThreatCount, itemsHaveType } from './utils';
|
|
2
4
|
const activeListeners = [];
|
|
3
5
|
const Freerasp = registerPlugin('Freerasp', {
|
|
4
6
|
web: () => import('./web').then(m => new m.FreeraspWeb()),
|
|
5
7
|
});
|
|
8
|
+
const onInvalidCallback = () => {
|
|
9
|
+
Freerasp.onInvalidCallback();
|
|
10
|
+
};
|
|
11
|
+
const getThreatIdentifiers = async () => {
|
|
12
|
+
const { ids } = await Freerasp.getThreatIdentifiers();
|
|
13
|
+
if (ids.length !== getThreatCount() || !itemsHaveType(ids, 'number')) {
|
|
14
|
+
onInvalidCallback();
|
|
15
|
+
}
|
|
16
|
+
return ids;
|
|
17
|
+
};
|
|
18
|
+
const getThreatChannelData = async () => {
|
|
19
|
+
const { ids } = await Freerasp.getThreatChannelData();
|
|
20
|
+
if (ids.length !== 2 || !itemsHaveType(ids, 'string')) {
|
|
21
|
+
onInvalidCallback();
|
|
22
|
+
}
|
|
23
|
+
return ids;
|
|
24
|
+
};
|
|
25
|
+
const prepareMapping = async () => {
|
|
26
|
+
const newValues = await getThreatIdentifiers();
|
|
27
|
+
const threats = Threat.getValues();
|
|
28
|
+
threats.map((threat, index) => {
|
|
29
|
+
threat.value = newValues[index];
|
|
30
|
+
});
|
|
31
|
+
};
|
|
6
32
|
const setThreatListeners = async (callbacks) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
33
|
+
const [channel, key] = await getThreatChannelData();
|
|
34
|
+
await prepareMapping();
|
|
35
|
+
await Freerasp.addListener(channel, (event) => {
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
37
|
+
if (event[key] === undefined) {
|
|
38
|
+
onInvalidCallback();
|
|
10
39
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
40
|
+
switch (event[key]) {
|
|
41
|
+
case Threat.PrivilegedAccess.value:
|
|
42
|
+
(_a = callbacks.privilegedAccess) === null || _a === void 0 ? void 0 : _a.call(callbacks);
|
|
43
|
+
break;
|
|
44
|
+
case Threat.Debug.value:
|
|
45
|
+
(_b = callbacks.debug) === null || _b === void 0 ? void 0 : _b.call(callbacks);
|
|
46
|
+
break;
|
|
47
|
+
case Threat.Simulator.value:
|
|
48
|
+
(_c = callbacks.simulator) === null || _c === void 0 ? void 0 : _c.call(callbacks);
|
|
49
|
+
break;
|
|
50
|
+
case Threat.AppIntegrity.value:
|
|
51
|
+
(_d = callbacks.appIntegrity) === null || _d === void 0 ? void 0 : _d.call(callbacks);
|
|
52
|
+
break;
|
|
53
|
+
case Threat.UnofficialStore.value:
|
|
54
|
+
(_e = callbacks.unofficialStore) === null || _e === void 0 ? void 0 : _e.call(callbacks);
|
|
55
|
+
break;
|
|
56
|
+
case Threat.Hooks.value:
|
|
57
|
+
(_f = callbacks.hooks) === null || _f === void 0 ? void 0 : _f.call(callbacks);
|
|
58
|
+
break;
|
|
59
|
+
case Threat.DeviceBinding.value:
|
|
60
|
+
(_g = callbacks.deviceBinding) === null || _g === void 0 ? void 0 : _g.call(callbacks);
|
|
61
|
+
break;
|
|
62
|
+
case Threat.Passcode.value:
|
|
63
|
+
(_h = callbacks.passcode) === null || _h === void 0 ? void 0 : _h.call(callbacks);
|
|
64
|
+
break;
|
|
65
|
+
case Threat.SecureHardwareNotAvailable.value:
|
|
66
|
+
(_j = callbacks.secureHardwareNotAvailable) === null || _j === void 0 ? void 0 : _j.call(callbacks);
|
|
67
|
+
break;
|
|
68
|
+
case Threat.ObfuscationIssues.value:
|
|
69
|
+
(_k = callbacks.obfuscationIssues) === null || _k === void 0 ? void 0 : _k.call(callbacks);
|
|
70
|
+
break;
|
|
71
|
+
default:
|
|
72
|
+
onInvalidCallback();
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
14
76
|
};
|
|
15
77
|
const removeThreatListeners = () => {
|
|
16
78
|
activeListeners.forEach((listener) => listener.remove());
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,eAAe,GAAU,EAAE,CAAC;AAElC,MAAM,QAAQ,GAAG,cAAc,CAAiB,UAAU,EAAE;IAC1D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;CAC1D,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,GAAS,EAAE;IACnC,QAAQ,CAAC,iBAAiB,EAAE,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,IAAuB,EAAE;IACzD,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,QAAQ,CAAC,oBAAoB,EAAE,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E,CAAC,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,KAAK,EAAuC,MAAsB,EAAE,SAA6E,EAAE,EAAE;IAEzK,MAAM,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACpC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,EAAC,MAAM,EAAC,CAAC,CAAA;IAExD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA;AAED,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { FreeraspPlugin, FreeraspConfig, NativeEventEmitterActions } from './definitions';\nimport { Threat } from './definitions';\nimport { getThreatCount, itemsHaveType } from './utils';\n\nconst activeListeners: any[] = [];\n\nconst Freerasp = registerPlugin<FreeraspPlugin>('Freerasp', {\n web: () => import('./web').then(m => new m.FreeraspWeb()),\n});\n\nconst onInvalidCallback = (): void => {\n Freerasp.onInvalidCallback();\n};\n\nconst getThreatIdentifiers = async (): Promise<number[]> => {\n const { ids } = await Freerasp.getThreatIdentifiers();\n if (ids.length !== getThreatCount() || !itemsHaveType(ids, 'number')) {\n onInvalidCallback();\n }\n return ids;\n};\n\nconst getThreatChannelData = async (): Promise<[string, string]> => {\n const { ids } = await Freerasp.getThreatChannelData();\n if (ids.length !== 2 || !itemsHaveType(ids, 'string')) {\n onInvalidCallback();\n }\n return ids;\n};\n\nconst prepareMapping = async (): Promise<void> => {\n const newValues = await getThreatIdentifiers();\n const threats = Threat.getValues();\n\n threats.map((threat, index) => {\n threat.value = newValues[index]!;\n });\n};\n\nconst setThreatListeners = async <T extends NativeEventEmitterActions>(\n callbacks: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>\n) => {\n const [channel, key] = await getThreatChannelData();\n await prepareMapping();\n\n await Freerasp.addListener(channel, (event: any) => {\n if (event[key] === undefined) {\n onInvalidCallback();\n }\n switch (event[key]) {\n case Threat.PrivilegedAccess.value:\n callbacks.privilegedAccess?.();\n break;\n case Threat.Debug.value:\n callbacks.debug?.();\n break;\n case Threat.Simulator.value:\n callbacks.simulator?.();\n break;\n case Threat.AppIntegrity.value:\n callbacks.appIntegrity?.();\n break;\n case Threat.UnofficialStore.value:\n callbacks.unofficialStore?.();\n break;\n case Threat.Hooks.value:\n callbacks.hooks?.();\n break;\n case Threat.DeviceBinding.value:\n callbacks.deviceBinding?.();\n break;\n case Threat.Passcode.value:\n callbacks.passcode?.();\n break;\n case Threat.SecureHardwareNotAvailable.value:\n callbacks.secureHardwareNotAvailable?.();\n break;\n case Threat.ObfuscationIssues.value:\n callbacks.obfuscationIssues?.();\n break;\n default:\n onInvalidCallback();\n break;\n }\n });\n};\n\nconst removeThreatListeners = () => {\n activeListeners.forEach((listener) => listener.remove());\n};\n\nconst startFreeRASP = async <T extends NativeEventEmitterActions>(config: FreeraspConfig, reactions: T & Record<Exclude<keyof T, keyof NativeEventEmitterActions>, []>) => {\n \n await setThreatListeners(reactions);\n const { started } = await Freerasp.talsecStart({config})\n\n return started\n}\n\nexport * from './definitions';\nexport { Freerasp, startFreeRASP, setThreatListeners, removeThreatListeners };\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Threat } from './definitions';
|
|
2
|
+
export const getThreatCount = () => {
|
|
3
|
+
return Threat.getValues().length;
|
|
4
|
+
};
|
|
5
|
+
export const itemsHaveType = (data, desiredType) => {
|
|
6
|
+
return data.every(item => typeof item === desiredType);
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAW,EAAE;IACzC,OAAO,MAAM,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC;AACnC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAW,EAAE,WAAmB,EAAW,EAAE;IACzE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,IAAI,KAAK,WAAW,CAAC,CAAC;AACzD,CAAC,CAAC","sourcesContent":["import { Threat } from './definitions';\n\nexport const getThreatCount = (): number => {\n return Threat.getValues().length;\n};\n\nexport const itemsHaveType = (data: any[], desiredType: string): boolean => {\n return data.every(item => typeof item === desiredType);\n};"]}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
2
|
import type { FreeraspPlugin, FreeraspConfig } from './definitions';
|
|
3
3
|
export declare class FreeraspWeb extends WebPlugin implements FreeraspPlugin {
|
|
4
|
+
onInvalidCallback(): void;
|
|
5
|
+
getThreatIdentifiers(): Promise<{
|
|
6
|
+
ids: number[];
|
|
7
|
+
}>;
|
|
8
|
+
getThreatChannelData(): Promise<{
|
|
9
|
+
ids: [string, string];
|
|
10
|
+
}>;
|
|
4
11
|
talsecStart(_options: {
|
|
5
12
|
config: FreeraspConfig;
|
|
6
13
|
}): Promise<{
|
package/dist/esm/web.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { WebPlugin } from '@capacitor/core';
|
|
2
2
|
export class FreeraspWeb extends WebPlugin {
|
|
3
|
+
onInvalidCallback() {
|
|
4
|
+
throw new Error('Method not implemented.');
|
|
5
|
+
}
|
|
6
|
+
getThreatIdentifiers() {
|
|
7
|
+
throw new Error('Method not implemented.');
|
|
8
|
+
}
|
|
9
|
+
getThreatChannelData() {
|
|
10
|
+
throw new Error('Method not implemented.');
|
|
11
|
+
}
|
|
3
12
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
13
|
async talsecStart(_options) {
|
|
5
14
|
throw new Error('Method not implemented.');
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACxC,6DAA6D;IAC7D,KAAK,CAAC,WAAW,CAAC,QAAoC;QACpD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { FreeraspPlugin, FreeraspConfig } from './definitions';\n\nexport class FreeraspWeb extends WebPlugin implements FreeraspPlugin {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async talsecStart(_options: { config: FreeraspConfig }): Promise<{ started: boolean }> {\n throw new Error('Method not implemented.');\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACxC,iBAAiB;QACf,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,oBAAoB;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,oBAAoB;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,6DAA6D;IAC7D,KAAK,CAAC,WAAW,CAAC,QAAoC;QACpD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { FreeraspPlugin, FreeraspConfig } from './definitions';\n\nexport class FreeraspWeb extends WebPlugin implements FreeraspPlugin {\n onInvalidCallback(): void {\n throw new Error('Method not implemented.');\n }\n getThreatIdentifiers(): Promise<{ ids: number[]; }> {\n throw new Error('Method not implemented.');\n }\n getThreatChannelData(): Promise<{ ids: [string, string]; }> {\n throw new Error('Method not implemented.');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async talsecStart(_options: { config: FreeraspConfig }): Promise<{ started: boolean }> {\n throw new Error('Method not implemented.');\n }\n}\n"]}
|