UNPKG

react-native-malwarelytics

Version:

Malwarelytics for React Native protects your banking or fintech app from a broad range of mobile security threats with an industry-leading mobile threat intelligence solution.

111 lines (104 loc) 3.46 kB
// // Copyright 2023 Wultra s.r.o. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions // and limitations under the License. // /** * An APK with analyzed threats. */ /** * A threat level that is posed by an app. * * MALWARE: * The found threats clearly indicate that the app is a malware. * * HIGHLY_DANGEROUS: * The found threats indicate that the app is highly dangerous * to the current app. * It uses multiple potential attack vectors * including techniques directly targeting the current app. * * DANGEROUS: * The found threats indicate that the app is dangerous * to the current app. * Is uses multiple potential attack vectors. * However, no technique directly targeting the current app was detected. * * POTENTIALLY_UNWANTED_APP: * The found threats indicate that the app might be potentially dangerous. * For example it declares potentially dangerous permissions. * However it it quite possible that the app is legitimate. * * SAFE: * There are no found threats. * * UNKNOWN: * The threat is unknown. * The app was probably not found. * In case of suggestions, there's none. */ /** * Convert `ThreatIndex` type into number for the evaluation. The higher numeric value means a higher danger. * @param threatIndex `ThreatIndex` to convert. * @returns Number representing how dangerous the application is. */ export function threatIndexToNumber(threatIndex) { switch (threatIndex) { case 'UNKNOWN': return 0; case 'SAFE': return 1; case 'POTENTIALLY_UNWANTED_APP': return 2; case 'DANGEROUS': return 3; case 'HIGHLY_DANGEROUS': return 4; case 'MALWARE': return 5; } } /** * Installer app of an apk. * * STORE_GOOGLE_PLAY: The app was installed via Google Play * STORE_HUAWEI_APP_GALLERY: The app was installed via Huawei App Gallery * STORE_SAMSUNG_GALAXY_STORE: The app was installed via Samsung Galaxy Store * STORE_APTOIDE: The app was installed via Aptoide */ /** * Evaluated flag for an apk threat. * The flag risk the other app is posing. * * ACCESSIBILITY: Accesibility * SMS_ACCESS: Read sms, receive sms, notification listener * SCREEN_OVERRIDE: Task hijacking, screen overlay * INSTALLER: Can install apps * UNINSTALLER: Can uninstall apps * EVADER: Hides it's internals/function * OUTSIDE_GOOGLE_PLAY: Not installed via Google Play * CALLER: Can play with your calls, e.g. it can setup a call forwarding of your calls * PRELOADED_APP: The app is preloaded on the device * PRIVILEGED_APP: The app is privileged (system privileges) * DEVELOPMENT_OR_TEST: The app is debuggable * */ /** Flag designating malware info. */ /** Type of MalwareFlag. */ export let MalwareFlagType = /*#__PURE__*/function (MalwareFlagType) { MalwareFlagType["UNKNOWN"] = "UNKNOWN"; MalwareFlagType["MALWARE_FAMILY"] = "MALWARE_FAMILY"; MalwareFlagType["MALWARE_TYPE"] = "MALWARE_TYPE"; return MalwareFlagType; }({}); //# sourceMappingURL=ApkThreat.js.map