capacitor-freerasp 1.0.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.
Files changed (80) hide show
  1. package/CapacitorFreerasp.podspec +19 -0
  2. package/LICENSE +20 -0
  3. package/README.md +431 -0
  4. package/android/build.gradle +75 -0
  5. package/android/consumer-rules.pro +1 -0
  6. package/android/gradle.properties +22 -0
  7. package/android/proguard-rules.pro +21 -0
  8. package/android/settings.gradle +2 -0
  9. package/android/src/main/AndroidManifest.xml +2 -0
  10. package/android/src/main/java/com/aheaditec/freerasp/FreeraspPlugin.kt +120 -0
  11. package/android/src/main/res/.gitkeep +0 -0
  12. package/dist/esm/definitions.d.ts +36 -0
  13. package/dist/esm/definitions.js +2 -0
  14. package/dist/esm/definitions.js.map +1 -0
  15. package/dist/esm/index.d.ts +7 -0
  16. package/dist/esm/index.js +25 -0
  17. package/dist/esm/index.js.map +1 -0
  18. package/dist/esm/web.d.ts +9 -0
  19. package/dist/esm/web.js +8 -0
  20. package/dist/esm/web.js.map +1 -0
  21. package/dist/plugin.cjs.js +45 -0
  22. package/dist/plugin.cjs.js.map +1 -0
  23. package/dist/plugin.js +48 -0
  24. package/dist/plugin.js.map +1 -0
  25. package/ios/Plugin/Freerasp.swift +8 -0
  26. package/ios/Plugin/FreeraspPlugin.h +10 -0
  27. package/ios/Plugin/FreeraspPlugin.m +9 -0
  28. package/ios/Plugin/FreeraspPlugin.swift +66 -0
  29. package/ios/Plugin/Info.plist +24 -0
  30. package/ios/Plugin/TalsecRuntime.xcframework/Info.plist +40 -0
  31. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -0
  32. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -0
  33. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +297 -0
  34. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -0
  35. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -0
  36. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -0
  37. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +123 -0
  38. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +50 -0
  39. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -0
  40. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -0
  41. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -0
  42. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -0
  43. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -0
  44. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  45. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +5255 -0
  46. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +54 -0
  47. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  48. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +54 -0
  49. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -0
  50. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  51. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -0
  52. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -0
  53. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -0
  54. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -0
  55. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +590 -0
  56. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -0
  57. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +3029 -0
  58. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -0
  59. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +123 -0
  60. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +50 -0
  61. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +456 -0
  62. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -0
  63. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -0
  64. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +504 -0
  65. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -0
  66. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  67. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +5220 -0
  68. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +54 -0
  69. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  70. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +54 -0
  71. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +5220 -0
  72. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +54 -0
  73. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  74. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +54 -0
  75. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -0
  76. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  77. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +388 -0
  78. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +3154 -0
  79. package/ios/Plugin/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -0
  80. package/package.json +92 -0
@@ -0,0 +1,19 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'CapacitorFreerasp'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.license = package['license']
10
+ s.homepage = package['repository']['url']
11
+ s.author = package['author']
12
+ s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
+ s.source_files = 'ios/Plugin/*.{swift,h,m,c,cc,mm,cpp}', 'ios/Plugin/TalsecRuntime.xcframework'
14
+ s.ios.deployment_target = '13.0'
15
+ s.dependency 'Capacitor'
16
+ s.swift_version = '5.1'
17
+ s.xcconfig = { 'OTHER_LDFLAGS' => '-framework TalsecRuntime' }
18
+ s.ios.vendored_frameworks = "ios/Plugin/TalsecRuntime.xcframework"
19
+ end
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Talsec
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,431 @@
1
+ ![FreeRasp](https://raw.githubusercontent.com/talsec/Free-RASP-Community/master/visuals/freeRASP.png)
2
+
3
+ ![GitHub Repo stars](https://img.shields.io/github/stars/talsec/Free-RASP-Community?color=green) ![GitHub](https://img.shields.io/github/license/talsec/Free-RASP-Community) ![GitHub](https://img.shields.io/github/last-commit/talsec/Free-RASP-Community) ![Publisher](https://img.shields.io/pub/publisher/freerasp)
4
+
5
+ # freeRASP for Capacitor
6
+
7
+ freeRASP for Capacitor is a mobile in-app protection and security monitoring plugin. It aims to cover the main aspects of RASP (Runtime App Self Protection) and application shielding.
8
+
9
+ # :notebook_with_decorative_cover: Table of contents
10
+
11
+ - [Overview](#overview)
12
+ - [Usage](#usage)
13
+ - [Step 1: Install the plugin](#step-1-install-the-plugin)
14
+ - [Step 2: Set up the dependencies](#step-2-set-up-the-dependencies)
15
+ - [Step 3: Setup the configuration, callbacks and initialize freeRASP](#step-3-setup-the-configuration-callbacks-and-initialize-freerasp)
16
+ - [Configuration](#configuration)
17
+ - [Dev vs Release version](#dev-vs-release-version)
18
+ - [Callbacks](#callbacks)
19
+ - [Initialization](#initialization)
20
+ - [Step 4: Additional note about obfuscation](#step-4-additional-note-about-obfuscation)
21
+ - [Step 5: User Data Policies](#step-5-user-data-policies)
22
+ - [Security Report](#security-report)
23
+ - [Commercial versions (RASP+ and more)](#bar_chart-commercial-versions-rasp-and-more)
24
+ - [Plans Comparison](#plans-comparison)
25
+ - [About Us](#about-us)
26
+ - [License](#license)
27
+
28
+ # Overview
29
+
30
+ The freeRASP is available for Flutter, Cordova, Capacitor, React Native, Android, and iOS developers. We encourage community contributions, investigations of attack cases, joint data research, and other activities aiming to make better app security and app safety for end-users.
31
+
32
+ freeRASP plugin is designed to combat
33
+
34
+ - Reverse engineering attempts
35
+ - Re-publishing or tampering with the apps
36
+ - Running application in a compromised OS environment
37
+ - Malware, fraudsters, and cybercriminal activities
38
+
39
+ Key features are the detection and prevention of
40
+
41
+ - Root/Jailbreak (e.g., unc0ver, check1rain)
42
+ - Hooking framework (e.g., Frida, Shadow)
43
+ - Untrusted installation method
44
+ - App/Device (un)binding
45
+
46
+ Additional freeRASP features include low latency, easy integration and a weekly [Security Report](#security-report) containing detailed information about detected incidents and potential threats, summarizing the state of your app security.
47
+
48
+ The commercial version provides a top-notch protection level, extra features, support and maintenance. One of the most valued commercial features is AppiCrypt® - App Integrity Cryptogram.
49
+
50
+ It allows easy to implement API protection and App Integrity verification on the backend to prevent API abuse:
51
+
52
+ - Bruteforce attacks
53
+ - Botnets
54
+ - Session-hijacking
55
+ - DDoS
56
+
57
+ It is a unified solution that works across all mobile platforms without dependency on external web services (i.e., without extra latency, an additional point of failure, and maintenance costs).
58
+
59
+ Learn more about commercial features at [https://talsec.app](https://talsec.app).
60
+
61
+ Learn more about freemium freeRASP features at [GitHub main repository](https://github.com/talsec/Free-RASP-Community).
62
+
63
+ # Usage
64
+
65
+ We will guide you step-by-step, but you can always check the expected result in the example folder.
66
+
67
+ ## Step 1: Install the plugin
68
+
69
+ $ npm install capacitor-freerasp
70
+ $ npx cap sync
71
+
72
+ ## Step 2: Set up the dependencies
73
+
74
+ ### Android
75
+
76
+ freeRASP for Android requires a minimum **SDK** level of **23**. Capacitor projects, by default, support even lower levels of minimum SDK. This creates an inconsistency we must solve by updating the minimum SDK level of the application:
77
+
78
+ 1. From the root of your project, go to **android > variables.gradle** (or equivalent).
79
+ 1. In **ext**, update **minSdkVersion** to at least **23** (Android 6.0) or higher and **compileSdkVersion** to **33** (Android 13).
80
+
81
+ ```groovy
82
+ ext {
83
+ minSdkVersion 23
84
+ compileSdkVersion 33
85
+ ...
86
+ }
87
+ ```
88
+
89
+ ## Step 3: Setup the configuration, callbacks and initialize freeRASP
90
+
91
+ ### Import freeRASP
92
+
93
+ You should add freeRASP in the entry point to your app, which is usually `App.tsx` for React or `main.ts` for Vue or Angular projects.
94
+
95
+ ```ts
96
+ import { startFreeRASP } from 'capacitor-freerasp';
97
+ ```
98
+
99
+ ### Configuration
100
+
101
+ You need to provide configuration for freeRASP to work properly and initialize it. The freeRASP configuration is an JavaScript object that contains configs for both Android and iOS, as well as common configuration. You must fill all the required values for the plugin to work. Use the following template to provide configuration to the Talsec plugin. You can find detailed description of the configuration below.
102
+
103
+ ```ts
104
+ // app configuration
105
+ const config = {
106
+ androidConfig: {
107
+ packageName: 'com.capacitor.example',
108
+ certificateHashes: ['yourSigningCertificateHashBase64'],
109
+ supportedAlternativeStores: ['storeOne', 'storeTwo'],
110
+ },
111
+ iosConfig: {
112
+ appBundleId: 'com.capacitor.example',
113
+ appTeamId: 'yourTeamID',
114
+ },
115
+ watcherMail: 'yourEmailAddress@example.com',
116
+ isProd: true,
117
+ };
118
+ ```
119
+
120
+ #### The configuration object should consist of:
121
+
122
+ 1. `androidConfig` _: object | undefined_ - required for Android devices, has following keys:
123
+
124
+ - `packageName` _: string_ - package name of your app you chose when you created it
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_ - If you publish on the Google Play Store and/or Huawei AppGallery, you **don't have to assign anything** there as those are supported out of the box.
127
+
128
+ 1. `iosConfig` _: object | undefined_ - required for iOS devices, has following keys:
129
+ - `appBundleId` _: string_ - Bundle ID of your app
130
+ - `appTeamId` _: string_ - the Apple Team ID
131
+ 1. `watcherMail` _: string_ - your mail address where you wish to receive reports. Mail has a strict form `name@domain.com` which is passed as String.
132
+ 1. `isProd` _: boolean | undefined_ - defaults to `true` when undefined. If you want to use the Dev version to disable checks described [in the chapter below](#dev-vs-release-version), set the parameter to `false`. Make sure that you have the Release version in the production (i.e. isProd set to true)!
133
+
134
+ If you are developing only for one of the platforms, you can skip the configuration part for the other one, i.e., delete the unused configuration.
135
+
136
+ #### Dev vs Release version
137
+
138
+ The Dev version is used to not complicate the development process of the application, e.g. if you would implement killing of the application on the debugger callback. It disables some checks which won't be triggered during the development process:
139
+
140
+ - Emulator-usage (simulator)
141
+ - Debugging (debug)
142
+ - Signing (appIntegrity)
143
+ - Unofficial store (unofficialStore)
144
+
145
+ ### Callbacks
146
+
147
+ freeRASP executes periodical checks when the application is running. Handle the detected threats in the **listeners**. For example, you can log the event, show a window to the user or kill the application. [Visit our wiki](https://github.com/talsec/Free-RASP-Community/wiki/Threat-detection) to learn more details about the performed checks and their importance for app security.
148
+
149
+ ```ts
150
+ // reactions for detected threats
151
+ const actions = {
152
+ // Android & iOS
153
+ privilegedAccess: () => {
154
+ console.log('privilegedAccess');
155
+ },
156
+ // Android & iOS
157
+ debug: () => {
158
+ console.log('debug');
159
+ },
160
+ // Android & iOS
161
+ simulator: () => {
162
+ console.log('simulator');
163
+ },
164
+ // Android & iOS
165
+ appIntegrity: () => {
166
+ console.log('appIntegrity');
167
+ },
168
+ // Android & iOS
169
+ unofficialStore: () => {
170
+ console.log('unofficialStore');
171
+ },
172
+ // Android & iOS
173
+ hooks: () => {
174
+ console.log('hooks');
175
+ },
176
+ // Android & iOS
177
+ deviceBinding: () => {
178
+ console.log('deviceBinding');
179
+ },
180
+ // Android & iOS
181
+ secureHardwareNotAvailable: () => {
182
+ console.log('secureHardwareNotAvailable');
183
+ },
184
+ // Android & iOS
185
+ passcode: () => {
186
+ console.log('passcode');
187
+ },
188
+ // iOS only
189
+ deviceID: () => {
190
+ console.log('deviceID');
191
+ },
192
+ // Android only
193
+ obfuscationIssues: () => {
194
+ console.log('obfuscationIssues');
195
+ },
196
+ };
197
+ ```
198
+
199
+ ### Initialization
200
+
201
+ Provide the configuration and reactions to threats you set up in previous steps.
202
+
203
+ ```ts
204
+ // returns `true` if freeRASP starts successfully; you can ignore this value
205
+ const started = await startFreeRASP(config, actions);
206
+ ```
207
+
208
+ Based on your framework, we recommend:
209
+
210
+ - In **React**: Wrap this function in `useEffect` with empty dependency array
211
+ - In **Vue**: Call the method inside the `mounted` property
212
+ - In **Angular**: Call the method inside the `ngOnInit` method
213
+
214
+ ## Step 4: Additional note about obfuscation
215
+
216
+ The freeRASP contains public API, so the integration process is as simple as possible. Unfortunately, this public API also creates opportunities for the attacker to use publicly available information to interrupt freeRASP operations or modify your custom reaction implementation in threat callbacks. In order to provide as much protection as possible, freeRASP obfuscates its source code. However, if all other code is not obfuscated, one can easily deduct that the obfuscated code belongs to a security library. We, therefore, encourage you to apply code obfuscation to your app, making the public API more difficult to find and also partially randomized for each application so it cannot be automatically abused by generic hooking scripts.
217
+
218
+ Probably the easiest way to obfuscate your app is via code minification, a technique that reduces the size of the compiled code by removing unnecessary characters, whitespace, and renaming variables and functions to shorter names. It can be configured for Android devices in **android/app/build.gradle** like so:
219
+
220
+ ```groovy
221
+ android {
222
+ buildTypes {
223
+ release {
224
+ ...
225
+ minifyEnabled true
226
+ shrinkResources true
227
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
228
+ }
229
+ }
230
+ }
231
+ ```
232
+
233
+ Please note that some other modules in your app may rely on reflection, therefore it may be necessary to add corresponding keep rules into `proguard-rules.pro` file.
234
+
235
+ If there is a problem with the obfuscation, freeRASP will notify you about it via `obfuscationIssues` callback.
236
+
237
+ You can read more about Android obfuscation in the official documentation:
238
+
239
+ - https://developer.android.com/studio/build/shrink-code
240
+ - https://www.guardsquare.com/manual/configuration/usage
241
+
242
+ ## Step 5: User Data Policies
243
+
244
+ See the generic info about freeRASP data collection [here](https://github.com/talsec/Free-RASP-Community/tree/master#data-collection-processing-and-gdpr-compliance).
245
+
246
+ Google Play [requires](https://support.google.com/googleplay/android-developer/answer/10787469?hl=en) all app publishers to declare how they collect and handle user data for the apps they publish on Google Play. They should inform users properly of the data collected by the apps and how the data is shared and processed. Therefore, Google will reject the apps which do not comply with the policy.
247
+
248
+ Apple has a [similar approach](https://developer.apple.com/app-store/app-privacy-details/) and specifies the types of collected data.
249
+
250
+ You should also visit our [Android](https://github.com/talsec/Free-RASP-Android) and [iOS](https://github.com/talsec/Free-RASP-iOS) submodules to learn more about their respective data policies.
251
+
252
+ And you're done 🎉!
253
+
254
+ # Security Report
255
+
256
+ The Security Report is a weekly summary describing the application's security state and characteristics of the devices it runs on in a practical and easy-to-understand way.
257
+
258
+ The report provides a quick overview of the security incidents, their dynamics, app integrity, and reverse engineering attempts. It contains info about the security of devices, such as OS version or the ratio of devices with screen locks and biometrics. Each visualization also comes with a concise explanation.
259
+
260
+ To receive Security Reports, fill out the _watcherMail_ field in [config](#configuration).
261
+
262
+ ![dashboard](https://raw.githubusercontent.com/talsec/Free-RASP-Community/master/visuals/dashboard.png)
263
+
264
+ # :bar_chart: Commercial versions (RASP+ and more)
265
+
266
+ We provide app security hardening SDK: i.e. AppiCrypt®, Customer Data Encryption (local storage), End-to-end encryption, Strings protection (e.g. API keys) and Dynamic Certificate Pinning to our commercial customers as well. To get the most advanced protection compliant with PSD2 RT and eIDAS and support from our experts, contact us at [talsec.app](https://talsec.app).
267
+
268
+ The commercial version provides a top-notch protection level, extra features, support, and maintenance. One of the most valued commercial features is [AppiCrypt®](https://www.talsec.app/appicrypt) - App Integrity Cryptogram.
269
+
270
+ It allows easy to implement API protection and App Integrity verification on the backend to prevent API abuse:
271
+
272
+ - Bruteforce attacks
273
+ - Botnets
274
+ - Session-hijacking
275
+ - DDoS
276
+
277
+ It is a unified solution that works across all mobile platforms without dependency on external web services (i.e., without extra latency, an additional point of failure, and maintenance costs).
278
+
279
+ Learn more about commercial features at [https://talsec.app](https://talsec.app/).
280
+
281
+ **TIP:** You can try freeRASP and then upgrade easily to an enterprise service.
282
+
283
+ ## Plans Comparison
284
+
285
+ <i>
286
+ freeRASP is freemium software i.e. there is a Fair Usage Policy (FUP) that impose some limitations on the free usage. See the FUP section in the table below
287
+ </i>
288
+ <br/>
289
+ <br/>
290
+ <table>
291
+ <thead>
292
+ <tr>
293
+ <th></th>
294
+ <th>freeRASP</th>
295
+ <th>Business RASP+</th>
296
+ </tr>
297
+ </thead>
298
+ <tbody>
299
+ <tr>
300
+ <td colspan=5><strong>Runtime App Self Protection (RASP, app shielding)</strong></td>
301
+ </tr>
302
+ <tr>
303
+ <td>Advanced root/jailbreak protections (including Magisk)</td>
304
+ <td>basic</td>
305
+ <td>advanced</td>
306
+ </tr>
307
+ <tr>
308
+ <td>Runtime reverse engineering controls
309
+ <ul>
310
+ <li>Debugger</li>
311
+ <li>Emulator / Simulator</li>
312
+ <li>Hooking and reversing frameworks (e.g. Frida, Magisk, XPosed, Cydia Substrate and more)</li>
313
+ </ul>
314
+ </td>
315
+ <td>basic</td>
316
+ <td>advanced</td>
317
+ </tr>
318
+ <tr>
319
+ <td>Runtime integrity controls
320
+ <ul>
321
+ <li>Tampering protection</li>
322
+ <li>Repackaging / Cloning protection</li>
323
+ <li>Device binding protection</li>
324
+ <li>Unofficial store detection</li>
325
+ </ul>
326
+ </td>
327
+ <td>basic</td>
328
+ <td>advanced</td>
329
+ </tr>
330
+ <tr>
331
+ <td>Device OS security status check
332
+ <ul>
333
+ <li>HW security module control</li>
334
+ <li>Screen lock control</li>
335
+ <li>Google Play Services enabled/disabled</li>
336
+ <li>Last security patch update</li>
337
+ </ul>
338
+ </td>
339
+ <td>yes</td>
340
+ <td>yes</td>
341
+ </tr>
342
+ <tr>
343
+ <td>UI protection
344
+ <ul>
345
+ <li>Overlay protection</li>
346
+ <li>Accessibility services misuse protection</li>
347
+ </ul>
348
+ </td>
349
+ <td>no</td>
350
+ <td>yes</td>
351
+ </tr>
352
+ <tr>
353
+ <td colspan=5><strong>Hardening suite</strong></td>
354
+ </tr>
355
+ <tr>
356
+ <td>Security hardening suite
357
+ <ul>
358
+ <li>End-to-end encryption</li>
359
+ <li>Strings protection (e.g. API keys)</li>
360
+ <li>Dynamic TLS certificate pinning</li>
361
+ </ul>
362
+ </td>
363
+ <td>no</td>
364
+ <td>yes</td>
365
+ </tr>
366
+ <tr>
367
+ <td colspan=5><strong>AppiCrypt® - App Integrity Cryptogram</strong></td>
368
+ </tr>
369
+ <tr>
370
+ <td>API protection by mobile client integrity check, online risk scoring, online fraud prevention, client App integrity check. The cryptographic proof of app & device integrity.</td>
371
+ <td>no</td>
372
+ <td>yes</td>
373
+ </tr>
374
+ <tr>
375
+ <td colspan=5><strong>Security events data collection, Auditing and Monitoring tools</strong></td>
376
+ </tr>
377
+ <tr>
378
+ <td>Threat events data collection from SDK</td>
379
+ <td>yes</td>
380
+ <td>configurable</td>
381
+ </tr>
382
+ <tr>
383
+ <td>AppSec regular email reporting service</td>
384
+ <td>yes (up to 100k devices)</td>
385
+ <td>yes</td>
386
+ </tr>
387
+ <tr>
388
+ <td>UI portal for Logging, Data analytics and auditing</td>
389
+ <td>no</td>
390
+ <td>yes</td>
391
+ </tr>
392
+ <tr>
393
+ <td colspan=5><strong>Support and Maintenance</strong></td>
394
+ </tr>
395
+ <tr>
396
+ <td>SLA</td>
397
+ <td>Not committed</td>
398
+ <td>yes</td>
399
+ </tr>
400
+ <tr>
401
+ <td>Maintenance updates</td>
402
+ <td>Not committed</td>
403
+ <td>yes</td>
404
+ </tr>
405
+ <tr>
406
+ <td colspan=5><strong>Fair usage policy</strong></td>
407
+ </tr>
408
+ <tr>
409
+ <td>Mentioning of the App name and logo in the marketing communications of Talsec (e.g. "Trusted by" section on the web).</td>
410
+ <td>over 100k downloads</td>
411
+ <td>no</td>
412
+ </tr>
413
+ <tr>
414
+ <td>Threat signals data collection to Talsec database for processing and product improvement</td>
415
+ <td>yes</td>
416
+ <td>no</td>
417
+ </tr>
418
+ </tbody>
419
+ </table>
420
+
421
+ For further comparison details (and planned features), follow our [discussion](https://github.com/talsec/Free-RASP-Community/discussions/5).
422
+
423
+ # About Us
424
+
425
+ Talsec is an academic-based and community-driven mobile security company. We deliver in-App Protection and a User Safety suite for Fintechs. We aim to bridge the gaps between the user's perception of app safety and the strong security requirements of the financial industry.
426
+
427
+ Talsec offers a wide range of security solutions, such as App and API protection SDK, Penetration testing, monitoring services, and the User Safety suite. You can check out offered products at [our web](https://www.talsec.app).
428
+
429
+ # License
430
+
431
+ This project is provided as freemium software i.e. there is a fair usage policy that impose some limitations on the free usage. The SDK software consists of opensource and binary part which is property of Talsec. The opensource part is licensed under the MIT License - see the [LICENSE](https://github.com/talsec/Free-RASP-Community/blob/master/LICENSE) file for details.
@@ -0,0 +1,75 @@
1
+ ext {
2
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
4
+ androidCoreKtxVersion = project.hasProperty('androidCoreKtxVersion') ? rootProject.ext.androidCoreKtxVersion : '1.10.1'
5
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
6
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
7
+ }
8
+
9
+ buildscript {
10
+ ext {
11
+ kotlin_version = '1.8.22'
12
+ }
13
+ repositories {
14
+ google()
15
+ mavenCentral()
16
+ }
17
+ dependencies {
18
+ classpath 'com.android.tools.build:gradle:8.0.0'
19
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
20
+ }
21
+ }
22
+
23
+ apply plugin: 'com.android.library'
24
+ apply plugin: 'org.jetbrains.kotlin.android'
25
+
26
+ android {
27
+ namespace "com.aheaditec.freerasp"
28
+ compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
29
+ defaultConfig {
30
+ minSdkVersion 23
31
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
32
+ versionCode 1
33
+ versionName "1.0"
34
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
35
+ // now, the rule skips all classes of Capacitor plugin for freeRASP
36
+ consumerProguardFiles 'consumer-rules.pro'
37
+ }
38
+ buildTypes {
39
+ release {
40
+ minifyEnabled false
41
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
42
+ }
43
+ }
44
+ lintOptions {
45
+ abortOnError false
46
+ }
47
+ compileOptions {
48
+ sourceCompatibility JavaVersion.VERSION_17
49
+ targetCompatibility JavaVersion.VERSION_17
50
+ }
51
+ }
52
+
53
+ repositories {
54
+ google()
55
+ mavenCentral()
56
+ }
57
+
58
+ rootProject.allprojects {
59
+ repositories {
60
+ maven{url "https://nexus3-public.monetplus.cz/repository/ahead-talsec-free-rasp"}
61
+ maven{url "https://jitpack.io"}
62
+ }
63
+ }
64
+
65
+ dependencies {
66
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
67
+ implementation project(':capacitor-android')
68
+ implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
69
+ implementation "androidx.core:core-ktx:$androidCoreKtxVersion"
70
+ testImplementation "junit:junit:$junitVersion"
71
+ androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
72
+ androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
73
+
74
+ implementation 'com.aheaditec.talsec.security:TalsecSecurity-Community-Capacitor:8.2.0'
75
+ }
@@ -0,0 +1 @@
1
+ -keep public class com.aheaditec.freerasp.** { public <methods>; }
@@ -0,0 +1,22 @@
1
+ # Project-wide Gradle settings.
2
+
3
+ # IDE (e.g. Android Studio) users:
4
+ # Gradle settings configured through the IDE *will override*
5
+ # any settings specified in this file.
6
+
7
+ # For more details on how to configure your build environment visit
8
+ # http://www.gradle.org/docs/current/userguide/build_environment.html
9
+
10
+ # Specifies the JVM arguments used for the daemon process.
11
+ # The setting is particularly useful for tweaking memory settings.
12
+ org.gradle.jvmargs=-Xmx1536m
13
+
14
+ # When configured, Gradle will run in incubating parallel mode.
15
+ # This option should only be used with decoupled projects. More details, visit
16
+ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17
+ # org.gradle.parallel=true
18
+
19
+ # AndroidX package structure to make it clearer which packages are bundled with the
20
+ # Android operating system, and which are packaged with your app's APK
21
+ # https://developer.android.com/topic/libraries/support-library/androidx-rn
22
+ android.useAndroidX=true
@@ -0,0 +1,21 @@
1
+ # Add project specific ProGuard rules here.
2
+ # You can control the set of applied configuration files using the
3
+ # proguardFiles setting in build.gradle.
4
+ #
5
+ # For more details, see
6
+ # http://developer.android.com/guide/developing/tools/proguard.html
7
+
8
+ # If your project uses WebView with JS, uncomment the following
9
+ # and specify the fully qualified class name to the JavaScript interface
10
+ # class:
11
+ #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
+ # public *;
13
+ #}
14
+
15
+ # Uncomment this to preserve the line number information for
16
+ # debugging stack traces.
17
+ #-keepattributes SourceFile,LineNumberTable
18
+
19
+ # If you keep the line number information, uncomment this to
20
+ # hide the original source file name.
21
+ #-renamesourcefileattribute SourceFile
@@ -0,0 +1,2 @@
1
+ include ':capacitor-android'
2
+ project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
@@ -0,0 +1,2 @@
1
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
2
+ </manifest>